I have built an autonomous, self-healing AI swarm named The Foundry that operates entirely on local hardware. Now, I am putting it through a brutal 10-step polyglot gauntlet to see if it can master everything from React frontends to C++ and WebAssembly.
When I set out to build The Foundry, my goal was not just to create another AI coding assistant. I wanted an autonomous, self-healing multi-agent orchestrator capable of acting as an entire engineering team, including Architects, Implementers, Testers, and Mergers, all working together asynchronously. Today, I have hit a massive milestone. I have proven the system can work entirely independently, and I am about to put it through the ultimate engineering gauntlet.
What I have Built: The Foundry Foundation
1. The Autonomous Orchestrator and The Execution Plan
I built a highly parallel orchestration layer that handles complex feature epics. When an epic is ingested, the system generates a global overview file: .foundry/execution_plan.md. This plan maps out the entire objective and breaks it down into discrete, manageable subtasks. The orchestrator routes these subtasks dynamically to specialised agent personas. If a compilation or test fails, the Test Engineer hands the code back to the Implementer with strict Red-Green-Refactor constraints to fix the bug in place.
2. FinOps, Compute Offloading, and The Archivist Loop
AI agents hallucinate, get stuck in syntax loops, and burn tokens. To solve this, I designed a multi-tiered architecture backed by a Blue Brain Nexus knowledge graph that acts as the system deterministic memory and state engine. The Foundry features two distinct operating profiles:
Local-Only Mode: The swarm leverages the raw power of the host PC. Because it is not burning cash on third-party cloud APIs, the system is free to aggressively loop, self-correct, and iterate on code compilation. I built a strict fail-safe where if the local models hit a wall and loop more than X times, the system flags the task for human review.
Hybrid Escalation Mode: The system manages external API costs via a strict escalation path. If Tier 1 (local Ollama models) fails, it triggers an escalation to Tier 2 (Claude Sonnet or Gemini Flash). If Tier 2 fails, it pushes to Tier 3 (Claude Opus or Gemini Pro).
The Archivist persona is triggered to analyze failure logs and effectively train the lower-tier models, saving permanent new procedural memory into the Blue Brain Nexus graph.
3. Proving the Concept: The Focus Timer
To test the baseline logic, I unleashed the swarm on a Pomodoro App. Running strictly in local-only mode, the Foundry successfully scaffolded the Vite and React environment and implemented the countdown state logic.
The 10-Step Polyglot Gauntlet
Proving the Foundry can build a simple React app locally is a great baseline. Before I trust it to architect an entire production ecosystem, I have devised a brutal, 10-step polyglot curriculum to test every facet of computer science and system-level compilation:
Habit Tracker (React): Advanced UI and Zustand state sync.
Secure Note Vault (Node.js): REST API, SQLite, and Bcrypt.
Data ETL Pipeline (Python): Pandas-based data cleaning.
Concurrent Link Checker (Go): High-performance Goroutine networking.
Folder Watcher (Bash): OS event scripting.
Webhook Mock (Async): Complex asynchronous payload validation.
GUI to .exe (Python): Native Windows packaging via PyInstaller.
C++ System Utility: Manual memory management and CMake.
System Tray App (Rust/Tauri): Memory-safe backend integration.
Image Filter (WebAssembly): Pixel-manipulation written in Rust.
The Road Ahead
If The Foundry can survive this gauntlet, I will have successfully proven that a local-first, graph-grounded agent swarm can match the capabilities of a multi-language engineering department. The environment is primed, the graph is grounded, and the local models are ready to compile. Stay tuned, I am spinning up the swarm for Task 2. It is going to get wild.
