Skip to content

Interface: AIAgentConfig<TBus, TConnector>

Makaio Framework


Makaio Framework / ai-adapters-core / AIAgentConfig

Interface: AIAgentConfig<TBus, TConnector>

Section titled “Interface: AIAgentConfig<TBus, TConnector>”

Defined in: ../../../adapters/core/src/agent/types.ts:166

Configuration for creating an AIAgent instance.

Combines agent identity, runtime input, and factory functions. model/cwd are optional here - configFactory provides adapter defaults.

TBus extends ScopedBus<string> = ScopedBus<string>

The scoped bus type for this adapter

TConnector extends AIAgentConnector<TBus> = AIAgentConnector<TBus>

The connector type (for proper factory return typing)

adapterBus: TBus

Defined in: ../../../adapters/core/src/agent/types.ts:190

Scoped bus for adapter-specific events


adapterId: string

Defined in: ../../../adapters/core/src/agent/types.ts:26

Adapter instance identifier

AgentIdentity.adapterId


adapterName: string

Defined in: ../../../adapters/core/src/agent/types.ts:28

Adapter type name (e.g., ‘claude-code’, ‘gemini-sdk’)

AgentIdentity.adapterName


optional adapterSessionId?: string

Defined in: ../../../adapters/core/src/agent/types.ts:172

Adapter-specific session identifier for multi-turn conversations


agentId: string

Defined in: ../../../adapters/core/src/agent/types.ts:24

Unique agent identifier

AgentIdentity.agentId


optional allowedDirectories?: string[]

Defined in: ../../../adapters/core/src/agent/types.ts:206

Directory restrictions for file-system tool execution.


optional allowedTools?: string[]

Defined in: ../../../adapters/core/src/agent/types.ts:202

Allowed tool names (adapter-specific). Empty array = disable all tools.


optional availableModels?: object[]

Defined in: ../../../adapters/core/src/agent/types.ts:198

Available models for this adapter (used for context window lookup)

contextWindowSize: number

Maximum context window size in tokens.

optional family?: string

Model family name (e.g., ‘opus’, ‘sonnet’, ‘gpt-4o’). Used for alias resolution and UI grouping.

optional friendlyName?: string

Human-readable display name (e.g., ‘Sonnet 4.5’, ‘GPT-4o’).

labId: string

Lab that created this model (e.g., ‘anthropic’, ‘openai’, ‘google’).

optional metadata?: object

Supplementary metadata from rich provider APIs (pricing, capabilities, etc.). Not used for routing or adapter logic — purely informational.

optional capabilities?: object

Provider-scoped capabilities for this model offering.

optional parallelToolCalls?: boolean

Whether multiple tool calls can be issued in a single turn.

optional pdfUpload?: boolean

Whether the provider accepts PDF file uploads.

optional speechToText?: object

Speech-to-text capability descriptor.

modes: (… | …)[]

Supported transcription modes.

metadata.capabilities.speechToText.vocabularyBiasing?
Section titled “metadata.capabilities.speechToText.vocabularyBiasing?”

optional vocabularyBiasing?: boolean

Whether the model supports vocabulary/terminology biasing. Optional by design because model metadata can be partial, unlike provider runtime capabilities.

optional structuredOutput?: boolean

Whether the provider supports structured (JSON schema) output.

optional textToSpeech?: object

Text-to-speech capability descriptor.

modes: (… | …)[]

Supported synthesis modes.

metadata.capabilities.textToSpeech.outputFormats?
Section titled “metadata.capabilities.textToSpeech.outputFormats?”

optional outputFormats?: …[]

Supported output audio formats. Optional because metadata may omit it.

metadata.capabilities.textToSpeech.voiceInstructions?
Section titled “metadata.capabilities.textToSpeech.voiceInstructions?”

optional voiceInstructions?: boolean

Whether the model supports style/tone instructions (e.g., gpt-4o-mini-tts). Optional because metadata may omit it.

metadata.capabilities.textToSpeech.voiceSelection?
Section titled “metadata.capabilities.textToSpeech.voiceSelection?”

optional voiceSelection?: boolean

Whether the user can select a voice preset. Optional because model metadata may omit it.

optional toolCalling?: boolean

Whether the provider’s API supports tool/function calling.

optional vision?: boolean

Whether the model accepts image inputs.

optional description?: string

Optional description of the model *

optional includedInSubscription?: boolean

Whether this model is included in the provider’s subscription plan.

optional maxOutputTokens?: number

Maximum output tokens the provider allows for this model.

optional pricing?: object

Token pricing for this model offering.

optional request?: object

Per-request pricing (GitHub Copilot premium requests, etc.).

multiplier: number

Cost per request in provider billing units (0 = free).

optional token?: object

Per-token pricing (Anthropic direct, OpenAI direct, etc.).

metadata.pricing.token.cacheWritePerMillion?
Section titled “metadata.pricing.token.cacheWritePerMillion?”

optional cacheWritePerMillion?: number

Cost per million cache-write input tokens (USD).

metadata.pricing.token.inputCachedPerMillion?
Section titled “metadata.pricing.token.inputCachedPerMillion?”

optional inputCachedPerMillion?: number

Cost per million cache-read input tokens (USD).

inputPerMillion: number

Cost per million input tokens (USD).

outputPerMillion: number

Cost per million output tokens (USD).

name: string

Model identifier used by the provider (e.g., ‘claude-sonnet-4-6’, ‘gpt-4o’, ‘gemini-2.5-pro’).

optional supportedReasoningLevels?: object

Maps supported reasoning levels to provider-native values. When omitted, the model does not support extended thinking / reasoning.

optional extra-high?: string | number = reasoningLevelValue

optional high?: string | number = reasoningLevelValue

optional low?: string | number = reasoningLevelValue

optional medium?: string | number = reasoningLevelValue

optional none?: string | number = reasoningLevelValue


capabilities: string[]

Defined in: ../../../adapters/core/src/agent/types.ts:194

Adapter capabilities (e.g., [‘streaming’, ‘tools’, ‘vision’])


optional clientId?: string

Defined in: ../../../adapters/core/src/agent/types.ts:186

Client identifier for the application this adapter belongs to (e.g., ‘claude-code’, ‘gemini’).


configFactory: (input) => Promise<BaseAgentConnectorConfig<TBus, object> & object>

Defined in: ../../../adapters/core/src/agent/types.ts:229

Config factory - transforms partial input into full adapter-specific config. This is the seam where adapters inject their defaults (especially model).

ConfigFactoryInput<TBus>

Promise<BaseAgentConnectorConfig<TBus, object> & object>


connectorFactory: (config) => TConnector | Promise<TConnector>

Defined in: ../../../adapters/core/src/agent/types.ts:236

Connector factory - creates connector from full config. Called AFTER configFactory returns the complete configuration. Config includes adapterId (passed through from input by config factory).

BaseAgentConnectorConfig<TBus, object> & object

TConnector | Promise<TConnector>


optional cwd?: string

Defined in: ../../../adapters/core/src/agent/types.ts:40

Working directory for agent execution (optional - platform provides default)

AgentRuntimeInput.cwd


optional disallowedTools?: string[]

Defined in: ../../../adapters/core/src/agent/types.ts:204

Disallowed tool names (adapter-specific). Takes precedence over allowedTools.


optional env?: Record<string, string>

Defined in: ../../../adapters/core/src/agent/types.ts:42

Environment variables to pass to agent execution

AgentRuntimeInput.env


optional ephemeral?: boolean

Defined in: ../../../adapters/core/src/agent/types.ts:223

When true, PreUserMessage hooks are skipped for this agent. Use for ephemeral ping agents where session enrichment and context injection are not needed and would be actively harmful.


optional globalBus?: IMakaioBus

Defined in: ../../../adapters/core/src/agent/types.ts:188

Global bus instance (defaults to MakaioBus singleton)


optional harnessId?: string

Defined in: ../../../adapters/core/src/agent/types.ts:184

Resolved harness ID for tool policy lookup.


optional mcpSessionContext?: LedgerSessionContext

Defined in: ../../../adapters/core/src/agent/types.ts:211

MCP session context resolved by the orchestrator. Passed through to the connector config so adapters can inject direct tools.


optional model?: string

Defined in: ../../../adapters/core/src/agent/types.ts:38

Model to use (optional - adapter provides default)

AgentRuntimeInput.model


nativeTools: string[]

Defined in: ../../../adapters/core/src/agent/types.ts:196

Native tools built into the adapter (e.g., [‘shell_command’, ‘apply_patch’])


optional providerContext?: object

Defined in: ../../../adapters/core/src/agent/types.ts:180

Unresolved provider context (credential refs, not plaintext). Set by the orchestrator before forwarding the startAgent request. Connectors resolve credentials locally via resolveConnectorCredentials().

optional credentialEnvVars?: Record<string, string>

Maps credential keys to environment variable names for subprocess adapters. E.g., { apiKey: 'ANTHROPIC_API_KEY' }.

credentialRefs: Record<string, string & $brand<"CredentialRef">>

Credential references resolved at the connector layer, not on the bus.

definitionId: string

Provider definition ID (e.g., 'anthropic', 'alibaba').

optional endpointOverrides?: object

Endpoint URL overrides keyed by protocol.

optional anthropic?: string

optional openai?: string

providerConfigId: string

Provider config UUID. Links back to the ProviderConfig that produced this context.


optional reasoningEffort?: "none" | "low" | "medium" | "high" | "extra-high"

Defined in: ../../../adapters/core/src/agent/types.ts:44

Reasoning effort for supporting adapters

AgentRuntimeInput.reasoningEffort


optional resumeAdapterSessionId?: string

Defined in: ../../../adapters/core/src/agent/types.ts:182

Previous adapter session ID for resume attempts (from recovery).


optional sessionId?: string

Defined in: ../../../adapters/core/src/agent/types.ts:174

Makaio session identifier


optional toolLedger?: ISessionToolLedger

Defined in: ../../../adapters/core/src/agent/types.ts:216

Session-scoped ledger tracking MCP injection/discovery/call history. Created once per agent session and passed through unchanged on connector swaps.