Interface: AIAgentConfig<TBus, TConnector>
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.
Extends
Section titled “Extends”Omit<AgentIdentity,"adapterSessionId">.AgentRuntimeInput
Type Parameters
Section titled “Type Parameters”TBus extends ScopedBus<string> = ScopedBus<string>
The scoped bus type for this adapter
TConnector
Section titled “TConnector”TConnector extends AIAgentConnector<TBus> = AIAgentConnector<TBus>
The connector type (for proper factory return typing)
Properties
Section titled “Properties”adapterBus
Section titled “adapterBus”adapterBus:
TBus
Defined in: ../../../adapters/core/src/agent/types.ts:190
Scoped bus for adapter-specific events
adapterId
Section titled “adapterId”adapterId:
string
Defined in: ../../../adapters/core/src/agent/types.ts:26
Adapter instance identifier
Inherited from
Section titled “Inherited from”adapterName
Section titled “adapterName”adapterName:
string
Defined in: ../../../adapters/core/src/agent/types.ts:28
Adapter type name (e.g., ‘claude-code’, ‘gemini-sdk’)
Inherited from
Section titled “Inherited from”adapterSessionId?
Section titled “adapterSessionId?”
optionaladapterSessionId?:string
Defined in: ../../../adapters/core/src/agent/types.ts:172
Adapter-specific session identifier for multi-turn conversations
agentId
Section titled “agentId”agentId:
string
Defined in: ../../../adapters/core/src/agent/types.ts:24
Unique agent identifier
Inherited from
Section titled “Inherited from”allowedDirectories?
Section titled “allowedDirectories?”
optionalallowedDirectories?:string[]
Defined in: ../../../adapters/core/src/agent/types.ts:206
Directory restrictions for file-system tool execution.
allowedTools?
Section titled “allowedTools?”
optionalallowedTools?:string[]
Defined in: ../../../adapters/core/src/agent/types.ts:202
Allowed tool names (adapter-specific). Empty array = disable all tools.
availableModels?
Section titled “availableModels?”
optionalavailableModels?:object[]
Defined in: ../../../adapters/core/src/agent/types.ts:198
Available models for this adapter (used for context window lookup)
contextWindowSize
Section titled “contextWindowSize”contextWindowSize:
number
Maximum context window size in tokens.
family?
Section titled “family?”
optionalfamily?:string
Model family name (e.g., ‘opus’, ‘sonnet’, ‘gpt-4o’). Used for alias resolution and UI grouping.
friendlyName?
Section titled “friendlyName?”
optionalfriendlyName?:string
Human-readable display name (e.g., ‘Sonnet 4.5’, ‘GPT-4o’).
labId:
string
Lab that created this model (e.g., ‘anthropic’, ‘openai’, ‘google’).
metadata?
Section titled “metadata?”
optionalmetadata?:object
Supplementary metadata from rich provider APIs (pricing, capabilities, etc.). Not used for routing or adapter logic — purely informational.
metadata.capabilities?
Section titled “metadata.capabilities?”
optionalcapabilities?:object
Provider-scoped capabilities for this model offering.
metadata.capabilities.parallelToolCalls?
Section titled “metadata.capabilities.parallelToolCalls?”
optionalparallelToolCalls?:boolean
Whether multiple tool calls can be issued in a single turn.
metadata.capabilities.pdfUpload?
Section titled “metadata.capabilities.pdfUpload?”
optionalpdfUpload?:boolean
Whether the provider accepts PDF file uploads.
metadata.capabilities.speechToText?
Section titled “metadata.capabilities.speechToText?”
optionalspeechToText?:object
Speech-to-text capability descriptor.
metadata.capabilities.speechToText.modes
Section titled “metadata.capabilities.speechToText.modes”modes: (… | …)[]
Supported transcription modes.
metadata.capabilities.speechToText.vocabularyBiasing?
Section titled “metadata.capabilities.speechToText.vocabularyBiasing?”
optionalvocabularyBiasing?:boolean
Whether the model supports vocabulary/terminology biasing. Optional by design because model metadata can be partial, unlike provider runtime capabilities.
metadata.capabilities.structuredOutput?
Section titled “metadata.capabilities.structuredOutput?”
optionalstructuredOutput?:boolean
Whether the provider supports structured (JSON schema) output.
metadata.capabilities.textToSpeech?
Section titled “metadata.capabilities.textToSpeech?”
optionaltextToSpeech?:object
Text-to-speech capability descriptor.
metadata.capabilities.textToSpeech.modes
Section titled “metadata.capabilities.textToSpeech.modes”modes: (… | …)[]
Supported synthesis modes.
metadata.capabilities.textToSpeech.outputFormats?
Section titled “metadata.capabilities.textToSpeech.outputFormats?”
optionaloutputFormats?: …[]
Supported output audio formats. Optional because metadata may omit it.
metadata.capabilities.textToSpeech.voiceInstructions?
Section titled “metadata.capabilities.textToSpeech.voiceInstructions?”
optionalvoiceInstructions?: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?”
optionalvoiceSelection?:boolean
Whether the user can select a voice preset. Optional because model metadata may omit it.
metadata.capabilities.toolCalling?
Section titled “metadata.capabilities.toolCalling?”
optionaltoolCalling?:boolean
Whether the provider’s API supports tool/function calling.
metadata.capabilities.vision?
Section titled “metadata.capabilities.vision?”
optionalvision?:boolean
Whether the model accepts image inputs.
metadata.description?
Section titled “metadata.description?”
optionaldescription?:string
Optional description of the model *
metadata.includedInSubscription?
Section titled “metadata.includedInSubscription?”
optionalincludedInSubscription?:boolean
Whether this model is included in the provider’s subscription plan.
metadata.maxOutputTokens?
Section titled “metadata.maxOutputTokens?”
optionalmaxOutputTokens?:number
Maximum output tokens the provider allows for this model.
metadata.pricing?
Section titled “metadata.pricing?”
optionalpricing?:object
Token pricing for this model offering.
metadata.pricing.request?
Section titled “metadata.pricing.request?”
optionalrequest?:object
Per-request pricing (GitHub Copilot premium requests, etc.).
metadata.pricing.request.multiplier
Section titled “metadata.pricing.request.multiplier”multiplier:
number
Cost per request in provider billing units (0 = free).
metadata.pricing.token?
Section titled “metadata.pricing.token?”
optionaltoken?:object
Per-token pricing (Anthropic direct, OpenAI direct, etc.).
metadata.pricing.token.cacheWritePerMillion?
Section titled “metadata.pricing.token.cacheWritePerMillion?”
optionalcacheWritePerMillion?:number
Cost per million cache-write input tokens (USD).
metadata.pricing.token.inputCachedPerMillion?
Section titled “metadata.pricing.token.inputCachedPerMillion?”
optionalinputCachedPerMillion?:number
Cost per million cache-read input tokens (USD).
metadata.pricing.token.inputPerMillion
Section titled “metadata.pricing.token.inputPerMillion”inputPerMillion:
number
Cost per million input tokens (USD).
metadata.pricing.token.outputPerMillion
Section titled “metadata.pricing.token.outputPerMillion”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’).
supportedReasoningLevels?
Section titled “supportedReasoningLevels?”
optionalsupportedReasoningLevels?:object
Maps supported reasoning levels to provider-native values. When omitted, the model does not support extended thinking / reasoning.
supportedReasoningLevels.extra-high?
Section titled “supportedReasoningLevels.extra-high?”
optionalextra-high?:string|number=reasoningLevelValue
supportedReasoningLevels.high?
Section titled “supportedReasoningLevels.high?”
optionalhigh?:string|number=reasoningLevelValue
supportedReasoningLevels.low?
Section titled “supportedReasoningLevels.low?”
optionallow?:string|number=reasoningLevelValue
supportedReasoningLevels.medium?
Section titled “supportedReasoningLevels.medium?”
optionalmedium?:string|number=reasoningLevelValue
supportedReasoningLevels.none?
Section titled “supportedReasoningLevels.none?”
optionalnone?:string|number=reasoningLevelValue
capabilities
Section titled “capabilities”capabilities:
string[]
Defined in: ../../../adapters/core/src/agent/types.ts:194
Adapter capabilities (e.g., [‘streaming’, ‘tools’, ‘vision’])
clientId?
Section titled “clientId?”
optionalclientId?: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
Section titled “configFactory”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).
Parameters
Section titled “Parameters”ConfigFactoryInput<TBus>
Returns
Section titled “Returns”Promise<BaseAgentConnectorConfig<TBus, object> & object>
connectorFactory
Section titled “connectorFactory”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).
Parameters
Section titled “Parameters”config
Section titled “config”BaseAgentConnectorConfig<TBus, object> & object
Returns
Section titled “Returns”TConnector | Promise<TConnector>
optionalcwd?:string
Defined in: ../../../adapters/core/src/agent/types.ts:40
Working directory for agent execution (optional - platform provides default)
Inherited from
Section titled “Inherited from”AgentRuntimeInput.cwd
disallowedTools?
Section titled “disallowedTools?”
optionaldisallowedTools?:string[]
Defined in: ../../../adapters/core/src/agent/types.ts:204
Disallowed tool names (adapter-specific). Takes precedence over allowedTools.
optionalenv?:Record<string,string>
Defined in: ../../../adapters/core/src/agent/types.ts:42
Environment variables to pass to agent execution
Inherited from
Section titled “Inherited from”AgentRuntimeInput.env
ephemeral?
Section titled “ephemeral?”
optionalephemeral?: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.
globalBus?
Section titled “globalBus?”
optionalglobalBus?:IMakaioBus
Defined in: ../../../adapters/core/src/agent/types.ts:188
Global bus instance (defaults to MakaioBus singleton)
harnessId?
Section titled “harnessId?”
optionalharnessId?:string
Defined in: ../../../adapters/core/src/agent/types.ts:184
Resolved harness ID for tool policy lookup.
mcpSessionContext?
Section titled “mcpSessionContext?”
optionalmcpSessionContext?: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.
model?
Section titled “model?”
optionalmodel?:string
Defined in: ../../../adapters/core/src/agent/types.ts:38
Model to use (optional - adapter provides default)
Inherited from
Section titled “Inherited from”AgentRuntimeInput.model
nativeTools
Section titled “nativeTools”nativeTools:
string[]
Defined in: ../../../adapters/core/src/agent/types.ts:196
Native tools built into the adapter (e.g., [‘shell_command’, ‘apply_patch’])
providerContext?
Section titled “providerContext?”
optionalproviderContext?: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().
credentialEnvVars?
Section titled “credentialEnvVars?”
optionalcredentialEnvVars?:Record<string,string>
Maps credential keys to environment variable names for subprocess adapters.
E.g., { apiKey: 'ANTHROPIC_API_KEY' }.
credentialRefs
Section titled “credentialRefs”credentialRefs:
Record<string,string&$brand<"CredentialRef">>
Credential references resolved at the connector layer, not on the bus.
definitionId
Section titled “definitionId”definitionId:
string
Provider definition ID (e.g., 'anthropic', 'alibaba').
endpointOverrides?
Section titled “endpointOverrides?”
optionalendpointOverrides?:object
Endpoint URL overrides keyed by protocol.
endpointOverrides.anthropic?
Section titled “endpointOverrides.anthropic?”
optionalanthropic?:string
endpointOverrides.openai?
Section titled “endpointOverrides.openai?”
optionalopenai?:string
providerConfigId
Section titled “providerConfigId”providerConfigId:
string
Provider config UUID. Links back to the ProviderConfig that produced this context.
reasoningEffort?
Section titled “reasoningEffort?”
optionalreasoningEffort?:"none"|"low"|"medium"|"high"|"extra-high"
Defined in: ../../../adapters/core/src/agent/types.ts:44
Reasoning effort for supporting adapters
Inherited from
Section titled “Inherited from”AgentRuntimeInput.reasoningEffort
resumeAdapterSessionId?
Section titled “resumeAdapterSessionId?”
optionalresumeAdapterSessionId?:string
Defined in: ../../../adapters/core/src/agent/types.ts:182
Previous adapter session ID for resume attempts (from recovery).
sessionId?
Section titled “sessionId?”
optionalsessionId?:string
Defined in: ../../../adapters/core/src/agent/types.ts:174
Makaio session identifier
toolLedger?
Section titled “toolLedger?”
optionaltoolLedger?: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.