Interface: SessionSendOptions<S>
Defined in: packages/agentos/src/api/agent.ts:323
Options for a single AgentSession.send call.
Type Parameters
S
S extends ZodType | undefined = undefined
Properties
blockLabel?
optionalblockLabel:string
Defined in: packages/agentos/src/api/agent.ts:351
Telemetry + eviction-boundary label for this send's transcript block (spec §1c(iv)). Labels are markers, not pins.
cache?
optionalcache:false| {ttl?:"5m"|"1h"; }
Defined in: packages/agentos/src/api/agent.ts:362
cacheDiagnostics?
optionalcacheDiagnostics:boolean| {previousMessageId?:string|null; }
Defined in: packages/agentos/src/api/agent.ts:361
maxTokens?
optionalmaxTokens:number
Defined in: packages/agentos/src/api/agent.ts:363
requestTimeout?
optionalrequestTimeout:number
Defined in: packages/agentos/src/api/agent.ts:360
responseSchema?
optionalresponseSchema:S
Defined in: packages/agentos/src/api/agent.ts:340
Zod 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 forced tool-use, 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, an Anthropic model that rejects 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.
schemaName?
optionalschemaName:string
Defined in: packages/agentos/src/api/agent.ts:346
Display 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.
toolChoice?
optionaltoolChoice:string|Record<string,unknown>
Defined in: packages/agentos/src/api/agent.ts:359
Per-send generation overrides, merged over the agent's baseOpts with
send-level precedence — the same contract generate(prompt, extra)
gives extra (spec §1f). Long tool-driving loops rely on these
(toolChoice, requestTimeout, cacheDiagnostics); without send-level
carriage a caller migrating from generate() silently loses them.