DocsCommonagent-configRuntimeConfig
Package: @hexos/common

Master configuration for the Hexos runtime, defining agents, tools, MCP servers, and operational limits.

This is the primary input to AgentRuntime. It registers all agents and their tools, configures MCP server connections, sets lifecycle hooks, and defines resource limits for concurrency, rate limiting, timeouts, and approval management.

The runtime normalizes this config at startup, applying defaults for all optional numeric fields and validating relationships between values.

Related: AgentDefinition defines individual agents, ToolDefinition defines tools, MCPServerConfig configures MCP servers, RuntimeHooks provides lifecycle callbacks, RateLimitConfig and RetryConfig control resilience.

interface RuntimeConfig {
    agents: AgentDefinition[];
    defaultAgent?: string;
    globalTools?: ToolDefinition[];
    mcpServers?: Record<string, MCPServerConfig>;
    hooks?: RuntimeHooks;
    debug?: boolean;
    maxHandoffs?: number;
    approvalTimeoutMs?: number;
    maxPendingApprovalsPerConversation?: number;
    defaultToolTimeoutMs?: number;
    maxActiveStreams?: number;
    maxActiveStreamsPerConversation?: number;
    maxConcurrentToolExecutions?: number;
    toolExecutionQueueTimeoutMs?: number;
    rateLimit?: RateLimitConfig;
    retry?: RetryConfig;
}

agents

defaultAgent

string

globalTools

mcpServers

RecordMCPServerConfig>

hooks

debug

boolean

maxHandoffs

number

approvalTimeoutMs

number

maxPendingApprovalsPerConversation

number

defaultToolTimeoutMs

number

maxActiveStreams

number

maxActiveStreamsPerConversation

number

maxConcurrentToolExecutions

number

toolExecutionQueueTimeoutMs

number

rateLimit

retry