Interface: AgencyOptions
Defined in: packages/agentos/src/api/types.ts:1551
Configuration for the agency() factory function.
Extends BaseAgentConfig with a required agents roster and optional
multi-agent orchestration settings.
Example
import { agency, hitl } from '@framers/agentos';
const myAgency = agency({
provider: 'openai',
model: 'gpt-4o',
strategy: 'sequential',
agents: {
researcher: { instructions: 'Find relevant papers.' },
writer: { instructions: 'Write a clear summary.' },
},
controls: { maxTotalTokens: 50_000, onLimitReached: 'warn' },
hitl: {
approvals: { beforeTool: ['delete-file'], beforeReturn: true },
handler: hitl.autoApprove(),
timeoutMs: 30_000,
onTimeout: 'reject',
},
on: {
agentStart: (e) => console.log(`[${e.agent}] started`),
agentEnd: (e) => console.log(`[${e.agent}] done in ${e.durationMs}ms`),
},
});
See
agency -- the factory function that consumes this configuration.
See BaseAgentConfig for the shared config surface inherited by this interface.
Extends
BaseAgentConfig
Properties
adaptive?
optionaladaptive:boolean
Defined in: packages/agentos/src/api/types.ts:1566
Whether the orchestrator may override strategy at runtime based on
task complexity signals.
agents
agents:
Record<string,BaseAgentConfig|Agent>
Defined in: packages/agentos/src/api/types.ts:1556
Named roster of sub-agents. Each value is either a BaseAgentConfig
object (the agency will instantiate it) or a pre-built Agent instance.
apiKey?
optionalapiKey:string
Defined in: packages/agentos/src/api/types.ts:1253
Override the provider API key instead of reading from environment variables.
Inherited from
BaseAgentConfig.apiKey
avatar?
optionalavatar:AvatarConfig
Defined in: packages/agentos/src/api/types.ts:1359
Avatar visual presentation configuration.