How imkcrevit/revit-api-rag works
This is Revit API RAG: a web workbench and service that helps users retrieve Revit API/SDK knowledge, generate or execute Revit code, and use adjacent text and skill tools. The main workflow runs from a selected UI tab through its service route, then retrieval/LLM processing and (for bridge operations) a Revit connection. The graph also preserves the documented data-preparation pipeline and separate product capabilities. Some routes and integrations are documented rather than fully sampled, so those links cite the README; unsampled details are not inferred.
Main entry points: llm_client.py LLM Client · routes.py Core API · service.py RAG Generation · router.py MCP Bridge
Components 26
Web Workbench
- React Workbench
frontend/src/App.tsx - Product Tabs
frontend/src/components/tabs - API Client
frontend/src/api/client.ts
Application Services
- FastAPI Server
server/main.py - Core API
server/app/api/routes.py - RAG Generation
server/app/rag/service.py - Text to Revit
server/app/text2revit/service.py - Streaming Responses
server/app/api/streaming.py - MCP Bridge
mcp_bridge/router.py - Intent Interaction
mcp_bridge/interactive.py - Prompt Bridge
prompt_bridge/service.py - Text Studio
text_studio/service.py - Intent Slot Engine
intent_bridge/slot_engine.py
RAG Knowledge
- RAG Retriever
pipeline/retriever.py - LLM Client
pipeline/llm_client.py - API Parser
pipeline/api_parser - SDK Parser
pipeline/sdk_parser - Embedding Builder
pipeline/embedder/embed.py
Revit Runtime
- Revit Client
mcp_bridge/revit_client.py - Revit Plugin
revit_plugin/plugin/Core/Application.cs - Revit Commands
revit_plugin/commandset/Commands/ExecuteDynamicCode/ExecuteCodeCommand.cs
Skills and State
- Skill Management
server/app/skill_store.py - Session State
server/app/session.py - Interaction Logs
server/app/log_store.py
Other components
- User
- Revit
Connections 33
- User → React Workbench: uses
README.md - React Workbench → Product Tabs: renders
frontend/src/App.tsx - Product Tabs → API Client: requests
- React Workbench → FastAPI Server: serves UI
server/main.py - FastAPI Server → Core API: registers
server/main.py - Core API → RAG Generation: dispatches
server/app/api/routes.py - RAG Generation → RAG Retriever: retrieves context
- RAG Generation → Streaming Responses: streams output
server/app/rag/service.py - Core API → Text to Revit: dispatches
server/app/api/routes.py - Text to Revit → Streaming Responses: streams output
server/app/text2revit/service.py - RAG Retriever → LLM Client: rewrites queries
pipeline/retriever.py - API Parser → Embedding Builder: prepares API data
README.md - SDK Parser → Embedding Builder: prepares code data
README.md - Embedding Builder → RAG Retriever: builds vectors
README.md - User → MCP Bridge: requests bridge work
README.md - MCP Bridge → Intent Interaction: dispatches intent
mcp_bridge/router.py - Intent Interaction → Revit Client: queries Revit
mcp_bridge/interactive.py - MCP Bridge → RAG Retriever: loads RAG context
mcp_bridge/router.py - MCP Bridge → LLM Client: generates code
mcp_bridge/router.py - Revit Client → Revit Plugin: connects TCP/WS
README.md - Revit Plugin → Revit Commands: executes commands
- Revit Commands → Revit: operates model
README.md - User → Intent Slot Engine: describes task
README.md - Intent Slot Engine → LLM Client: resolves slots
intent_bridge/slot_engine.py - Intent Slot Engine → Skill Management: loads skill context
intent_bridge/slot_engine.py - User → Prompt Bridge: asks for prompt help
README.md - Prompt Bridge → LLM Client: streams chat
prompt_bridge/service.py - User → Text Studio: submits text
README.md - Text Studio → LLM Client: translates or edits
text_studio/service.py - Text Studio → Skill Management: loads standards
text_studio/service.py - RAG Generation → Session State: uses session
server/app/rag/service.py - Core API → Interaction Logs: records interactions
server/app/api/routes.py - User → Skill Management: manages skills