{"id":48903881,"url":"https://github.com/lerko96/open-pact","last_synced_at":"2026-04-16T18:01:53.737Z","repository":{"id":351698988,"uuid":"1212101052","full_name":"lerko96/open-pact","owner":"lerko96","description":"Minimal open protocol for AI agent identity, delegation, and memory. Three primitives. ~300 lines to implement. No infrastructure required.","archived":false,"fork":false,"pushed_at":"2026-04-16T05:34:15.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-16T06:31:03.839Z","etag":null,"topics":["a2a","agent-memory","ai-agents","capability-tokens","did","ed25519","identity","mcp","open-protocol","protocol"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@lerkolabs/open-pact?activeTab=code","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lerko96.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-16T04:05:20.000Z","updated_at":"2026-04-16T05:44:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lerko96/open-pact","commit_stats":null,"previous_names":["lerko96/pact-protocol"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lerko96/open-pact","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lerko96%2Fopen-pact","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lerko96%2Fopen-pact/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lerko96%2Fopen-pact/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lerko96%2Fopen-pact/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lerko96","download_url":"https://codeload.github.com/lerko96/open-pact/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lerko96%2Fopen-pact/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a","agent-memory","ai-agents","capability-tokens","did","ed25519","identity","mcp","open-protocol","protocol"],"created_at":"2026-04-16T18:01:25.530Z","updated_at":"2026-04-16T18:01:53.723Z","avatar_url":"https://github.com/lerko96.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PACT\n**Protocol for Agent Capability and Trust**\n\n[![npm](https://img.shields.io/npm/v/@lerkolabs/open-pact)](https://www.npmjs.com/package/@lerkolabs/open-pact)\n[![License: CC0](https://img.shields.io/badge/license-CC0-blue)](./LICENSE)\n[![Spec Status](https://img.shields.io/badge/spec-DRAFT%200.1.0-yellow)]()\n[![CI](https://github.com/lerko96/open-pact/actions/workflows/ci.yml/badge.svg)](https://github.com/lerko96/open-pact/actions/workflows/ci.yml)\n\n```\nStatus:   DRAFT\nSpec:     0.1.0\nDate:     2026-04-16\nLicense:  CC0 (public domain)\n```\n\n\u003e AI agents call tools via MCP and delegate via A2A. Neither protocol answers:\n\u003e *who is this agent, are they authorized, and where does their memory go when they switch platforms?*\n\u003e PACT answers those three questions. Nothing else.\n\n---\n\n## What is PACT?\n\nPACT is a minimal protocol for AI agents to establish identity, delegate authority, and share memory — without depending on any central server, registry, or platform.\n\nThree primitives. Three documents. ~300 lines of code to implement.\n\n---\n\n## The Problem\n\nAI agents in 2026 cannot trust each other, cannot delegate authority safely, and cannot carry memory across platforms. Every major platform has solved these problems privately, creating lock-in disguised as features.\n\nThe protocols that exist (MCP, A2A) solve tool connectivity and agent coordination well. None of them answer three questions:\n\n- **Who is this agent, really?**\n- **Is this agent actually authorized to do what it's doing?**\n- **Where does an agent's memory go when it moves platforms?**\n\nPACT answers those three questions and nothing else.\n\n---\n\n## Three Primitives\n\n### Identity — a keypair\n```\nAgent = Ed25519 keypair\nID    = did:key:z6Mk[public-key-base58btc]\n```\nGenerate a keypair. You have an agent identity. No registration. No server. No issuer. The identity is portable because it is just a key.\n\n### Warrant — a signed delegation\n```\nWarrant = { issuer, subject, capabilities, expires, signature }\n```\nA warrant is a signed statement: *\"Agent A authorizes Agent B to do X until time T.\"* Warrants chain — B can delegate a subset of its authority to C, but never more than it holds. Every chain traces back to a human-controlled root key. No agent can forge authority it was never given.\n\n### Fact — a signed memory claim\n```\nFact = { subject, predicate, object, confidence, source, signature }\n```\nA fact is an atomic, typed assertion signed by the agent that observed it. Facts are content-addressed — the same fact always has the same ID. They compose into portable memory: export a signed fact set from one platform, import it on another, context intact.\n\n---\n\n## Quickstart\n\n```bash\nnpm install @lerkolabs/open-pact\n```\n\n```typescript\nimport {\n  generateKeypair, didFromPublicKey,\n  issueWarrant, signEnvelope, verifyEnvelope,\n  CAPABILITIES,\n} from \"@lerkolabs/open-pact\";\n\n// Create a user (root) and an agent\nconst user = await generateKeypair();\nconst agent = await generateKeypair();\nconst userDid = didFromPublicKey(user.publicKey);\nconst agentDid = didFromPublicKey(agent.publicKey);\n\n// User authorizes the agent to call tools for 1 hour\nconst warrant = await issueWarrant({\n  issuerDid: userDid, issuerPrivateKey: user.privateKey,\n  subjectDid: agentDid,\n  capabilities: [{ action: CAPABILITIES.TOOL_USE, resource: \"*\" }],\n  expiresAt: new Date(Date.now() + 3_600_000),\n});\n\n// Agent signs an envelope around an MCP tool call\nconst envelope = await signEnvelope(agentDid, agent.privateKey, userDid, [warrant], {\n  type: \"mcp/tool-call\",\n  body: { method: \"tools/call\", params: { name: \"search\", arguments: { q: \"PACT\" } } },\n});\n\n// The tool server verifies: is this agent authorized?\nconst result = await verifyEnvelope(envelope, userDid, CAPABILITIES.TOOL_USE, \"*\");\nconsole.log(result.valid); // true\n```\n\nSee [`examples/`](./implementations/typescript/examples/) for runnable scripts.\n\n---\n\n## How PACT Relates to Existing Protocols\n\nPACT does not replace MCP or A2A. It wraps them.\n\n```\n┌─────────────────────────────────┐\n│         Your application        │\n├─────────────────────────────────┤\n│  PACT-03  │  Memory / Facts     │  ← portable context\n│  PACT-02  │  Warrants           │  ← who is authorized\n│  PACT-01  │  Identity           │  ← who is this agent\n├───────────┼─────────────────────┤\n│  MCP      │  Tool calls         │  ← existing standard\n│  A2A      │  Agent coordination │  ← existing standard\n├─────────────────────────────────┤\n│  HTTP / WebSocket / gRPC        │  ← existing transport\n└─────────────────────────────────┘\n```\n\nAn MCP tool call arrives inside a PACT envelope. The envelope proves who sent it and whether they were authorized. The tool result gets stored as a PACT fact. None of the existing protocols change.\n\n---\n\n## PACT vs AIP vs UCAN\n\n| | PACT | AIP | UCAN |\n|---|---|---|---|\n| Auth model | Ed25519 warrant chains | IBCT/Biscuit + Datalog | UCAN delegation |\n| Memory layer | Yes (PACT-03 Facts) | No | No |\n| Infrastructure | Zero required | Zero required | Zero required |\n| Complexity | ~300 lines | Biscuit format + Datalog eval | IPLD + DID resolution |\n| License | CC0 | Unknown | MIT/Apache |\n| Implementations | TypeScript | Python, Rust | JS, Go, Rust |\n\nSee [`spec/COMPARISON.md`](./spec/COMPARISON.md) for a detailed technical comparison.\n\n---\n\n## Design Principles\n\n**Simplicity is the distribution strategy.**\nIf a spec requires a platform team to implement, only platforms win. PACT is implementable by one developer in a weekend.\n\n**No infrastructure required to participate.**\nNo registry to join. No server to run. No permission to ask. Generate a keypair and you're in.\n\n**Authority flows from humans, not systems.**\nEvery warrant chain terminates at a keypair controlled by a human. Agents are delegates, not principals.\n\n**Additive, not competitive.**\nPACT adds identity and memory to the existing ecosystem. It does not replace what works.\n\n**Open by default.**\nCC0. No copyright. No contributor agreement. Take it, implement it, ship it.\n\n---\n\n## The Documents\n\n| Document | What it specifies |\n|----------|------------------|\n| [PACT-01: Identity](./spec/PACT-01-identity.md) | Keypair generation, DID format, agent document, signing |\n| [PACT-02: Warrants](./spec/PACT-02-warrants.md) | Capability grants, delegation chains, message envelopes, revocation |\n| [PACT-03: Facts](./spec/PACT-03-facts.md) | Memory format, fact sets, portability, merging |\n\nRead time: ~30 minutes for all three.\n\n---\n\n## Implementations\n\n| Language | Status | Notes |\n|----------|--------|-------|\n| TypeScript | Reference | `npm install @lerkolabs/open-pact` |\n| Python | Wanted | [Open an issue](https://github.com/lerko96/open-pact/issues) |\n| Go | Wanted | [Open an issue](https://github.com/lerko96/open-pact/issues) |\n| Rust | Wanted | [Open an issue](https://github.com/lerko96/open-pact/issues) |\n\nBuilding an implementation? See [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n---\n\n## Why Now?\n\nThe AI agent ecosystem is at an inflection point. MCP and A2A have solved the middle of the stack and just entered neutral governance under the Linux Foundation. The layers they leave open — identity, delegation, memory — will either be solved by open standards or by platform lock-in.\n\nThe window for a simple, open answer is now. In 18 months the platforms will have won this layer too.\n\n---\n\n## Status\n\nPACT is a draft specification. The core design is stable. The reference implementation passes its test suite. Feedback welcome — open an issue or submit a pull request.\n\n---\n\n*PACT is CC0. Do whatever you want with it.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flerko96%2Fopen-pact","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flerko96%2Fopen-pact","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flerko96%2Fopen-pact/lists"}