Skip to workspace

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.

  1. 01

    Identity & question

    → Next stage

  2. 02

    Authorized retriever

    → Next stage

  3. 03

    Versioned evidence

    → Next stage

  4. 04

    Prompt + model

    → Next stage

  5. 05

    Claim checks

    → Next stage

  6. 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.

BoundaryPublic source / responsibility
Entrygateway/run.py routes messages; run_agent.py exposes AIAgent
Loopagent/conversation_loop.py orchestrates turns and retries
Contextagent/prompt_builder.py assembles active prompt context
Toolsmodel_tools.py dispatches registered capabilities
Statehermes_state.py and gateway/session.py own session persistence
Configurationhermes_cli/config.py; profile-aware HERMES_HOME
ExtensionsPlugins, skills, MCP tools, context and memory providers
ObservabilityTrajectory records and session/tool events; redact sensitive payloads
SecurityProfile 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.

BoundaryPublic source / responsibility
Ingresssrc/gateway/server-methods/agent.ts: agent and agent.wait
Runtimesrc/agents/embedded-agent-runner/run.ts exports runEmbeddedAgent from run-orchestrator
Contextsrc/agents/system-prompt.ts; bootstrap context and skill snapshots
Configurationsrc/config/types.ts; inspect runtime-specific settings
Tools / extensionsTool dispatch plus before/after tool hooks; permissions remain a separate boundary
State / memorySession persistence and durable memory are distinct from an active prompt
Error handlingRun timeouts and cancellation differ from wait-only timeouts
ObservabilityAssistant, tool and lifecycle events expose stage transitions
SecurityInspect 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.

Bring this lab to your teamOriginal teaching examples · No production training claims