Skip to main content
The synchronous run endpoint executes an agent and blocks until the agent produces a final response. This is the simplest way to integrate Agent Manager — send a message, receive the full answer. For long-running tasks or streaming output, see Background Runs and SSE Streaming. All requests require a valid bearer token in the Authorization header.

Execute a synchronous run

Runs the agent against the provided message and returns a RunResponse when execution completes. If the agent triggers a Human-in-the-Loop (HITL) tool during execution, the run is suspended and the response returns with status: "PAUSED" — call the continue endpoint to approve or reject.

Path parameters

string
required
The unique identifier of the agent to run. Retrieve valid IDs from GET /api/agents.

Request body

string
required
The user’s input or query. The agent uses this as the primary prompt for the interaction.
string
A UUID identifying an existing conversation session. When provided, the agent rehydrates its message history from that session, enabling multi-turn conversations. Omit to start a new session — the server generates and returns a new sessionId.
string
Associates this run with a specific user. Used for memory scoping, audit logs, and per-user analytics. Defaults to the authenticated principal when omitted.
string
Tenant identifier for multi-tenant deployments. Scopes the run to a specific organization’s agents and knowledge bases.
boolean
default:"false"
When true, the agent generates a list of suggested follow-up questions to append to the response. Useful for chat UIs that want to prompt the next turn.
object[]
An array of multimodal media inputs for vision-capable agents.
object
Optional RunOptions object to override model-level settings for this specific run.

Response

string
required
Unique identifier for this specific run. Use this ID to call the continue or cancel endpoints.
string
required
The conversation session associated with this run. Pass this value back in subsequent requests to maintain conversation context.
string
The agent’s final answer, rendered as Markdown. Empty when status is "FAILED" or "PAUSED".
object
Usage statistics and model information for this run.
object[]
An ordered list of tool calls made during execution. Useful for audit logs and debugging.
string[]
Captured inner thoughts from the agent’s reasoning process — what the agent was thinking before each tool call. Useful for explainability and debugging.
string
required
Execution status of the run. One of:
  • "COMPLETED" — the agent finished successfully and content contains the response.
  • "FAILED" — an unrecoverable error occurred during execution.
  • "PAUSED" — the agent triggered a Human-in-the-Loop confirmation gate. Call /runs/{runId}/continue to resume.
Example response

Resume a paused run (HITL)

When a run returns status: "PAUSED", the agent has encountered a tool marked as requiring human approval (for example, delete_database or send_email). Use this endpoint to approve or reject the pending action.
Until you call this endpoint, the paused run holds its state in the database and is consuming a slot in the job queue. Approve or reject promptly to avoid stale runs.

Path parameters

string
required
The agent that owns the paused run.
string
required
The run ID returned in the original RunResponse with status: "PAUSED".

Request body

string
required
The human decision. Must be "APPROVE" to allow the tool to execute, or "REJECT" to cancel the tool call and return control to the agent.
Example response The server returns a new RunResponse reflecting the outcome after the approved or rejected tool call resolves.

Cancel a run

Sends a cancellation signal to an active or paused run. Returns 204 No Content on success. The run status is updated to CANCELLED in the database.
string
required
The agent that owns the run.
string
required
The unique run identifier to cancel.
Returns 204 No Content with an empty body on success.
Use the cancel endpoint to clean up PAUSED runs that you no longer intend to approve, freeing queue capacity.