Optional responseZod schema describing the expected shape of the assistant reply. When
present, agentos converts the schema to JSON Schema, routes through
the provider's native structured-output API (OpenAI json_schema;
Anthropic's JSON output format, or a forced tool call for a schema
the format cannot carry; Gemini responseSchema), and returns a
Zod-validated typed object on result.object alongside the JSON
string in result.text. A call whose provider payload carries no
schema (a provider with none, a record schema on an Anthropic model
that refuses a forced tool choice, JSON-object mode) gets the schema
in its system prompt, in the words generateObject uses; each
fallback provider is checked for its own payload.
The agent's tools are left out of a schema request, and with them the
chain-of-thought instruction; runtime: 'legacy' (the default) warns
that it leaves them out.
Optional schemaDisplay name for the schema in provider payloads. Surfaces in OpenAI's json_schema.name and Anthropic's tool name. Defaults to 'response'. Sanitized to /[a-zA-Z0-9_]/ and truncated to 64 chars.
Optional maxExtra schema-validation attempts on the default runtime. Defaults to 0.
Optional blockTelemetry + eviction-boundary label for this send's transcript block. Labels are markers, not pins.
Optional toolPer-send generation overrides, merged over the agent's baseOpts with
send-level precedence — the same contract generate(prompt, extra)
gives extra. Long tool-driving loops rely on these
(toolChoice, requestTimeout, cacheDiagnostics); without send-level
carriage a caller migrating from generate() silently loses them.
Optional requestOptional cacheOptional previousOptional cacheOptional ttl?: "5m" | "1h"Optional maxOptional abortEnds this send when it aborts: the provider request in flight is cancelled, no further step, retry or fallback
hop starts, and the send rejects with the signal's reason. The session stays open. With the default runtime
nothing of the send is added to the session's history; with runtime: 'gmi' the turn ends as close() ends
one, and the steps it finished stay in messages(), marked partial.
Optional budgetA spend budget for this send in place of the agent's; on a seat session (sessionSeat(), or a member a launched
team seats) held beside it, each call checked against both and charged to both. Every provider call of the send
is checked against it before it is made and recorded after it (settings make a new SpendBudget for the
send). With runtime: 'gmi', every completion call of the turn, metaprompts included.
Options for a single AgentSession.send call.