Skip to content

Architecture

Agent Forge uses a three-layer design. The API Gateway depends only on the AgentRuntime abstract interface, so adding a new adapter (ADK, LangGraph) requires zero gateway changes.

Frontend (React/Vite)  →  API Gateway (FastAPI)  →  Agent Runtime
                                │                       │
                    ┌───────────┼───────────┐           │
                    │           │           │           │
               SQLite/DB   OTel Export   LLM API   DirectLLMAdapter
                                                  (DeepSeek, SSE streaming)

Layers

Frontend (React SPA)

React 18 + Vite + TypeScript + recharts. A custom CSS design system (no third-party UI library) with dark/light theming. Shared components: Modal, Toast, ConfirmDialog, Dropdown, Select, EmptyState, Skeleton.

API Gateway (FastAPI)

Handles auth (JWT, OIDC stub), RBAC permission checks, audit logging, and quota enforcement. Routes live under src/gateway/routes/.

Agent Runtime

Pluggable adapters behind the AgentRuntime ABC (src/runtime/abc.py). The runtime emits StreamEvent objects (src/runtime/models.py) that the gateway streams to the client over SSE.

ComponentPathResponsibility
AgentRuntime ABCsrc/runtime/abc.pyAbstract execution interface
RunAdapter ABCsrc/runtime/adapters/Per-framework adapter contract
DirectLLMAdaptersrc/runtime/adapters/DeepSeek via OpenAI-compatible API, SSE
Harnesssrc/runtime/harness/Guardrail pipeline, sandbox, tools, retry, circuit breaker

Observability

Telemetry lives under src/infra/telemetry/: a collector, spans, metrics, logs, an OTLP exporter, and a quota guardrail. Traces and metrics surface in the dashboard.

Data Model

SQLAlchemy async engine with ~10 ORM models in src/infra/db/models.py, backed by SQLite (configurable).

See the master design spec for the full architecture document.

Released under the MIT License.