Agents

Create agent input

Changed on

Sends a message to an agent and returns the stored input. Queued messages (the default) wait until the agent is ready for new work; steering messages reach it at its next model call. Set scheduled_for to hold the message until a future time: it is stored with state scheduled, listed with the waiting backlog, and joins the back of its delivery backlog once that time passes.

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

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_...).

Headers

Idempotency-Key, string

Idempotency key for replay-safe mutating requests.

traceparent, string

W3C Trace Context traceparent of the calling span. In the otel trace variant, the turn this request's input opens is exported as part of that trace, with its invoke_agent span a child of the calling span. A malformed value is ignored.

Request body

CreateAgentInputRequest required
content_blocks, CreateAgentInputContentBlock[] required

At most 20 inline media blocks per submission, each holding up to 10 MiB of decoded media and up to 24 MiB decoded across the submission. Non-media blocks may hold up to 1 MiB combined. The whole request body is capped at 48 MiB.

delivery_mode, 'queued' | 'steering'

queued (default) waits until the agent is free; steering reaches it at its next model call.

scheduled_for, string date-time

Future time at which the message joins the agent's backlog. Until then the input has state scheduled and can be canceled. An agent holds at most 25 scheduled inputs. Delivery follows within about a minute of this time, using delivery_mode. Must be in the future and at most 90 days away.

cancel_open_interactions, boolean

Only valid when delivery_mode is steering and scheduled_for is omitted. When true, atomically cancels open interactions associated with the current turn's unfinished tool calls before creating the steering input. Their parent tool calls complete as canceled; the turn, runtime, and unrelated tool calls are preserved.

actor, ExternalActorParams

External actor to attribute this input to, upserted by (provider_tenant_id, provider_user_id) atomically with the input; 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. When a non-user request omits it, the input has no actor attribution.

Response

Existing agent input returned.

AgentInputEnvelope required
agent_input, AgentInput required

Changes

    • info

      added the new optional header request parameter traceparent

    • info

      added the new audio/flac enum value to the request property content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type

    • info

      added the new audio/mp4 enum value to the request property content_blocks/items/oneOf[#/components/schemas/InlineMediaContentBlock]/media_type

    2 more changes in this revision