Skip to content

Interface: AgentOptions<S>

Defined in: packages/sdk/src/renderer/templates/agent.ts:22

Options for an agent run.

Type Parameters

Type ParameterDefault type
S extends z.ZodTypez.ZodType

Properties

PropertyTypeDescriptionDefined in
promptstringThe instruction for the subagent.packages/sdk/src/renderer/templates/agent.ts:24
system?stringOptional system prompt scoping the subagent's behavior.packages/sdk/src/renderer/templates/agent.ts:26
tools?ChatToolsTools the subagent may call, keyed by name — built with tool.packages/sdk/src/renderer/templates/agent.ts:28
model?AiSdkModelConfigWhich cloud model backs the subagent. Defaults to aiSdk() (auto-detects the provider/key from ctx.assistant.secrets). On-device nano() is not supported for subagents — nested loops need a cloud model.packages/sdk/src/renderer/templates/agent.ts:34
input?unknownStructured input appended to the prompt (JSON-stringified if needed).packages/sdk/src/renderer/templates/agent.ts:36
maxSteps?numberMax tool-calling steps before the subagent must answer (default 5).packages/sdk/src/renderer/templates/agent.ts:38
output?SWhen given, the subagent returns a value parsed from this Zod schema (e.g. z.array(z.string()) for a list of steps) instead of free text.packages/sdk/src/renderer/templates/agent.ts:43

Matterway Assistant SDK Documentation