Architecture Overview
RTC Agent’s architecture consists of three parts: Browser / Frontend (virtual file system + Web Component), RTC Agent Server (Agent engine + context management + real-time communication), and LLM Provider (AI reasoning).
Full Architecture
Section titled “Full Architecture”Function Registry: Function metadata (name, parameter Schema, description) registered by developers via
agentConfigordefineRegistry, stored as Markdown files in the/functions/directory of the virtual file system. The Agent engine discovers available business capabilities by reading these files. See Skill System.
Core Design Principles
Section titled “Core Design Principles”| Principle | Implementation | User Value |
|---|---|---|
| 🔐 Privacy First | File operations execute on the frontend; data stored in IndexedDB | Sensitive data is never uploaded to the server |
| 🧩 File System as Interface | AI operates business logic via ls/read/write/grep | Developers only need to maintain Function documentation |
| ⚡ Real-Time Sync | Centrifuge dual-channel push | Users can see every step the AI takes |
| ♻️ Resilient Recovery | Redis Checkpoint + 100% delivery guarantee | Network disconnections and restarts are seamless |
Why “File System as Interface”? LLMs naturally understand file operations (
ls,cat,grep) — no need to learn custom APIs. Developers just write a Markdown document for each Function, and the Agent can automatically discover and compose calls — lower integration cost and higher observability compared to traditional RPC registration.
Request Processing Flow
Section titled “Request Processing Flow”Tech Stack
Section titled “Tech Stack”| Layer | Technology | Purpose |
|---|---|---|
| Backend | Go 1.27 | Main service language |
| Database | PostgreSQL + GORM | Persistent storage |
| Cache | Redis | Checkpoint, streaming buffer, Pub/Sub |
| Real-Time Communication | Centrifuge WebSocket | Bidirectional push |
| AI Framework | Anthropic SDK + Eino | Agent engine |
| Frontend | Lit Web Components | Componentized UI |
| Observability | OpenTelemetry + Jaeger + Prometheus | Tracing + Metrics |
Architecture Sub-Pages
Section titled “Architecture Sub-Pages”Next Steps
Section titled “Next Steps”- Frontend Architecture — Web Components system, state management, window system
- Backend Architecture — Go service layers, Agent engine, context management
- Remote Tool Calling — Learn how the core protocol works
- Protocol Overview — Full definition of the communication protocol