Reference Architectures
Trace the components, trust boundaries, evaluation gates, and operating choices behind production AI.
Governed RAG assistant
Changing enterprise knowledge with source-level permissions.
- 01
Identity & question
→ Next stage
- 02
Authorized retriever
→ Next stage
- 03
Versioned evidence
→ Next stage
- 04
Prompt + model
→ Next stage
- 05
Claim checks
→ Next stage
- 06
Answer + citations
↺ Feedback
Trust boundary
Filter by identity before retrieval; never rely on generation to hide unauthorized text.
Evaluation contract
Evidence recall, citation support, abstention, latency, cross-tenant leakage.
Deployment and rollback
Index, embedding model, chunker, prompt, model and policy versions roll back together.
Design exercise
Identify the owner and input/output artifact for each component. Add a timeout, a stale source, and a denied permission. Explain the expected system response and the evidence that proves it.
Reference design, not a deployed NextRun service. Arrows show the primary flow; authorization and telemetry apply across stages.
Framework source maps
These are analyses of public projects, not installed integrations or claims of runtime validation. Documentation and source reviewed September 26, 2026. Fast-moving projects require rechecking before adoption.
Hermes Agent · NousResearch · MIT
Personal-agent runtime with a gateway, persistent sessions, tool dispatch, memory, and reusable skills. Reviewed commit a9109b07f42685f88397008d0d5a6c3d481b3b28.
| Boundary | Public source / responsibility |
|---|---|
| Entry | gateway/run.py routes messages; run_agent.py exposes AIAgent |
| Loop | agent/conversation_loop.py orchestrates turns and retries |
| Context | agent/prompt_builder.py assembles active prompt context |
| Tools | model_tools.py dispatches registered capabilities |
| State | hermes_state.py and gateway/session.py own session persistence |
| Configuration | hermes_cli/config.py; profile-aware HERMES_HOME |
| Extensions | Plugins, skills, MCP tools, context and memory providers |
| Observability | Trajectory records and session/tool events; redact sensitive payloads |
| Security | Profile state separation is not OS containment; audit backend, mounts, environment and service credentials |
Learning through durable memory and skills does not imply model-weight updates. Prompt snapshots and stored files can differ. Retry, approval, and execution semantics depend on the specific capability and release.
Pinned repository ↗ · Architecture documentation ↗ · Security boundaries ↗
OpenClaw · openclaw/openclaw · MIT
Gateway and agent runtime with sessions, tools, context assembly, hooks, and persistence. Reviewed package version 2026.9.6, commit a6b5ed882cb5e7a10e9346d0e1152878a55653a4.
| Boundary | Public source / responsibility |
|---|---|
| Ingress | src/gateway/server-methods/agent.ts: agent and agent.wait |
| Runtime | src/agents/embedded-agent-runner/run.ts exports runEmbeddedAgent from run-orchestrator |
| Context | src/agents/system-prompt.ts; bootstrap context and skill snapshots |
| Configuration | src/config/types.ts; inspect runtime-specific settings |
| Tools / extensions | Tool dispatch plus before/after tool hooks; permissions remain a separate boundary |
| State / memory | Session persistence and durable memory are distinct from an active prompt |
| Error handling | Run timeouts and cancellation differ from wait-only timeouts |
| Observability | Assistant, tool and lifecycle events expose stage transitions |
| Security | Inspect effective identity, tool policy and sandbox settings; no blanket containment claim |
A returned run ID means accepted, not completed. A terminal lifecycle outcome is stronger than streamed prose; verify downstream effects independently. Alternate runtimes can own provider retries and termination differently.
Pinned repository ↗ · Agent loop documentation ↗ · Security documentation ↗
Further reading and attribution
Vinoth Govindarajan’s The Agent Stack provides architectural commentary on Data Agents, context, and Hermes. NextRun’s fixtures, diagrams, and recommendations here are original generalized teaching material, not reproductions of private correspondence or the author’s experiments.
Author-reported experiments are evidence for their pinned release and tested paths only. NextRun has not rerun those framework experiments. Current official source is the authority for implementation details; architectural recommendations should be tested against your own deployment.