Skip to content

Configuration

AgentCTX is configured through three layers: the actx.yaml config file, environment variables, and optional secrets management via 1Password.

Created by actx init, this file lives at .context/actx.yaml in your project root.

version: "0.1.0"
project: my-agent-project
# MCP backend servers
backends:
- id: github
cmd: "npx -y @modelcontextprotocol/server-github"
roles: [code, issues]
transport: stdio
lazy: true
- id: filesystem
cmd: "npx -y @modelcontextprotocol/server-filesystem /workspace"
roles: [files]
transport: stdio
# Context planes
planes:
tools:
enabled: true
knowledge:
enabled: true
sources: ["docs/", "src/"]
skills:
enabled: true
sources: [".agent/"]
memory:
enabled: true
# Entry points (for non-MCP clients)
entry:
httpPort: 3100
tcpPort: 3101
httpEnabled: true
tcpEnabled: true

Each backend entry defines an MCP server:

FieldTypeDefaultDescription
idstringrequiredUnique identifier for the backend
cmdstringrequiredCommand to spawn the server
rolesstring[]["default"]Role scoping — limits which tools agents can access
transportstring"stdio"Transport type: stdio, sse, or http
lazybooleantrueIf true, server spawns on first tool query
cwdstringWorking directory for the command
PlaneSourcesDescription
toolsAlways available. Discovers tools from registered backends
knowledgedirectoriesIndexes files from specified source directories
skillsdirectoriesLoads .md skill files from specified paths
memoryPersistent storage. Requires SurrealDB for cross-session

Environment variables override actx.yaml settings and configure infrastructure connections.

VariableDefaultDescription
SURREAL_URLhttp://localhost:8000SurrealDB connection URL
SURREAL_NSagentctxSurrealDB namespace
SURREAL_DBmainSurrealDB database name
SURREAL_USERrootSurrealDB username
SURREAL_PASSrootSurrealDB password
VariableDefaultDescription
NATS_URLnats://localhost:4222NATS server URL
NATS_MONITOR_URLhttp://localhost:8222NATS monitoring endpoint
VariableDescription
ANTHROPIC_API_KEYAnthropic API key (for ctx-gateway LLM interception)
OPENAI_API_KEYOpenAI API key (for ctx-gateway LLM interception)
VariableDefaultDescription
NODE_ENVdevelopmentSet to production for optimized builds
MOCK_MCP_URLURL of mock MCP backend (development/testing)

AgentCTX integrates with 1Password for secure credential storage.

Terminal window
# Configure 1Password Service Account
actx auth
# Or set the token directly
export OP_SERVICE_ACCOUNT_TOKEN=ops_...

With a valid Service Account token:

  • actx init fetches the project salt from 1Password vault instead of generating a local one
  • Credentials are never stored in plaintext on disk
  • The encrypted token is stored at .context/.keys/sa-token.enc

Without 1Password:

  • A local project.salt file is generated (suitable for development)
  • A warning is displayed on startup

Configuration values can reference 1Password vault items using the op:// prefix:

backends:
- id: production-db
cmd: "node db-server.js"
env:
DATABASE_URL: "op://Infrastructure/production-db/url"
.context/
├── actx.yaml # Gateway configuration
├── .keys/
│ ├── ed25519.key # Agent signing keypair (Ed25519)
│ ├── ed25519.pub # Public key
│ ├── project.salt # Convergent encryption salt
│ └── sa-token.enc # 1Password SA token (encrypted)
├── objects/ # Content-addressed store (SHA-256)
├── refs/ # Reference pointers
├── translations/ # Signed sidecar translations
└── logs/ # Operation audit logs