Skip to content
Protocol

The Cordum Agent Protocol (CAP).

MCP governs what agents say. CAP governs what agents do.

Wire schema 1.0.0 (stable) · worker attestation in v2.9.0

CAP is an open, language-agnostic wire protocol for autonomous AI agent governance. It standardizes how jobs are submitted, how heartbeats and attestation are reported, and how policy is enforced before an action ever runs.

Policy-before-dispatch
Language-agnostic wire format
Packet signing & worker attestation
Open protocol (Apache-2.0)
New in CAP v2.9

The worker trust boundary, on the wire.

Released 2026-04-07 as v2.9.0. These additions are append-only — existing clients stay wire-compatible.

Worker attestation token

Heartbeat gains an auth_token field (18) so a worker proves it holds a trusted runtime credential on every liveness signal — the foundation of the v2.9 trust boundary.

Readiness declaration

Handshake gains a ready_topics field (6). A worker advertises exactly which job subjects it is ready to serve, so schedulers route only to capable, declared workers.

Automatic handshake on start

The Go, Python, and Node SDKs now publish a Handshake at startup with zero code changes — every worker self-registers its role, supported wire versions, and capabilities.

Cross-SDK packet signing

ECDSA P-256 BusPacket signing and verification stay byte-compatible across the Go, Python, and Node SDKs, with auth_token covered by the signature when both are present.

The Problem

Unified governance requires a standard contract.

Every agent framework invents its own wire format. That makes it impossible to enforce global policy or keep a consistent audit trail across heterogeneous agents.

Protocol-first design

CAP standardizes the BusPacket envelope, typed payloads, and opaque memory pointers. A scheduler can evaluate a job from a Python agent and dispatch it to a Go worker without a custom translation layer.

Safety as a primitive

Unlike a generic message bus, CAP carries first-class hooks for policy evaluation, human-in-the-loop approvals, and signed worker attestation — so the trust boundary is part of the protocol, not bolted on.

buspacket.proto
protobuf
// BusPacket is the envelope for all traffic on the bus.
// Trimmed for readability — full definition in buspacket.proto.
message BusPacket {
  string trace_id = 1;          // correlates related packets
  string sender_id = 2;         // emitting agent id
  google.protobuf.Timestamp created_at = 3;
  int32  protocol_version = 4;  // CAP wire version (currently 1)

  oneof payload {
    JobRequest  job_request  = 10;
    JobResult   job_result   = 11;
    Heartbeat   heartbeat    = 12;
    SystemAlert alert        = 13;
    JobProgress job_progress = 15;
    JobCancel   job_cancel   = 16;
    Handshake   handshake    = 17;  // role + ready_topics negotiation
  }

  bytes  signature  = 14;  // ECDSA signature over the serialized packet
  string auth_token = 18;  // trusted runtime session token
}
Packet Lifecycle

From submit to audit, governed every step.

One job, five governed transitions — each carried by a signed BusPacket and correlated by a single trace_id.

01 · submit

Submit

A gateway publishes BusPacket{JobRequest} on sys.job.submit. The payload stays off the wire behind an opaque context_ptr.

02 · check

Policy check

The scheduler calls the Safety Kernel before dispatch. The SafetyVerdict can allow, deny, require approval, or attach constraints.

03 · dispatch

Dispatch

Allowed jobs route to a pool subject. Schedulers dispatch only to workers whose Handshake declared matching ready_topics.

04 · result

Result

The worker emits BusPacket{JobResult} on sys.job.result with a structured ErrorCode and a result_ptr to the output.

05 · audit

Audit

Every signed packet — request, verdict, and result — is correlated by trace_id into an append-only audit record.

Conformance Levels

What CAP requires, recommends, and enables.

The specification defines three conformance levels. Implementations declare theirs in the Handshake so peers know what to expect.

CORE

The minimum viable implementation — basic job submission and execution.

  • BusPacket envelope (trace_id, sender_id, created_at, protocol_version)
  • JobRequest / JobResult handling
  • State machine basics (PENDING → SCHEDULED → DISPATCHED → RUNNING → terminal)
  • Subject constants (sys.job.submit, sys.job.result)
STANDARD

Recommended for production — security, observability, and structured errors on top of CORE.

  • ECDSA digital signatures (sign outgoing, verify incoming)
  • Heartbeats on sys.heartbeat
  • Safety Kernel integration (SafetyVerdict evaluation)
  • ErrorCode enum + SystemAlert messages
  • Idempotency (meta.idempotency_key deduplication)
FULL

Complete protocol support — orchestration, lifecycle, and capability negotiation.

  • Workflows (workflow_id, parent_job_id, step_index)
  • Compensation and rollback
  • JobProgress reporting + JobCancel cancellation
  • Handshake and capability negotiation (sys.handshake)
  • Dead-letter queue (DLQ) handling

A component declaring conformance.full implicitly satisfies STANDARD and CORE. See spec chapter 15.

SDKs

Adopt CAP in your stack.

Go, Python, and Node speak directly to the bus today; a Python Guard SDK adds safety decoration over HTTP. The wire format is language-agnostic — any language that speaks NATS can participate.

Go

stable

Reference implementation

$ go get github.com/cordum-io/cap/v2
Example usage
import "github.com/cordum-io/cap/v2/sdk/go/runtime"

agent := &runtime.Agent{NATSURL: natsURL, Retries: 2}

// Generic Register — typed handler, context hydrated, result stored for you.
runtime.Register(agent, "job.incident.enrich",
  func(ctx runtime.Context, in Input) (Output, error) {
    return enrich(in)
  })

if err := agent.Start(); err != nil {
  log.Fatal(err)
}

Python

stable

asyncio + NATS

$ pip install cap-sdk-python
Example usage
from cap import worker
from cap.pb.cordum.agent.v1 import job_pb2

async def handle(req: job_pb2.JobRequest):
    return job_pb2.JobResult(
        job_id=req.job_id,
        status=job_pb2.JOB_STATUS_SUCCEEDED,
        result_ptr=f"redis://res/{req.job_id}",
    )

await worker.run_worker(nats_url, "job.echo", handle)

Node / TypeScript

stable

async/await + Zod

$ npm install cap-sdk-node
Example usage
import { connectNATS, submitJob } from "cap-sdk-node";

const nc = await connectNATS({ url: natsUrl });
await submitJob(nc,
  { jobId: "job-echo-1", topic: "job.echo",
    contextPtr: "redis://ctx/job-echo-1" },
  "trace-1", "client-node", privateKeyPem);

Python Guard

beta

Safety decorator (HTTP)

$ pip install cordum-guard
Example usage
from cordum_guard import CordumClient, guard

client = CordumClient("http://localhost:8081", api_key=key)

@guard(client, policy="financial_ops", risk_tags=["write"])
def execute_transfer(amount: float, to_account: str):
    bank_api.transfer(amount, to_account)

All language targets

Honest maturity across the ten targets in the CAP repository.

Go

Published package, full runtime + signing.

stable
Python

Published package, full runtime + signing.

stable
Node / TypeScript

Published package, full runtime + signing.

stable
Python Guard

Published package; HTTP safety layer, pre-1.0.

beta
C++

In-repo; signing & runtime in progress.

experimental
C# / .NET

In-repo stubs + helpers; no published package yet.

community
Java

In-repo stubs + helpers; no published package yet.

community
Rust

In-repo stubs + helpers; no published package yet.

community
PHP

In-repo stubs + helpers; no published package yet.

community
Ruby

In-repo stubs + helpers; no published package yet.

community
The Agentic Stack

MCP governs what agents say. CAP governs what agents do.

Three complementary standards for the agentic era — tool access, agent interoperability, and action governance.

MCP

Tool layer

The Model Context Protocol standardizes tool discovery and invocation within a model session. It defines how an agent asks to use a tool.

What is MCP
A2A

Interop layer

Agent-to-Agent standardizes how independent agents discover and message each other across boundaries. It defines who an agent talks to.

What is A2A
CAP

Governance layer

The Cordum Agent Protocol standardizes job lifecycle, policy, and audit across the platform. It decides if an action is allowed to execute.

What is CAP
FAQ

CAP protocol, answered.

What is the CAP protocol?

The Cordum Agent Protocol (CAP) is an open, language-agnostic wire protocol that governs what autonomous AI agents do. It standardizes a protobuf BusPacket envelope for submitting jobs, reporting heartbeats, negotiating capabilities, and carrying results, so a control plane can enforce policy before dispatch and keep a consistent audit trail across heterogeneous agents. The wire schema is stable at version 1.0.0; worker attestation shipped in the v2.9.0 SDK and spec release (April 2026).

How is CAP different from MCP?

MCP (the Model Context Protocol) governs what an agent says — it standardizes how a model discovers and invokes tools within a session. CAP governs what an agent does — it standardizes the job lifecycle, policy checks, approvals, and audit across the platform, deciding whether an action is allowed to execute at all. They are complementary: an agent can use MCP to call a tool while CAP evaluates and records that action.

Is CAP open source?

Yes. CAP is released under the Apache-2.0 license at github.com/cordum-io/cap. The protobuf definitions are the canonical wire format, the specification is normative, and protocol evolution is strictly append-only, so existing integrations never break. Anyone can implement the protocol or build a conformant control plane.

What languages have CAP SDKs?

CAP ships four maintained SDKs: Go (the reference implementation), Python (asyncio), and Node/TypeScript speak directly to the bus, and a Python Guard SDK adds safety decoration over HTTP. The repository additionally hosts in-progress C++ and community-stage C#/.NET, Java, Rust, PHP, and Ruby targets with generated stubs and worker/client helpers.

How does CAP relate to A2A?

A2A (Agent-to-Agent) standardizes how independent agents discover and message each other across organizational boundaries. CAP operates inside the control plane, governing the jobs those agents run — policy before dispatch, approvals, and an audit trail. MCP, A2A, and CAP form three complementary layers of the agentic stack: tool access, agent interoperability, and action governance.

What is the current version of CAP?

The CAP wire format is stable at schema version 1.0.0 (BusPacket.protocol_version = 1). Worker attestation was introduced in the v2.9.0 SDK and specification release, published 2026-04-07, which added it via a Heartbeat auth_token, readiness declaration via Handshake ready_topics, and automatic handshake publishing in the Go, Python, and Node SDKs. SDK and repository tags advance independently of the wire version under semantic versioning, so the wire schema stays at 1.0.0 even as SDK releases continue.

Adopt the standard.

CAP is open-source (Apache-2.0) and append-only. Wire schema 1 is stable — help us build the governance layer for autonomous AI agents.