Appearance
Interface: AgentFn()
Defined in: packages/sdk/src/renderer/templates/agent.ts:51
Run a subagent bound to a ctx. This is the shape of the agent run-option handed to a tool's execute. With no output it resolves to the subagent's text; with an output schema it resolves to the parsed value.
Call Signature
ts
AgentFn(options: Omit<AgentOptions, "output">): Promise<string>;Defined in: packages/sdk/src/renderer/templates/agent.ts:52
Run a subagent bound to a ctx. This is the shape of the agent run-option handed to a tool's execute. With no output it resolves to the subagent's text; with an output schema it resolves to the parsed value.
Parameters
| Parameter | Type |
|---|---|
options | Omit<AgentOptions, "output"> |
Returns
Promise<string>
Call Signature
ts
AgentFn<S>(options: AgentOptions<S> & {
output: S;
}): Promise<output<S>>;Defined in: packages/sdk/src/renderer/templates/agent.ts:53
Run a subagent bound to a ctx. This is the shape of the agent run-option handed to a tool's execute. With no output it resolves to the subagent's text; with an output schema it resolves to the parsed value.
Type Parameters
| Type Parameter |
|---|
S extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>> |
Parameters
| Parameter | Type |
|---|---|
options | AgentOptions<S> & { output: S; } |
Returns
Promise<output<S>>