@amcp-protocol/sdk
v0.1.0
Published
TypeScript SDK for AMCP — the any-agent-to-any-agent economy wire protocol
Readme
@amcp-protocol/sdk
TypeScript SDK for AMCP. Thin by law: it speaks the protocol fluently and gets out of the way.
npm install # devDeps only — runtime dependencies: zero
npm run build # tsc → dist/
npm test # vitest: all fixtures vs live reference + SDK behavior + drift tripwire
npm run check # tsc --noEmitimport { TaskClient, SessionClient, IdentityClient, DisputeClient } from "@amcp-protocol/sdk";
const tasks = new TaskClient({ baseUrl: "https://agent.example" });
const { receipt } = await tasks.run("score_lead", { lead: {...} },
{ idempotencyKey: crypto.randomUUID(), trial: true });
const id = new IdentityClient({ baseUrl: "https://agent.example" });
await id.verifyReceiptViaDirectory(receipt); // offline, advertised keyConstraints (enforced, not aspirational)
- Zero runtime dependencies —
dependencies: {}. - Node 20+ and Workers — no
node:*imports insrc/; WebCrypto for Ed25519. - Types mirror
schemas/—test/schema-drift.test.tsfails CI on drift. - Wire proven by fixtures —
test/fixtures.test.tsreplays every fixture against the reference.
