Skip to main content
Complete reference for SDK configuration. Config is loaded from inline options, apie.config.ts / apie.config.py / apie.config.json, and environment variables.

Environment variables

VariableRequiredDefault
APIE_API_KEYYes (when enabled)
APIE_BASE_URLNohttp://localhost:3000

Config file discovery

The SDK loads config from (in order):
  1. Inline options passed to new Apie() / Apie.create()
  2. apie.config.ts, apie.config.js, apie.config.mjs, or apie.config.json
  3. Environment variables

Agent identity

FieldTypeScriptPythonRequired
Agent keyagent.keyagent.keyYes
Agent nameagent.nameagent.nameYes
Purposeagent.purposeagent.purposeNo
Owneragent.owneragent.ownerNo
Teamagent.teamagent.teamNo
Descriptionagent.descriptionagent.descriptionNo

Runtime metadata

FieldTypeScriptPython
Environmentruntime.environmentruntime.environment
Frameworkruntime.frameworkruntime.framework
Languageruntime.languageruntime.language
SDK versionruntime.sdkVersionruntime.sdk_version

Model and version

FieldTypeScriptPython
Model providermodel.providermodel.provider
Model namemodel.namemodel.name
Versionversion.versionversion.version
Git SHAsource.gitShasource.git_sha
Deployment IDsource.deploymentIdsource.deployment_id
Prompt hashpromptHashprompt_hash

Monitor and Enforce behavior

FieldTypeScriptPythonDefault
Modemodemode"monitor"
Enabledenabledenabledtrue
Guard failure modeguardFailureModeguard_failure_mode"fail_open"
Approval timeoutapprovalTimeoutMsapproval_timeout_ms300000 (5 min)

Capabilities and tools

FieldTypeScriptPython
Capabilitiescapabilities[]capabilities[]
Toolstools[]tools[]
See Declare capabilities.

Boundary tuning

FieldTypeScriptPythonDefault
Warn on undeclared toolsboundary.warnOnUndeclaredToolsboundary.warn_on_undeclared_toolsfalse
Warn on unknown resourcesboundary.warnOnUnknownResourceTypesboundary.warn_on_unknown_resource_typesfalse
Auto-infer from tool namesboundary.autoInferFromToolNamesboundary.auto_infer_from_tool_namesfalse

Event queue

FieldTypeScriptPythonDefault
Flush intervalflushIntervalMsflush_interval_ms2000
Max batch sizemaxBatchSizemax_batch_size25
Max queue sizemaxQueueSizemax_queue_size5000
Retry attemptsretryAttemptsretry_attempts3
Retry base delayretryBaseDelayMsretry_base_delay_ms250
Queue storage pathqueueStoragePathqueue_storage_pathnone
Drop policyqueueDropPolicyqueue_drop_policy"drop_oldest"
Idempotency keyqueueIdempotencyKeyqueue_idempotency_keynone
On erroronErroron_error"warn"

Redaction

FieldTypeScriptPython
Custom redact fnredactredact
Redact keysredactKeysredact_keys
Allow pathsredactAllowPathsredact_allow_paths
Deny patternsredactDenyPatternsredact_deny_patterns
Max payload bytesmaxEventPayloadBytesmax_event_payload_bytes

HTTP

FieldTypeScriptPythonDefault
API keyapiKeyapi_keyfrom env
Base URLbaseUrlbase_urlfrom env
Timeouttimeouttimeout
Custom headersheadersheaders{}
Custom fetchfetchnative fetch (JS only)

MCP proxy config (apie.mcp.json)

FieldDescription
agentKeyAgent key
serverNameMCP server namespace
modemonitor or enforce
environmentEnvironment tag
upstream.commandUpstream MCP server command
upstream.argsUpstream MCP server args
redactKeysKeys to redact from events
approvalTimeoutMsApproval wait timeout
serversMulti-server config map
Python accepts camelCase aliases for all config fields.