Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Renamed the project identity from Agent Context Protocol to Agent Contract
Protocol while keeping the ACP acronym.
- Renamed the Go module and repository references to
`github.com/Clawdlinux/agent-contract-protocol`.
`github.com/Clawdlinux/agent-native-format`.
- Reframed the README, SPEC, positioning doc, landing page, and public post
draft around governed execution contracts instead of token efficiency.

Expand Down Expand Up @@ -125,5 +125,5 @@ Mean reduction: **76.6%**.
- `pkg/`, `adapters/`: Apache 2.0.
- `cmd/`, `internal/`: BSL 1.1, converts to Apache 2.0 on 2029-05-02.

[Unreleased]: https://github.com/Clawdlinux/agent-contract-protocol/compare/v0.1.0-spec...HEAD
[0.1.0-spec]: https://github.com/Clawdlinux/agent-contract-protocol/releases/tag/v0.1.0-spec
[Unreleased]: https://github.com/Clawdlinux/agent-native-format/compare/v0.1.0-spec...HEAD
[0.1.0-spec]: https://github.com/Clawdlinux/agent-native-format/releases/tag/v0.1.0-spec
122 changes: 65 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,88 @@
# Agent Contract Protocol
# Agent Native Format (ANF)

> **ACP** is the governed execution layer for autonomous agents.
> Any tool source in. Signed, identity-bound, ordered, auditable execution out.
> **ANF** is a token-minimal view format for AI agents.
> Translate live system state into far fewer tokens. Same facts, a fraction of
> the context window.
>
> **Status:** Public PoC · v0.2 DRAFT · June 2026  **Owner:** Clawdlinux / NineVigil
> **Status:** Public PoC · v0.1 spec DRAFT · 2026  **Owner:** Clawdlinux

Not Zed's Agent Client Protocol. Not IBM's Agent Communication Protocol. ANF is
a data format, not a transport.

---

## TL;DR

MCP answers **what tools exist**. Claude Code Tool Search and semantic retrieval
are making tool selection cheaper. That is good. It also means raw token
reduction is not a durable product thesis.
JSON, YAML, and HTML are built for humans. Agents pay for that in tokens.

The hard problem is now execution trust.
ANF is a line-oriented representation built for LLM consumption. It encodes the
decision-relevant state of a system, a Kubernetes namespace, a database, a SaaS
dashboard, in the fewest tokens that still carry the facts.

Before an autonomous agent touches a real system, you need to know:
- No quotes, braces, or commas. Indentation and newlines are the structure.
- Health, alerts, and available actions surface first.
- Self-describing. An LLM parses it with no schema.

1. **Who is it acting as?** The contract binds execution to an agent identity
and a credential alias. Raw credentials never enter the model context.
2. **What is it allowed to do?** The contract declares egress, approval gates,
TTL, rate limits, and audit level.
3. **What happened afterward?** Every action can be tied back to a contract,
action id, principal, outcome, and audit record.
A Kubernetes namespace that costs about 12,000 tokens as raw API JSON costs
about 350 tokens as ANF. The full spec is in [`FORMAT.md`](FORMAT.md).

ACP takes an agent intent and returns an **Execution Contract**. The current
wire type is still `ExecutionManifest` for v0.1 compatibility, but the contract
is the product primitive: scoped capabilities, ordered actions, auth handled at
the proxy, and policy declared before the first tool call.
## What ships today

## Why this exists
- **Spec.** [`FORMAT.md`](FORMAT.md), CC BY 4.0. The format definition.
- **Go encoder.** [`pkg/anf`](pkg/anf), Apache 2.0. Build and emit ANF documents.
- **Kubernetes translator.** [`translators/kubernetes`](translators/kubernetes).
Live cluster state to ANF.
- **Benchmarks.** Reproducible token measurements against raw and filtered JSON.

Autonomous agents are stuck in demos because teams cannot bound their blast
radius. Tool discovery is getting solved. Production execution governance is
not.
## Governed execution runtime

ACP is a small open contract format and reference runtime for that gap:
The repo also ships a reference runtime that turns an agent intent into a
scoped, auditable execution contract. This was the original Agent Contract
Protocol work. It stays here as the execution layer that consumes tool
discovery and enforces policy at the boundary.

- **MCP-compatible.** Existing MCP servers keep working. ACP consumes their
`tools/list` and emits a governed execution contract.
- **Source-agnostic.** MCP, Kubernetes Services, and future OpenAPI/gRPC/CLI
adapters all normalize into the same contract shape.
- **Policy at the boundary.** The proxy enforces egress and approval. The
model does not get to self-police.
- **Audit by construction.** Feedback and proxy execution events attach to the
same contract id.
Before an autonomous agent touches a real system, the runtime answers:

## Token efficiency is a side effect
1. **Who is it acting as?** The contract binds execution to an agent identity
and a credential alias. Raw credentials never enter the model context.
2. **What is it allowed to do?** The contract declares egress, approval gates,
TTL, rate limits, and audit level.
3. **What happened afterward?** Every action ties back to a contract, action
id, principal, outcome, and audit record.

ACP still reduces tool-context tokens because contracts only include the
capabilities needed for the intent.
The runtime is MCP-compatible. It consumes existing `tools/list` output,
normalizes MCP, Kubernetes, and future OpenAPI/gRPC/CLI sources into one
contract shape, enforces egress and approval at the proxy, and attaches audit
events to the same contract id.

Measured benchmark data is in
[`results/2026-05-02-week3-summary.md`](results/2026-05-02-week3-summary.md).
Scoped contracts also cut tool-context tokens, because a contract only carries
the capabilities the intent needs. Measured against the MCP baseline:

| Scenario | ACP / MCP tokens | ACP / MCP round trips | Reduction |
| Scenario | runtime / MCP tokens | runtime / MCP round trips | Reduction |
|---|---:|---:|---:|
| S1 Simple DB query | 111 / 373 | 1 / 3 | 70.2% |
| S2 Multi-tool workflow | 295 / 837 | 1 / 5 | 64.7% |
| S3 Complex DAG | 306 / 1,257 | 1 / 7 | 75.6% |
| S4 Scale, 50 tools and 2 relevant | 241 / 9,223 | 1 / 21 | 97.4% |
| S5 Auth-heavy | 359 / 1,431 | 1 / 7 | 74.9% |

Those numbers are useful. They are not the moat. The moat is the governed
execution contract.
Full data in
[`results/2026-05-02-week3-summary.md`](results/2026-05-02-week3-summary.md).

## Repository layout

```text
agent-contract-protocol/
├── SPEC.md # ACP protocol specification
agent-native-format/
├── FORMAT.md # ANF format specification (CC BY 4.0)
├── SPEC.md # Execution runtime protocol specification
├── pkg/
│ ├── anf/ # ANF encoder and types
│ ├── acp/ # Execution runtime Go SDK
│ └── manifest/ # Wire types
├── translators/
│ └── kubernetes/ # Live cluster state to ANF
├── cmd/
│ ├── acp-server/ # ACP server entrypoint
│ ├── acp-server/ # Execution runtime entrypoint
│ ├── acp-bridge/ # MCP bridge for IDE-style clients
│ └── benchmark/ # Benchmark CLI
├── internal/
Expand All @@ -80,11 +91,8 @@ agent-contract-protocol/
│ ├── registry/ # Tool registry
│ ├── resolver/ # Intent to capabilities resolver
│ └── sources/ # MCP and Kubernetes source adapters
├── pkg/
│ ├── acp/ # Public Go SDK
│ └── manifest/ # Wire types
├── adapters/python/ # Python adapters for common agent stacks
├── benchmark/ # Reproducible MCP vs ACP harness
├── benchmark/ # Reproducible token benchmark harness
├── docs/ # Architecture, positioning, validation
└── deploy/ # Docker Compose and Kubernetes assets
```
Expand All @@ -94,8 +102,8 @@ agent-contract-protocol/
### Build from source

```bash
git clone https://github.com/Clawdlinux/agent-contract-protocol
cd agent-contract-protocol
git clone https://github.com/Clawdlinux/agent-native-format
cd agent-native-format
make build
ACP_AUTH_TOKEN=dev-token ./bin/acp-server --addr :8080
```
Expand All @@ -105,7 +113,7 @@ ACP_AUTH_TOKEN=dev-token ./bin/acp-server --addr :8080
For normal MCP users, install the bridge and register one MCP server in VS Code:

```bash
go install github.com/Clawdlinux/agent-contract-protocol/cmd/acp-bridge@latest
go install github.com/Clawdlinux/agent-native-format/cmd/acp-bridge@latest
```

`~/Library/Application Support/Code/User/mcp.json`:
Expand Down Expand Up @@ -145,14 +153,14 @@ curl -sS -X POST http://localhost:8080/v1/context \
| python3 -m json.tool
```

### Go install after the rename lands
### Go install

```bash
go install github.com/Clawdlinux/agent-contract-protocol/cmd/acp-server@main
go install github.com/Clawdlinux/agent-native-format/cmd/acp-server@main
ACP_AUTH_TOKEN=dev-token acp-server --addr :8080
```

Use a release tag once the first Agent Contract Protocol tag is cut.
Use a release tag like `@v0.2.0-paper` for reproducible installs.

## Use with existing MCP servers

Expand Down Expand Up @@ -230,10 +238,10 @@ See [`docs/positioning.md`](docs/positioning.md) and
## Python adapters

```bash
pip install "git+https://github.com/Clawdlinux/agent-contract-protocol.git@main#subdirectory=adapters/python/acp_common"
pip install "git+https://github.com/Clawdlinux/agent-contract-protocol.git@main#subdirectory=adapters/python/acp_langgraph"
pip install "git+https://github.com/Clawdlinux/agent-contract-protocol.git@main#subdirectory=adapters/python/acp_openai"
pip install "git+https://github.com/Clawdlinux/agent-contract-protocol.git@main#subdirectory=adapters/python/acp_crewai"
pip install "git+https://github.com/Clawdlinux/agent-native-format.git@main#subdirectory=adapters/python/acp_common"
pip install "git+https://github.com/Clawdlinux/agent-native-format.git@main#subdirectory=adapters/python/acp_langgraph"
pip install "git+https://github.com/Clawdlinux/agent-native-format.git@main#subdirectory=adapters/python/acp_openai"
pip install "git+https://github.com/Clawdlinux/agent-native-format.git@main#subdirectory=adapters/python/acp_crewai"
```

## Go SDK
Expand Down
Binary file modified acp-bridge
Binary file not shown.
4 changes: 2 additions & 2 deletions adapters/python/acp_common/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# acp-common

Shared client + types for [ACP (Agent Contract Protocol)](https://github.com/Clawdlinux/agent-contract-protocol) Python adapters. Pure-stdlib — `urllib`, `json`, `dataclasses`. No third-party runtime dependencies.
Shared client + types for [ACP (Agent Contract Protocol)](https://github.com/Clawdlinux/agent-native-format) Python adapters. Pure-stdlib — `urllib`, `json`, `dataclasses`. No third-party runtime dependencies.

Used by `acp-langgraph`, `acp-openai`, and `acp-crewai`. You generally do not install this directly — it is a transitive dependency of the framework adapter you actually want.

## Install

```bash
pip install "git+https://github.com/Clawdlinux/agent-contract-protocol.git@v0.1.0-spec#subdirectory=adapters/python/acp_common"
pip install "git+https://github.com/Clawdlinux/agent-native-format.git@v0.1.0-spec#subdirectory=adapters/python/acp_common"
```

## Usage
Expand Down
8 changes: 4 additions & 4 deletions adapters/python/acp_common/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ classifiers = [
dependencies = []

[project.urls]
Homepage = "https://github.com/Clawdlinux/agent-contract-protocol"
Repository = "https://github.com/Clawdlinux/agent-contract-protocol"
Spec = "https://github.com/Clawdlinux/agent-contract-protocol/blob/main/SPEC.md"
Issues = "https://github.com/Clawdlinux/agent-contract-protocol/issues"
Homepage = "https://github.com/Clawdlinux/agent-native-format"
Repository = "https://github.com/Clawdlinux/agent-native-format"
Spec = "https://github.com/Clawdlinux/agent-native-format/blob/main/SPEC.md"
Issues = "https://github.com/Clawdlinux/agent-native-format/issues"

[tool.setuptools]
# The package source is the directory containing pyproject.toml itself
Expand Down
4 changes: 2 additions & 2 deletions adapters/python/acp_crewai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ crewai = ["crewai>=0.1.0"]
test = ["pytest>=7"]

[project.urls]
Homepage = "https://github.com/Clawdlinux/agent-contract-protocol"
Repository = "https://github.com/Clawdlinux/agent-contract-protocol"
Homepage = "https://github.com/Clawdlinux/agent-native-format"
Repository = "https://github.com/Clawdlinux/agent-native-format"

[tool.setuptools]
packages = ["acp_crewai"]
Expand Down
8 changes: 4 additions & 4 deletions adapters/python/acp_langgraph/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ langgraph = ["langgraph>=0.0.50"]
test = ["pytest>=7", "langgraph>=0.0.50"]

[project.urls]
Homepage = "https://github.com/Clawdlinux/agent-contract-protocol"
Repository = "https://github.com/Clawdlinux/agent-contract-protocol"
Spec = "https://github.com/Clawdlinux/agent-contract-protocol/blob/main/SPEC.md"
Issues = "https://github.com/Clawdlinux/agent-contract-protocol/issues"
Homepage = "https://github.com/Clawdlinux/agent-native-format"
Repository = "https://github.com/Clawdlinux/agent-native-format"
Spec = "https://github.com/Clawdlinux/agent-native-format/blob/main/SPEC.md"
Issues = "https://github.com/Clawdlinux/agent-native-format/issues"

[tool.setuptools]
packages = ["acp_langgraph"]
Expand Down
4 changes: 2 additions & 2 deletions adapters/python/acp_openai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ openai = ["openai>=1.0"]
test = ["pytest>=7"]

[project.urls]
Homepage = "https://github.com/Clawdlinux/agent-contract-protocol"
Repository = "https://github.com/Clawdlinux/agent-contract-protocol"
Homepage = "https://github.com/Clawdlinux/agent-native-format"
Repository = "https://github.com/Clawdlinux/agent-native-format"

[tool.setuptools]
packages = ["acp_openai"]
Expand Down
6 changes: 3 additions & 3 deletions blog/launch-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ auditable execution out.

If this is not your pain, I want to know.

Repo: https://github.com/Clawdlinux/agent-contract-protocol
Repo: https://github.com/Clawdlinux/agent-native-format

## LinkedIn

Expand All @@ -50,7 +50,7 @@ auditable execution out.
Genuinely looking for counterexamples. If this is already solved in your stack,
I want to learn how.

Repo: https://github.com/Clawdlinux/agent-contract-protocol
Repo: https://github.com/Clawdlinux/agent-native-format

## Hacker News / Reddit

Expand Down Expand Up @@ -81,4 +81,4 @@ existing tool sources and emits a signed, identity-bound, ordered, auditable uni
of execution. I am not sure yet if this is the right primitive, so I would rather
ask before building too much.

Repo: https://github.com/Clawdlinux/agent-contract-protocol
Repo: https://github.com/Clawdlinux/agent-native-format
12 changes: 6 additions & 6 deletions cmd/acp-bridge/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ import (
"time"
"unicode"

"github.com/Clawdlinux/agent-contract-protocol/internal/bridge"
"github.com/Clawdlinux/agent-contract-protocol/internal/mcpclient"
"github.com/Clawdlinux/agent-contract-protocol/internal/registry"
"github.com/Clawdlinux/agent-contract-protocol/internal/resolver"
mcpsource "github.com/Clawdlinux/agent-contract-protocol/internal/sources/mcp"
"github.com/Clawdlinux/agent-contract-protocol/internal/vscodeconfig"
"github.com/Clawdlinux/agent-native-format/internal/bridge"
"github.com/Clawdlinux/agent-native-format/internal/mcpclient"
"github.com/Clawdlinux/agent-native-format/internal/registry"
"github.com/Clawdlinux/agent-native-format/internal/resolver"
mcpsource "github.com/Clawdlinux/agent-native-format/internal/sources/mcp"
"github.com/Clawdlinux/agent-native-format/internal/vscodeconfig"
)

var version = "0.2.0-dev"
Expand Down
12 changes: 6 additions & 6 deletions cmd/acp-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"syscall"
"time"

builder "github.com/Clawdlinux/agent-contract-protocol/internal/builder"
"github.com/Clawdlinux/agent-contract-protocol/internal/observability"
"github.com/Clawdlinux/agent-contract-protocol/internal/proxy"
"github.com/Clawdlinux/agent-contract-protocol/internal/registry"
"github.com/Clawdlinux/agent-contract-protocol/internal/resolver"
"github.com/Clawdlinux/agent-contract-protocol/internal/server"
builder "github.com/Clawdlinux/agent-native-format/internal/builder"
"github.com/Clawdlinux/agent-native-format/internal/observability"
"github.com/Clawdlinux/agent-native-format/internal/proxy"
"github.com/Clawdlinux/agent-native-format/internal/registry"
"github.com/Clawdlinux/agent-native-format/internal/resolver"
"github.com/Clawdlinux/agent-native-format/internal/server"
)

// acpVersion is the version string set at build time via -ldflags.
Expand Down
4 changes: 2 additions & 2 deletions cmd/import-demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"os"
"strings"

"github.com/Clawdlinux/agent-contract-protocol/internal/registry"
mcpsource "github.com/Clawdlinux/agent-contract-protocol/internal/sources/mcp"
"github.com/Clawdlinux/agent-native-format/internal/registry"
mcpsource "github.com/Clawdlinux/agent-native-format/internal/sources/mcp"
)

// sourceFlag is a repeatable -source flag whose value is parsed as a comma-
Expand Down
2 changes: 1 addition & 1 deletion docs/decision-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 2026-05-02 — Start ACP as a private Clawdlinux repo

**Decision:** Create `Clawdlinux/agent-contract-protocol` as a private repository and
**Decision:** Create `Clawdlinux/agent-native-format` as a private repository and
build the PoC independently from `agentic-operator-core`.

**Why:** ACP is a new protocol and benchmark artifact. Keeping it separate
Expand Down
8 changes: 4 additions & 4 deletions docs/operator-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ other.
| POST /v1/context
v
+-------------------------+
| ACP server | <-- this repo (Clawdlinux/agent-contract-protocol)
| ACP server | <-- this repo (Clawdlinux/agent-native-format)
| - intent resolver |
| - contract builder |
| - auth proxy |
Expand Down Expand Up @@ -53,9 +53,9 @@ required.

| Concern | Owner | Repo |
|---|---|---|
| ACP wire protocol | this repo | `Clawdlinux/agent-contract-protocol` SPEC.md |
| ACP server runtime | this repo | `Clawdlinux/agent-contract-protocol` cmd/, internal/ |
| ACP source adapters (MCP, k8s) | this repo | `Clawdlinux/agent-contract-protocol` internal/sources/ |
| ACP wire protocol | this repo | `Clawdlinux/agent-native-format` SPEC.md |
| ACP server runtime | this repo | `Clawdlinux/agent-native-format` cmd/, internal/ |
| ACP source adapters (MCP, k8s) | this repo | `Clawdlinux/agent-native-format` internal/sources/ |
| Kubernetes CRDs (AgentWorkload, AgentCard, Tenant) | operator | `Clawdlinux/agentic-operator-core` api/v1alpha1/ |
| Reconcilers | operator | `Clawdlinux/agentic-operator-core` internal/controller/ |
| RuntimeClass / NetworkPolicy / RBAC manifests | operator | `Clawdlinux/agentic-operator-core` charts/ |
Expand Down
4 changes: 2 additions & 2 deletions docs/phase-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Obsidian vault.
**Inputs**
- Source spec: `ACP_PoC_Specification_CONFIDENTIAL.docx`
- Workspace: `/Users/sunny/clawdlinux/agent-contract-protocol`
- GitHub repo: `Clawdlinux/agent-contract-protocol` (private)
- GitHub milestone: `https://github.com/Clawdlinux/agent-contract-protocol/milestone/1`
- GitHub repo: `Clawdlinux/agent-native-format` (private)
- GitHub milestone: `https://github.com/Clawdlinux/agent-native-format/milestone/1`
Comment on lines 12 to +15

**Decisions**
- Repo name: `agent-contract-protocol`
Comment on lines +14 to 18
Expand Down
Loading
Loading