# V2 Architecture

> Foundry V2 pivots from a single-threaded "Supervisor" to a parallel, safety-first industrial control plane.

Source: https://bifrost5.com/foundry/docs/v2-architecture/

# V2: Industrial Architecture

Information

Add your own AI tool, more ways to steer and a cloud backup to this core with Production-Grade.

[See editions](/foundry/docs/editions)

Foundry V2 pivots from a single-threaded "Supervisor" to a **parallel, safety-first industrial control plane**.

## Core Philosophy Shifts

| Area | V1 | V2 |
| --- | --- | --- |
| **Execution** | Sequential (FIFO Queue) | **Parallel DAG** (Ready/Waiting Queues) |
| **Safety** | Implicit (Trust the Prompt) | **Explicit Middleware** (Command Sanitization) |
| **Memory** | Redis-only (Strict) | **Hybrid Persistence** (Redis + JSON Fallback planned) |
| **Routing** | Single provider | **Strategy Chains** (task → best-fit model) |

## Module Status

- **Parallel Scheduler**: Complete. Dual-queue system, 3-worker pool, git worktree isolation, file locking with exponential backoff.

- **Model Routing**: Complete. Tasks specify tool or strategy decides. 3 built-in strategies + custom via UI.

- **Safety Layer**: Partial. Read-only command whitelist and blocked patterns exist. Full middleware pipeline (ToolMiddleware interface, secret redaction, UI approval modal) planned.

- **Hybrid Memory**: Partial. Redis primary works. JSON fallback sync and auto-discovery planned for portability.

- **MCP Integration**: Dropped by design. MCP tools consume too much context window. Custom tool wrappers are sufficient and context-efficient.

## Key Design Decision: No Vector Memory

Foundry explicitly rejects vector/embedding-based "long-term memory." Code changes rapidly: vector embeddings from days ago create "ghost code" hallucinations. Foundry prioritizes **ground truth** (`grep`, `ls`, fresh file reads) over fuzzy semantic retrieval.
