Revit AI BIM Assistant

Claude Code for architectural BIM — a Revit plugin that takes natural language instructions, builds context from the active model, plans and executes structural actions (walls, columns, beams, doors, windows), and self-corrects on failure. A full perception → planning → action → verification loop, applied to CAD.

What It Is

A Revit plugin paired with a FastAPI backend that lets architects and engineers describe what they want to build in plain language — and watches it happen. The system is genuinely agentic: it reads the model, asks clarifying questions when needed, plans a sequence of actions, executes them in a single Revit transaction, and recovers automatically from failures.

The Agent Loop

The parallel with Claude Code is exact:

  • Context scan (BuildBimContext): Before every request, the plugin inventories the active model — loaded column/beam families, wall types, active level, selected elements. This is the BIM equivalent of ls and grep.
  • Natural language instruction: The user types "add a load-bearing wall between these two columns" in an InputDialog.
  • Clarification loop (RunClarificationLoop): If the backend returns needs_clarification, the plugin opens a follow-up dialog, collects answers, and retries — up to 5 rounds.
  • Action planning → execution: The backend returns a list of ActionPayload objects (create_wall, create_column, create_beam, add_window, add_door…). ActionDispatcher.ExecuteAll() runs them inside a single Revit transaction — rollback-safe if anything throws.
  • Auto-correction: If any action fails (Status == "error"), the plugin automatically sends the ExecutionResults back to the backend. The LLM proposes a corrected plan, which runs as a second pass — without starting over.
  • Session memory: conversation_sessionHistory persists the full user/assistant thread for the entire Revit session. The backend is stateless; the plugin carries the context.
  • Summary: BuildSummary() groups completed actions by type ("• Wall × 3", "• Column × 2") and displays them at the end.

Why It Matters

Revit's API is notoriously complex — structural placement requires resolving family types, levels, constraint references, and geometric inputs simultaneously. Wrapping this in an LLM agent that handles ambiguity resolution, multi-step planning, and error recovery makes it genuinely useful for real workflows, not just demos.

The backend is backend-agnostic to the BIM domain — the same architecture could drive any CAD/BIM tool with an accessible API.

Plugin (GitHub) Backend (GitHub)