Skip to main content

Interface: SessionSendOptions<S>

Defined in: packages/agentos/src/api/agent.ts:204

Options for a single AgentSession.send call.

Type Parameters

S

S extends ZodType | undefined = undefined

Properties

responseSchema?

optional responseSchema: S

Defined in: packages/agentos/src/api/agent.ts:217

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?

optional schemaName: string

Defined in: packages/agentos/src/api/agent.ts:223

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.