TypeScript SDK for AXME - send intents, listen for deliveries, resume workflows. Fully typed, Promise-based, works in Node.js and edge runtimes.
Quick Start · Docs · Examples
npm install @axme/axmeRequires Node.js 20+.
import { AxmeClient } from "@axme/axme";
const client = new AxmeClient({ apiKey: "axme_sa_..." });
// Send an intent - survives crashes, retries, timeouts
const intent = await client.createIntent(
{
intent_type: "order.fulfillment.v1",
to_agent: "agent://myorg/production/fulfillment-service",
payload: { order_id: "ord_123" },
},
{ idempotencyKey: "fulfill-ord-123-001" }
);
// Wait for resolution
const result = await client.waitFor(intent.intent_id);
console.log(result.status);for await (const delivery of client.listen("agent://myorg/production/my-agent")) {
const intent = await client.getIntent(delivery.intent_id);
const result = await process(intent.payload);
await client.resumeIntent(delivery.intent_id, result);
}const intent = await client.createIntent({
intent_type: "intent.budget.approval.v1",
to_agent: "agent://myorg/prod/agent_core",
payload: { amount: 32000 },
human_task: {
task_type: "approval",
notify_email: "approver@example.com",
allowed_outcomes: ["approved", "rejected"],
},
});
const result = await client.waitFor(intent.intent_id); // waits until human acts8 task types: approval, confirmation, review, assignment, form, clarification, manual_action, override. Full reference: axme-docs.
for await (const event of client.observe(intent.intent_id)) {
console.log(event.event_type, event.status);
if (["RESOLVED", "CANCELLED", "EXPIRED"].includes(event.status)) break;
}export AXME_API_KEY="axme_sa_..."
npx tsx examples/basic-submit.tsMore: axme-examples
npm install
npm test| axme-docs | API reference and integration guides |
| axme-examples | Runnable examples |
| axp-spec | Protocol specification |
| axme-cli | CLI tool |
| axme-conformance | Conformance suite |