Architecture overview
How AgenticMind is built. The monorepo, its subsystems and their dependency direction, the request flow of a run, and the principles behind the design.
Principles
AgenticMind’s architecture follows ten non-negotiable constraints:
- The canonical, versioned IR is the architecture source of truth.
- The first-party runtime is primary; framework integrations are adapters.
- Node contracts are typed, versioned and independent of the visual UI.
- Data edges and control-flow edges are distinct.
- Execution traces and evaluation results are first-class persisted records.
- Secrets are referenced, never embedded in IR, logs, traces or generated source.
- Project export is readable, modular and runnable locally.
- Cloud deployment is capability-aware; never claim every graph runs everywhere.
- Custom code executes with declared permissions and isolation.
- Every major subsystem has clear interfaces and tests.
Subsystems
apps/
├─ api/
└─ web/
packages/
├─ ir/
├─ node-sdk/
├─ node-registry/
├─ runtime/
├─ providers/
├─ vectorstores/
├─ compiler/
├─ deployment/
├─ plugins/
├─ evaluation/
├─ observability/
├─ sandbox/
└─ git/
nodes/
├─ core/
├─ data/
├─ rag/
├─ agents/
└─ semantic/
examples/
docs/
infra/docker/| Package | Responsibility |
|---|---|
apps/api |
FastAPI control plane: projects and revisions, validation, runs, SSE traces, files, memory, approvals, evaluation, deployment, plugins, settings, secrets, auth, triggers, MCP endpoint, metrics. Persistence with SQLAlchemy. |
apps/web |
React 18 + TypeScript + React Flow visual IDE. |
packages/ir |
Pydantic models of the graph, published JSON Schema, canonical serialization, content hashing, migrations, secret-reference helpers. Depends on nothing else. |
packages/node-sdk |
Port type system, NodeManifest, typed config, NodeContext/NodeResult, define_node, test helpers, the agenticmind-node CLI. |
packages/node-registry |
Discovers node packages through agenticmind.nodes entry points, indexes versions, assigns trust. |
packages/runtime |
Validation pipeline, execution planning, scheduler, retries, timeouts, cancellation, checkpoints, trace events, redaction, memory, artifacts, the agenticmind CLI and MCP server builder. |
packages/providers |
Chat and embedding provider adapters (OpenAI-compatible, Anthropic SDK, Gemini, Bedrock, fastembed, mock), streaming, retries. |
packages/vectorstores |
12 vector store adapters behind one contract. |
packages/compiler |
IR → standalone FastAPI project. |
packages/deployment |
Requirements, target checks, artifacts, hash-bound plans, Local Docker deployer. |
packages/plugins |
Wheel installation, permission approval, isolated workers. |
packages/evaluation |
Test cases, evaluators, LLM judge, runner, comparison. |
packages/observability |
Run → OpenTelemetry spans, OTLP export, Prometheus metrics. |
packages/sandbox |
Docker and process code execution. |
packages/git |
GitHub client and sync rules. |
nodes/* |
First-party node packages: core (inputs, transforms, control, LLM, guardrails, triggers, outputs), data, rag, agents, semantic. |
Dependency direction
flowchart RL sdk[node-sdk] --> ir reg[node-registry] --> sdk rt[runtime] --> reg api[apps/api] --> rt web[apps/web] -- HTTP --> api prov[providers] --> sdk nodes[nodes/*] --> prov reg -. entry points .-> nodes
Keeping the core free of web frameworks, databases and vendor SDKs means the same runtime embeds in the API, the CLI and exported apps.
Request flow: a run
- The IDE saves the canvas as a new revision (
PUT /api/projects/{id}). Drafts may be graph-invalid but must parse as IR. POST /api/projects/{id}/runsloads the revision, runs the validation pipeline, compiles an execution plan (422 with diagnostics if not executable), records a run with an IR snapshot and content hash, and queues a job.- A worker claims the job under a lease; the engine schedules nodes, emits redacted trace events (persisted with increasing
seq), stores outputs and checkpoints, and streams tokens. - The IDE subscribes to
GET /api/runs/{id}/events(SSE), colours nodes by status and shows the trace. Reconnection resumes fromLast-Event-ID. - Finish hooks update metrics and export the OpenTelemetry trace.
Persistence
SQLAlchemy 2 with SQLite as the zero-setup default and PostgreSQL via AGENTICMIND_DATABASE_URL. Projects store append-only revisions; runs snapshot the IR; events, node outputs, checkpoints, waits, stream chunks, run jobs, leases, memories, conversations, datasets, evaluations, deployments, settings and encrypted secrets are rows. Files live in a project-scoped artifact store on disk.
Read more
- The IR
- Runtime and execution semantics
- Node SDK
- Design decisions (all 41 ADRs summarised)
- Tech stack

