Appearance
Interface: AgentOptions<S>
Defined in: packages/sdk/src/renderer/templates/agent.ts:22
Options for an agent run.
Type Parameters
| Type Parameter | Default type |
|---|---|
S extends z.ZodType | z.ZodType |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
prompt | string | The instruction for the subagent. | packages/sdk/src/renderer/templates/agent.ts:24 |
system? | string | Optional system prompt scoping the subagent's behavior. | packages/sdk/src/renderer/templates/agent.ts:26 |
tools? | ChatTools | Tools the subagent may call, keyed by name — built with tool. | packages/sdk/src/renderer/templates/agent.ts:28 |
model? | AiSdkModelConfig | Which 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? | unknown | Structured input appended to the prompt (JSON-stringified if needed). | packages/sdk/src/renderer/templates/agent.ts:36 |
maxSteps? | number | Max tool-calling steps before the subagent must answer (default 5). | packages/sdk/src/renderer/templates/agent.ts:38 |
output? | S | When 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 |