DEV Community

Weber Gouin
Weber Gouin

Posted on

I Built a Production Agent Framework for Claude Code -- 17 Sub-Agents, Persistent Memory, and Desktop Automation

I'm a BIM (Building Information Modeling) automation specialist. Every day I work with Revit models, construction documents, cost spreadsheets, and client presentations. A few months ago, I started using Claude Code and quickly realized it could do far more than write code -- if I gave it the right tools.

The problem: Claude Code is powerful out of the box, but it forgets everything between sessions, can't control desktop apps, has no safety rails for destructive operations, and runs agents without any structured methodology.

So I built Agent Forge -- an open-source framework that turns Claude Code into a full production agent system.

Repo: github.com/WeberG619/agent-forge

What It Actually Does

Here's a real example from my workflow:

me: Open the project spreadsheet, pull the cost data, and build a summary deck

Claude Code --- delegating to orchestrator agent
  |-- memory_smart_recall("project spreadsheet, cost data")
  |   |-- Found: project_costs.xlsx on D:\Projects\TAJ
  |
  |-- launching sub-agent: excel-automation
  |   |-- open_workbook("project_costs.xlsx")
  |   |-- read_range("Sheet1", "A1:F48")
  |   |-- Extracted 48 line items, $2.4M total
  |
  |-- launching sub-agent: powerpoint-builder
  |   |-- create_presentation()
  |   |-- add_slide("Cost Summary", table_data)
  |   |-- save_as("TAJ_Cost_Summary.pptx")
  |
  |-- voice: "Done. 3-slide deck saved. Total budget is 2.4 million."

Task complete in 34 seconds
Enter fullscreen mode Exit fullscreen mode

That's not a mockup. That's the actual system I use every day.

The Architecture

Agent Forge plugs into Claude Code through three extension points that already exist:

  1. CLAUDE.md -- Configuration file loaded every session. This is where the framework, memory, and agent definitions live.
  2. MCP Servers -- Model Context Protocol servers that give Claude new capabilities (Excel, browser, voice, memory).
  3. Hooks -- Lifecycle hooks that fire on events like session start, pre-commit, and user messages.

Key Components

1. Strong Agent Framework

Every sub-agent follows a 5-phase execution pattern:

  1. Orient -- Parse the task, assess scope, rate confidence
  2. Investigate -- Read files, search patterns, map dependencies
  3. Execute -- Make changes in small steps, match existing style
  4. Verify -- Test, screenshot, confirm results
  5. Report -- Summarize results, store learnings in memory

This isn't just structure for structure's sake. Before I added this, agents would dive straight into execution, miss edge cases, and produce inconsistent results. The framework forces thoroughness.

2. Persistent Memory

Claude Code has no built-in memory between sessions. Agent Forge adds a SQLite-backed memory system with:

  • Corrections -- When Claude makes a mistake and the user corrects it, the correction is stored and recalled before similar future actions
  • Facts -- Project paths, file locations, user preferences
  • Decisions -- Architectural choices, design decisions with rationale
  • Semantic search -- Find relevant memories even when phrased differently

3. Common Sense Engine

Before every action, Claude runs a 3-step check:

  1. Classify -- Is this reversible? What's the blast radius?
  2. Check experience -- Search memory for similar past actions and corrections
  3. Simulate -- "If this goes wrong, what happens?"

If the action is irreversible AND unfamiliar, it stops and asks. If there's a past correction that matches, it applies it automatically.

This came from real pain. Early on, Claude would rm -rf directories, force-push to main, and overwrite files without asking. The common sense engine eliminated those incidents.

4. Desktop Automation

MCP servers that control desktop applications via COM automation (Windows) and browser CDP:

  • Excel -- Read/write cells, create charts, pivot tables, formulas
  • Word -- Generate documents from templates
  • PowerPoint -- Build presentations with data-driven slides
  • Browser -- Navigate, screenshot, click, type via Chrome DevTools Protocol
  • System Bridge -- Background daemon that tracks open apps, monitors, clipboard

5. Developer Workflow

  • 22 slash commands -- /commit, /delegate, /review-and-fix, /prime, /fix-and-commit
  • Safety hooks -- Pre-commit secret detection, MCP seatbelts
  • Auto-correction detection -- Hook that detects when the user is correcting Claude and stores it in memory

Installation

git clone https://github.com/WeberG619/agent-forge.git
cd agent-forge
./install.sh
Enter fullscreen mode Exit fullscreen mode

Three tiers available:

Tier What You Get
Minimal Framework + commands + agent definitions
Developer + Memory + voice + git hooks
Power User + Desktop automation + system bridge + all MCP servers

Why I Open-Sourced It

I built this for myself. It's the system that runs my professional workflow -- BIM automation, construction documents, client deliverables. But the core framework (memory, agents, common sense, commands) is useful for anyone using Claude Code professionally.

The BIM/CAD pieces are domain-specific, but the patterns are universal: give your AI persistent memory, structured execution, safety checks, and desktop control. That combination changes what's possible.

Repo: github.com/WeberG619/agent-forge
License: GPL-3.0

I'd genuinely love feedback. What would you build on top of this? What's missing?

Top comments (0)