Update an existing agent instance.
Only provided fields are updated. Returns the updated instance.
Returns: Updated agent instance.
Raises: NotFoundError: If instance not found or belongs to another organization.
Request body for updating an agent instance. All fields optional.
Status changes are not allowed here — use the transition endpoint instead.
Attributes: task_id: Task this instance is working on. turn_count: Number of LLM turns completed. tokens_total: Total tokens consumed. needs_input: Whether the instance is blocked waiting for human input. current_step: Description of what the instance is currently doing. last_action_at: Timestamp of the most recent action. session_id: External session identifier.
Successful Response
A running or completed agent session.
Attributes: id: SurrealDB record ID (populated by database). organization_id: Owning organization. agent_type_id: Agent type this instance runs. task_id: Task this instance is working on. status: Current lifecycle status. started_at: When the instance began execution. ended_at: When the instance reached a terminal status. turn_count: Number of LLM turns completed. tokens_total: Total tokens consumed. needs_input: Whether the instance is blocked waiting for human input. current_step: Description of what the instance is currently doing. last_action_at: Timestamp of the most recent action. session_id: External session identifier for conversation continuity.
Lifecycle status of an agent instance.
starting, running, waiting, paused, completed, error, stopped