Skip to content

Architecture

Joch is a control plane plus a thin set of data-plane gateways. The control plane owns desired state, policy, inventory, approvals, and release gates. The data plane owns the boundary between agents and the systems they talk to: tools, MCP servers, models, memory, RAG indices, and other agents.

High-level shape

                     ┌───────────────────────┐
                     │      joch CLI / UI    │
                     └──────────┬────────────┘
                     ┌───────────────────────┐
                     │  Joch Control Plane   │  desired state, policy, inventory
                     │  (apiserver, store,   │  release gates, approvals, AgBOM
                     │   policy, scheduler)  │
                     └──────────┬────────────┘
        ┌───────────────────────┼───────────────────────┐
        ▼                       ▼                       ▼
┌──────────────────┐  ┌──────────────────┐  ┌──────────────────┐
│  Tool Gateway    │  │  MCP Gateway     │  │  Model Router    │   data plane
│  AOS hooks       │  │  AOS hooks       │  │  AOS hooks       │
│  (toolCall*)     │  │  (protocols/MCP) │  │  (message)       │
└────────┬─────────┘  └────────┬─────────┘  └────────┬─────────┘
         │                     │                     │
         ▼                     ▼                     ▼
   external APIs         MCP servers          provider APIs (OpenAI,
   functions             (registered,         Anthropic, Google,
   callable funcs        pinned, scanned)     local models)

         ▲                     ▲                     ▲
         │                     │                     │
┌────────┴─────────────────────┴─────────────────────┴────────┐
│           Framework Adapters (one per SDK)                   │
│   OpenAI Agents SDK | Claude Agent SDK | Google ADK |        │
│   Microsoft Agent Framework | LangGraph | CrewAI | custom    │
└──────────────────────────────────────────────────────────────┘

Sections

Architecture rules

These rules are non-negotiable across every Joch service:

  1. Agent code stays in the SDK. Joch never re-implements an SDK's agent loop, planner, or memory primitives.
  2. Cross-SDK boundaries are governed. Tool calls, MCP messages, model calls, memory reads/writes, and RAG retrievals always cross a Joch gateway.
  3. State is owned by Joch. Vendor APIs are inference backends; conversation, memory, and artifact state live in Joch resources.
  4. Policy is portable. A Policy resource is the same shape regardless of SDK and is enforced at the boundary.
  5. Hooks are AOS-compliant. Every gateway exposes the OWASP AOS hook contract (allow / deny / modify).
  6. Records survive runtimes. Local, Docker, Kubernetes, and managed runtimes all consume the same records via runtime adapters.
  7. Resources are diffable. Every record is versioned and structurally diffable so that releases are auditable.