Optional modelModel identifier. Accepted in two formats:
"provider:model" — e.g. "openai:gpt-4o".provider is also set.Optional providerProvider name (e.g. "openai", "anthropic", "ollama").
Auto-detected from environment API keys when omitted.
Optional instructionsFree-form system instructions prepended to the system prompt.
Optional nameDisplay name for the agent, injected into the system prompt.
Optional apiOverride the provider API key instead of reading from environment variables.
Optional baseOverride the provider base URL (useful for local proxies or Ollama).
Optional personalityHEXACO-inspired personality trait overrides (0–1 scale). Encoded as a human-readable trait string appended to the system prompt.
Optional toolsTools available to the agent on every call.
Accepts:
ExternalToolRegistry (Record, Map, or iterable)ToolDefinitionForLLM[]Optional maxMaximum number of agentic steps (LLM calls) per invocation. Defaults to 5.
Optional memoryMemory configuration.
true — enable in-memory conversation history with default settings.false — disable memory; every call is stateless.MemoryConfig — full control over memory subsystems.Optional ragRetrieval-Augmented Generation configuration.
Optional discoveryRuntime capability discovery configuration.
Optional guardrailsGuardrail policy identifiers or structured config.
string[] — shorthand; applies to both input and output.GuardrailsConfig — full control with separate input/output lists.Optional securitySecurity tier controlling permitted tools and capabilities.
Optional permissionsFine-grained tool and resource permission overrides.
Optional hitlHuman-in-the-loop approval configuration.
Optional emergentEmergent agent synthesis configuration.
Optional voiceVoice interface configuration.
Optional avatarAvatar visual presentation configuration.
Optional channelsChannel adapter configurations keyed by channel name. Values are channel-specific option objects passed through opaquely.
Optional outputOutput schema for structured generation.
Accepts a Zod schema at runtime; typed as unknown here to avoid a
hard dependency on the zod package in the types layer.
Optional provenanceProvenance and audit-trail configuration.
Optional observabilityObservability and telemetry configuration.
Optional onEvent callbacks fired at various lifecycle points during the run.
Optional controlsResource limits (tokens, cost, time) applied to the entire run.
Optional dependsNames of other agents in the agency that must complete before this agent runs.
Used with strategy: 'graph' to build an explicit dependency DAG.
Agents with no dependsOn are roots and run first.
`dependsOn: ['researcher']` — this agent waits for `researcher` to finish.
Optional cognitiveCognitive mechanisms config — 8 neuroscience-backed memory mechanisms. All HEXACO-modulated (emotionality, conscientiousness, openness, etc.).
{} for sensible defaults (all 8 mechanisms enabled).Requires memory to be enabled (true or a MemoryConfig object).
If cognitiveMechanisms is set but memory is disabled, a warning is logged
and the mechanisms config is ignored.
Named roster of sub-agents. Each value is either a BaseAgentConfig
object (the agency will instantiate it) or a pre-built Agent instance.
Optional strategyOrchestration strategy for coordinating sub-agents.
Defaults to "sequential" when omitted.
Optional adaptiveWhether the orchestrator may override strategy at runtime based on
task complexity signals.
Optional maxMaximum number of orchestration rounds before the run is terminated.
Applies to iterative strategies like "debate" and "review-loop".
Configuration for the
agency()factory function. ExtendsBaseAgentConfigwith a requiredagentsroster and optional multi-agent orchestration settings.Example
See
agency -- the factory function that consumes this configuration. See
BaseAgentConfigfor the shared config surface inherited by this interface.