AgentConfig
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:57
The agent slot of the Engine config. When present, utterances run as
Agent Runs that call the configured tools. Read once when the Engine is
created.
Properties
Section titled “Properties”budgets?
Section titled “budgets?”
readonlyoptionalbudgets?:Partial<AgentRunBudgets> |AgentBudgetResolver
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:81
Caps for each run, as static values or a resolver called once per run.
Fields left out default to 12 turns, 120,000 ms, 100,000
tokens and 24 tool calls. Every value must be a
non-negative integer. maxTokens and maxElapsedMs also accept
Infinity, which removes that cap. maxTurns and maxToolCalls must
stay finite, so every run keeps a hard bound on its loop. Any other
field is rejected, so a misspelled cap fails instead of falling back to
its default. Static values are validated when the Engine is created.
instructions?
Section titled “instructions?”
readonlyoptionalinstructions?:string
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:65
System instructions sent with every model turn. Defaults to an empty string.
readonlymodel:AnyTextAdapter|AgentModelFactory
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:63
The text adapter serving every run, or a factory that picks one per run.
A value of type function is treated as a factory. Any other value must
be an object with a chatStream method, or Engine creation throws.
retry?
Section titled “retry?”
readonlyoptionalretry?:object
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:83
Rate-limit retry for each model call. Defaults to no retry.
maxRetries
Section titled “maxRetries”maxRetries:
number
Extra model calls after the first, for each model call of the run. 0
means no retry. The provider SDK does its own retries first, from the
maxRetries of the adapter config.
maxWaitMs?
Section titled “maxWaitMs?”
optionalmaxWaitMs?:number
Longest wait time to accept, in milliseconds. Default 60 000.
tools?
Section titled “tools?”
readonlyoptionaltools?: readonlyRegistrableServerTool[]
Defined in: packages/engine/src/lib/agent-session/agent-config.ts:70
The Server Tools the model may call. Defaults to none. Every tool must
define summarize, and names must be unique, or Engine creation throws.