AgentDef
Configuration passed to new Agent(def).
Example
Section titled “Example”const agent = new Agent({ name: "support", model: "anthropic/claude-sonnet-4-6", instructions: "You are a customer support agent.",})Properties
Section titled “Properties”defaults?
Section titled “defaults?”
optionaldefaults?:boolean|DefaultsOptions
Auto-apply sensible default middleware (retry, usage, tools, duration, maxIterations).
trueor omitted: defaults applied{ ... }: defaults applied with custom optionsfalse: bare minimum, no defaults
instructions
Section titled “instructions”instructions:
string
System prompt injected into every model call.
model:
string|LanguageModelV3
Model identifier string (“provider/model”) or a LanguageModelV3 object.
name:
string
Agent name for debugging and tracing.