Interface: SessionSendOptions<S>
Defined in: packages/agentos/src/api/agent.ts:274
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:298
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:309
cacheDiagnostics?
optionalcacheDiagnostics:boolean| {previousMessageId?:string|null; }
Defined in: packages/agentos/src/api/agent.ts:308
maxTokens?
optionalmaxTokens:number
Defined in: packages/agentos/src/api/agent.ts:310
requestTimeout?
optionalrequestTimeout:number
Defined in: packages/agentos/src/api/agent.ts:307
responseSchema?
optionalresponseSchema:S
Defined in: packages/agentos/src/api/agent.ts:287
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.
Tools (caller-provided in baseOpts.tools) are still passed through; the structured-output mode adds its own forced tool on Anthropic but the existing tool definitions remain in the payload.
schemaName?
optionalschemaName:string
Defined in: packages/agentos/src/api/agent.ts:293
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:306
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.