OKHAM.org Documentation EnglishCastellano

February 2026 edition

Reference Architecture (Non‑Normative)

Understanding common design patterns and flows in OKHAM-native systems.

Important: This document is non-normative. It describes a reference architecture that some implementations may choose. OKHAM.org standards do not require a particular runtime, message bus, deployment model, or vendor stack.

For the conceptual, standards-first entry point, start with: Overview → Principles → Why Standards Matter → Non‑Goals.


Architectural principles (as a common implementation pattern)

Many OKHAM-aligned implementations follow a contract-first, capability-driven approach:

  1. Contract-first: interactions are described by declarative contracts (e.g., OCC for capability packaging/discovery, OTC for types).
  2. Capability-driven: systems are composed of specialized, self-contained capabilities.
  3. Loose coupling: asynchronous messaging is often used to avoid tight point-to-point coupling.
  4. Discovery over configuration: capabilities can publish metadata; runtimes can adapt dynamically.
  5. Declarative UI: interfaces can be generated from semantic component structures (OUCC).

Nothing above is mandated by the standards — it is a common pattern.


Typical system layers (example)

1) Interface layer (UI shell)

A UI shell can act as a unified entry point for user interactions:

  • routing requests based on declared contracts
  • rendering declarative UI (OUCC)
  • proxying calls to capability tools (optionally via MCP)

2) Orchestration layer (“brain”)

An orchestrator can coordinate multiple capabilities to fulfill workflows. If used, Open Intent Contract (OIC) can preserve intent semantics and expectations across steps.

3) Communication layer (message bus)

Some implementations use a message bus as a “nervous system”:

  • Events (OEC) to represent immutable facts
  • commands/requests between components
  • discovery/registration signals

4) Capability layer

Self-contained services that implement domains. A typical capability may:

  • declare itself via a capability.yaml (OCC)
  • use shared types defined via OTC
  • enforce governance via OPC

Data & interaction flows (example)

Capability registration

A capability starts, loads its contract, and publishes discovery metadata. Registries and tools can use that information to keep maps up-to-date.

Intent execution

  1. A user/agent declares an intent.
  2. The runtime discovers capabilities/tools that can satisfy it.
  3. Policies (OPC) are evaluated.
  4. A tool is invoked (transport is implementation-defined).
  5. The result is recorded/emitted as an event (OEC) when appropriate.

Further reading