Catalog PyPI
PACKAGE EXPLORERView in registry

aacp

PyPI

Agent Action Compression Protocol — pipe-delimited coordination for multi-agent LLM systems

aacpagentscompressioncoordinationllmmulti-agentprotocoltokens
Versions collected1
Direct dependencies2From release 1.4.0
Last observed20 Oct, 16:50 UTC

README

Version 1.4.0 documentation

AACP — Agent Action Compression Protocol

PyPI version npm version

Deterministic coordination for multi-agent LLM systems.

Status: v1.3 · Benchmarks measured · MIT Licensed · IETF Internet-Draft filed

When agents coordinate in natural language, every instruction varies on every run, costs tokens, and produces no reliable audit trail. AACP replaces that with typed, validated, deterministic packets. Same input. Same output. Every time.


Spec and siteaacp.dev
IETF Draftdraft-mackay-aacp-01
Python SDKgithub.com/MackayAndrew/aacp — pip install aacp
TypeScript SDKgithub.com/MackayAndrew/aacp-ts — npm install aacp-ts
LangChaingithub.com/MackayAndrew/aacp-langchain
CrewAIgithub.com/MackayAndrew/aacp-crewai
Community rulesgithub.com/MackayAndrew/aacp-community-rules — 241 rules
Registry APIregistry.aacp.dev
VS Code extensionDispatch AACP
Packet builderdispatch.aacp.dev
Working labgithub.com/MackayAndrew/aacp-lab

Install

# Python
pip install aacp

# TypeScript / JavaScript
npm install aacp-ts

The problem

Natural language (56 tokens) — varies on every run, not auditable:
"Please retrieve the employee salary records for the period ending
March 2026. I need all active employees, their departments, cost
centres, base salary, any changes made this month, and pension
contribution rates. Return as JSON array."

AACP v1.1 (52 tokens) — identical every run, validated, auditable:
FETCH|HR|return:HR-Agent|p:1|aacp:1.1|res:emp_salary|period:2026-03|filter:status=active|fmt:json

Measured results

Token counts from live API usage_metadata. 4-hop payroll workflow. May 2026.

HopEnglishAACPClaudeGPT-4o
fetch employees5652-7.1%-12.7%
fetch budgets5747-17.5%-16.0%
merge calculate6543-33.8%-31.6%
generate report6243-30.6%-33.3%
TOTAL240185-22.9%-23.7%

Token reduction is a secondary benefit. The primary value is determinism and auditability -- every packet is identical across runs and machine-readable without post-processing.


Framework integration results

Validated on real workflows. June 2026.

FrameworkCoordination calls eliminatedTotal cost savingDeterministic
LangChain (59 hops)59 → 018%YES
CrewAI (4 hops)4 → 030%YES

Quick start (Python)

from aacp.encoders.workflows.payroll import PayrollEncoder

enc = PayrollEncoder()
pkt = enc.fetch_employees(period="2026-03")
print(pkt.packet)
# FETCH|HR|return:HR-Agent|p:1|aacp:1.1|res:emp_salary|period:2026-03|filter:status=active|fmt:json
print(f"Cost: ${pkt.api_cost_usd:.2f}")  # $0.00

# Novel instructions — fallback to LLM, logged to registry
from aacp.encoders.fallback import FallbackEncoder
enc = FallbackEncoder()
pkt = enc.encode_english(
    english="Cross-reference contractors against the approved vendor list.",
    domain="FIN",
    return_agent="FIN-Agent"
)
# First call: LLM once, ~$0.002
# Every subsequent identical call: $0.00 from registry cache

Quick start (TypeScript)

import { PayrollEncoder, AACPValidator, AACPDecoder } from "aacp-ts";

const enc = new PayrollEncoder();
const pkt = enc.fetchEmployees("2026-03");
console.log(pkt.packet);
console.log(pkt.apiCostUsd); // 0

Packet format

TASK|DOM|return:AGENT|p:PRIORITY|aacp:VERSION|key:value|key:value...

Valid TASK: FETCH PROC FLAG RESOLVE LOG SEND BUILD MERGE CALC REPORT ACK SYNC

Valid DOM: HR FIN SALES LEGAL IT CS MKT


Workflow encoders

8 encoders across 6 domains, each grounded in a documented real-world platform. Available in Python and TypeScript. Zero LLM cost.

EncoderDomainHopsReal-world basis
PayrollEncoderHR6HMRC PAYE
ITEncoderIT5Microsoft Entra ID
InvoiceEncoderFIN3AP three-way match
ContractEncoderLEGAL2-3NDA/MSA review
SalesEncoderSALES5Salesforce Agentforce 2026
JMLEncoderHR+IT6ConductorOne, Lumos, CloudEagle
CSResolutionEncoderCS5Zendesk Resolution Platform 2026
MonthEndEncoderFIN6NetSuite Autonomous Close 2026

See docs/encoder-reference.md for citations.


Three-tier fallback encoder

Tier 1 — Hash cache:     exact match → $0.00
Tier 2 — Pattern match:  registry or builtin → $0.00
Tier 3 — LLM fallback:   novel → LLM once → logged → ~$0.002
                          next call → Tier 1 → $0.00

Amortisation benchmark: 6 LLM calls across 240 encoding operations. 91.6% saving.


Community rule library

241 pre-validated rules across 7 domains. MIT licensed. Zero API cost.

# Coming in v1.4:
from aacp import RuleRegistry
registry = RuleRegistry.from_community()
registry = RuleRegistry.from_hosted()  # registry.aacp.dev

Browse: github.com/MackayAndrew/aacp-community-rules API: registry.aacp.dev


Multi-model lab results (Lab v3)

5 workflows, 4 models, all passing. June 2026.

ModelCostTokens inLatencyPass
gpt-4.1-mini$0.019040,585160s✓ 5/5
gpt-4.1$0.098441,005124s✓ 5/5
claude-sonnet-4-5$0.223753,127423s✓ 5/5
gpt-4o$0.240840,459101s✓ 5/5

Lab: github.com/MackayAndrew/aacp-lab


Relationship to existing protocols

ProtocolLayerAACP relationship
MCP (Anthropic/AAIF)Tool accessAACP inside MCP payloads
A2A (Google/AAIF)Agent routingAACP structures A2A message content
Existing APIs / JSONService commsAACP for the LLM agent coordination layer on top

AACP fills the coordination content layer -- the layer between routing (A2A, MCP) and task execution (the LLM doing actual work).


Roadmap

VersionStatusFocus
v1.0ReleasedPipe-delimited format, rule-based encoders
v1.1ReleasedValidated benchmarks — -22.9% Claude, -23.7% GPT-4o
v1.2ReleasedFallback loop closed, PyPI + npm, IETF draft-01
v1.3Released8 encoders, TypeScript SDK, VS Code extension, community rules (241), lab v3, amortisation benchmark, LangChain + CrewAI integrations
v1.4PlannedRuleRegistry (from_community, from_hosted), QBR encoder
v2.0PlannedIETF draft-02, AAIF submission

Licence

MIT — free to use, implement, extend, and fork.

AACP is an independent protocol proposal. Not affiliated with Anthropic, Google, IBM, or the Linux Foundation, though designed to complement MCP, A2A, and ACP.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.4.05 Jun 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
mackayandrew/aacp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:50 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:5b996977d4e31dd184aa11349bbc41075e5b0400b2f246b8ecf955ba00c82aab