Agents

Stops the agent's current turn: cancels its unfinished tool calls and open interactions, stops processes whose run_command hasn't returned yet, and discards pending steering messages. The agent stays active and keeps its queued messages, and processes whose run_command already returned keep running. Returns affected false and changes nothing when no turn is in progress.

post/orgs/{orgID}/projects/{projectID}/agents/{agentID}/cancel

Request

  • Base URL
    https://api.omnara.com/v1
  • Auth
    • HTTP bearer
    • or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf

Path parameters

orgID, string required

Organization ID (org_...).

projectID, string required

Project ID (proj_...).

agentID, string required

Agent ID (agt_...).

Request body

CancelAgentRequest required
actor, ExternalActorParams

External actor to attribute this cancelation to, upserted by (provider_tenant_id, provider_user_id) atomically with the cancelation; a rejected request writes no actor. Only allowed for non-user principals; requests authenticated as a user must omit it and are attributed to the user's omnara actor.

Response

Agent canceled.

CancelAgentResponse required
event, union required
runtime_cancel_requested, boolean required

Whether this request created or observed a durable runtime cancel request. Immediate delivery is best effort; runtime-lock renewal observes the durable request.

affected, boolean required

Whether this request changed any cancelable work.

actor_id, string

Actor the cancelation was attributed to. Absent when the request had no actor attribution.

Changes

    • info

      added the required property event/anyOf[#/components/schemas/AgentEvent]/oneOf[#/components/schemas/AgentInputEvent]/agent_profile_id to the response with the status

    • info

      added the required property event/anyOf[#/components/schemas/AgentEvent]/oneOf[#/components/schemas/AgentInputEvent]/parent_agent_id to the response with the status

    • info

      added the required property event/anyOf[#/components/schemas/AgentEvent]/oneOf[#/components/schemas/AgentInputEvent]/root_agent_id to the response with the status

    9 more changes in this revision