Architecture at a Glance
Every deployment mode shares the same thin-client architecture. Your AI runtime talks tofracta serve over stdio; fracta serve forwards requests to the control plane over HTTP. The control plane owns agent lifecycle, and the gateway provides MCP tools to agents.
How Your AI CLI Connects to Fracta
Each runtime reads its MCP server config from a specific file:| Runtime | Config file | Config key |
|---|---|---|
| Claude | .mcp.json | mcpServers.fracta |
| Codex | .codex/config.toml | [mcp_servers.fracta] |
| OpenCode | opencode.json | mcp.fracta |
bin/fracta serve --config <path>. The config path determines which deployment mode the thin client connects to.
Each scaffold (fracta init --scaffold <mode>) materializes the deployment artifacts you’ll edit (fracta.yaml, deployment/). The runtime CLI configuration that wires fracta into Claude / Codex / OpenCode lives at the project root (.mcp.json for Claude, .codex/config.toml for Codex, opencode.json for OpenCode). The simplest version of those configs runs fracta serve from the project root:
fracta serve reads ./fracta.yaml from your project root by default, so the same minimal runtime config works regardless of which scaffold you initialized. Wrap the command with your secret manager (op run --, doppler run --, etc.) if you need to inject host-side env vars.
After editing, restart your AI CLI (or /mcp in Claude Code) to reconnect.
How Credentials Work
There are two separate credential flows. Confusing them is the most common setup mistake.1. LLM Runtime Credentials
These authenticate agents to their LLM provider (Bedrock, OpenAI). They are configured infracta.yaml and resolved at spawn time.
| Runtime | LLM Provider | Mechanism | Key config |
|---|---|---|---|
| Claude | Bedrock | auth_profile: bedrock — a runtime auth resolver runs a command to get a bearer token, injected via claude_api_key_helper into .fracta/user-settings.json | Required env: CLAUDE_CODE_USE_BEDROCK, AWS_REGION |
| Codex | OpenAI | OPENAI_API_KEY env var, from host env or K8s Secret | Set in agents.agent_runtimes.codex.env |
| OpenCode | Bedrock | Bearer token materialized at spawn time, injected as AWS_BEARER_TOKEN_BEDROCK env var | auth_profile: opencode_bedrock with bearer_env binding |
- Local process: on your machine (e.g.
bedrock-auth-helper) - Docker Compose / K8s: inside the container/pod (e.g.
fetch-bedrock-tokenscript calling a corporate proxy)
2. MCP Server API Credentials
These authenticate MCP backend tools (Elasticsearch, VendorSecurity, etc.) to their external APIs. They are completely separate from LLM credentials. The injection pattern differs by deployment mode:| Variable | Used by | Purpose |
|---|---|---|
ELASTIC_URL | elastic-mcp | Elasticsearch cluster URL |
ELASTIC_API_KEY | elastic-mcp | Elasticsearch API key |
VENDOR_MCP_CONSOLE_BASE_URL | vendor-mcp | VendorSecurity console URL |
VENDOR_MCP_CONSOLE_TOKEN | vendor-mcp | VendorSecurity API token |
op run, doppler run, vault exec, or plain export. The repo defaults to 1Password (op) but nothing in fracta requires it.
Without MCP server credentials, agents still get graph tools, strategy tools, and fracta lifecycle tools — they just can’t query Elasticsearch or VendorSecurity.
Deployment Modes
Fracta runs in three modes. All share the thin-client architecture above.Which mode should I use?
Prerequisites
| Prerequisite | Local Process | Docker Compose | Kubernetes |
|---|---|---|---|
| Go 1.25+ | Yes | Yes | Yes |
| Docker | For FalkorDB | Yes (with Compose V2) | Yes |
| kubectl | No | No | Yes |
| Local K8s cluster | No | No | Yes |
op CLI (1Password) | Optional | Optional | Optional |
| Runtime CLI (claude/codex/opencode) | Yes (on host) | No (in container) | No (in container) |
Quickstarts
Follow these in order of complexity:- Local Process Quickstart — Build fracta, start FalkorDB, spawn your first agent. Everything runs on your machine. (~10 min)
- Docker Compose Quickstart — Build the Docker image, start 7 services, spawn agents through the compose stack. (~15 min)
- Kubernetes Quickstart — Deploy to a local K8s cluster, spawn agents as K8s Jobs. (~20 min)
Reference Documentation
Once you’re up and running, these references cover the full depth:| Doc | What it covers |
|---|---|
| Deployment Modes | Architecture, config, and comparison for all three modes |
| Runtime Configuration | Claude, Codex, OpenCode adapter setup and K8s deployment |
| Credential Pipeline | Auth profiles, resolvers, bindings, and the three-layer model |
| Strategies | Python DAG pipelines for reusable investigation techniques |
| Contracts & Bindings | Strategy data requirements and MCP data source mapping |
| Local K8s Guide | Complete K8s runbook with troubleshooting |
| Event Bus | Internal event architecture |
| Logging | Structured JSON logging via fractalog |
Glossary
| Term | Definition |
|---|---|
| Control plane | The server that owns agent lifecycle: spawn, kill, queue, state, reaper |
| Gateway | HTTP MCP server that proxies backend tools (Elastic, Vendor) and provides graph/strategy tools to agents |
| Thin client | fracta serve running on your machine — a lightweight stdio-to-HTTP bridge |
| MCP | Model Context Protocol — the standard for connecting AI tools to LLM runtimes |
| Runtime | An LLM CLI adapter (Claude, Codex, OpenCode) that fracta can spawn agents with |
| Adapter | The Go implementation that translates fracta operations into runtime-specific commands |
| Auth profile | A named credential configuration under auth.credentials.profiles in fracta.yaml |
| Binding | How a resolved credential is delivered to the agent (env var, file, settings.json helper) |
| Strategy | A reusable Python DAG pipeline that fetches data via MCP, transforms it, and produces findings |
| Reaper | Background process that cleans up stale/completed agents |

