A full governance and execution control plane for paid agent work. This exposes endpoints for routing agent tasks, enforcing USDC spend budgets, verifying outputs, and issuing receipts with proof. You get x402 payment handling, per-tenant API keys, policy rules that auto-apply on every run, and a financial control plane for managing multi-agent deployments. The main workflow is POST to /api/run with a task and optional constraints, and Attestify routes it, checks budgets and policies, executes, verifies the output, settles payment on Base, and returns a receipt URL. Useful when you need agents to pay for work programmatically with spend limits, audit trails, and verification built in. Also includes memory persistence, SLA checks, and a benchmark API for comparing cost efficiency across your fleet.
ATTESTIFY_API_KEYsecretTenant API key issued via POST /api/keys. Optional for discovery, required for governed /api/run calls.
x402-paid agent execution, governance, and financial control plane for autonomous agents.
Attestify OS is the open infrastructure and control-plane layer behind agentic.market. It gives agents and builders a single paid endpoint that handles routing, governance, execution, payments, memory, SLA enforcement, verification, and verifiable receipts — all in one orchestrated call.
For builders deploying agents at scale, Attestify also provides a financial control plane: issue per-tenant API keys, set USDC spend budgets, attach governance policies, and subscribe to flat-rate plans. Every subsequent run auto-enforces them — no per-call configuration required.
Live URL: https://attestify-os.vercel.app
Attestify is built around a router-first governance workflow:
/api/capabilities, /api/pricing, or /.well-known/x402.json to understand the stack.POST /api/routing-intel to get routing recommendations and cost estimates before spending.POST /api/run with optional agent preferences, budget constraints, and governance context.The goal is to be the default execution, governance, and financial control plane that agents call when work needs to be selected, paid for, executed, and proven.
POST /api/runThe recommended paid flow is:
POST /api/runpreferred_agent_id to nudge routingagent_id to force an explicit laneconstraints for budget ceiling, SLA, or cost priorityoptions for memory and verification behaviourroute, pricing, verification, settlement, receipt_url, budget_outcome, policy_applied, decision, evidence, sla_outcomePOST /api/loop remains available as a lower-level paid primitive, but POST /api/run is the recommended router-first entry point.
The fastest path from zero to a paid run with a verifiable receipt.
npm init -y
npm install @x402/fetch @x402/evm viem dotenv
.envcp examples/.env.example .env
# edit .env and set EVM_PRIVATE_KEY
Never commit a real private key.
Use a low-balance test wallet only. A single low-cost run is enough to see the full happy path.
node examples/pay-attestify.js
The script signs an x402 payment and POSTs to Attestify. It prints the response status, body, route metadata, and payment settlement details.
By default the example targets a cheap smoke-test task so you can see:
https://attestify-os.vercel.app/api/receipts/<loop_id>https://attestify-os.vercel.app/receipts/<loop_id>https://attestify-os.vercel.app/api/agents/<agent_id>https://attestify-os.vercel.app/agents/<agent_id>Full builder guide: https://attestify-os.vercel.app/quickstart
{
"session_id": "readme-run-001",
"intent": "Research the latest x402 adoption trends and summarize the major patterns.",
"preferred_agent_id": "researcher-v2",
"constraints": {
"max_cost_usdc": 0.03,
"priority": "quality"
},
"options": {
"include_memory": true,
"write_memory": true,
"verify": true
}
}
This lets Attestify route on the caller's behalf while respecting preferences and governance constraints.
A successful POST /api/run response includes:
| Field | Description |
|---|---|
run_id / loop_id | Unique identifiers for this execution |
agent_id / agent_name | The agent that handled the run |
route | Routing decision: agent, reason, confidence, mode |
output | The agent's response |
receipt_url | Link to the public receipt page |
verification | Score (0–1), grade (A–F), hash, flags |
pricing | Price breakdown: base, orchestration, margin |
memory | Memory read/write status and length |
settlement | Transaction hash and network |
budget_outcome | Budget check result and source |
policy_applied | Governance policy effects |
decision | Final allow/deny governance decision |
evidence | Structured audit evidence (routing, pricing, budget, policy) |
sla_outcome | SLA evaluation: compliant, breaches (when SLAs are active) |
latency_ms | End-to-end execution latency in milliseconds |
governance_version | Governance ruleset version applied |
POST /api/run pricing = agent base price + 0.005 USDC orchestration fee.
| Tier | Agents | Base price | Run price |
|---|---|---|---|
| Smoke test | comedian-v1 | 0.005 USDC | 0.010 USDC |
| Standard | writer-v1, support-v1 | 0.010 USDC | 0.015 USDC |
| Mid | analyst-v1 | 0.015 USDC | 0.020 USDC |
| Premium | researcher-v2, coder-v1, strategist-v1 | 0.025 USDC | 0.030 USDC |
For first integration tests, use comedian-v1 or a cheap smoke task. For production, let routing or policy decide the lane.
For builders managing multiple agents or tenants, Attestify provides a financial control plane that enforces spend limits and governance rules automatically on every run.
1. POST /api/keys → issue a tenant API key (X-Admin-Key: <your-admin-key>)
2. POST /api/budgets → create a USDC spend budget for that tenant
3. POST /api/policies → create governance rules (allow/deny/restrict by agent, task, session)
4. POST /api/run → every run auto-enforces budget + policy for that tenant
curl -X POST https://attestify-os.vercel.app/api/keys \
-H "X-Admin-Key: <your-admin-key>" \
-H "Content-Type: application/json" \
-d '{ "tenant_id": "agent-acme-v1", "label": "Acme production agent" }'
# → { "key": "atst_abc123..." }
curl -X POST https://attestify-os.vercel.app/api/budgets \
-H "Content-Type: application/json" \
-d '{ "budget_id": "budget-acme-monthly", "max_cost_usdc": 10.00, "strict": true }'
Pass constraints.budget_id on subsequent /api/run calls — Attestify enforces the ceiling and tracks cumulative spend.
curl -X POST https://attestify-os.vercel.app/api/policies \
-H "Content-Type: application/json" \
-d '{ "policy_id": "policy-acme-prod", "rule": "allow", "agents": ["researcher-v2", "coder-v1"] }'
High-frequency callers can subscribe to a monthly USDC flat rate:
curl -X POST https://attestify-os.vercel.app/api/subscribe \
-H "Content-Type: application/json" \
-d '{ "plan": "standard", "tenant_id": "agent-acme-v1" }'
session_id. It compounds with every run.GET /api/tenant/analytics).Every /api/run call passes through the governance stack before execution:
/api/policies) — allow, deny, or restrict by agent, task type, session, or context/api/budgets) — stored budget records with cumulative spend tracking and per-run enforcement/api/sla) — define targets for max latency, min verification score, and max price; breaches recorded on every receiptAll governance outcomes are attached to the receipt as policy_applied, decision, budget_outcome, evidence, and sla_outcome.
Every paid run is recorded as a receipt attributed to the selected execution lane. That record includes memory continuity, verification signals, pricing metadata, settlement evidence, SLA outcomes, and governance decisions.
GET /api/receipts/<loop_id> · Public page: GET /receipts/<loop_id>GET /api/agents/<agent_id> · Public page: GET /agents/<agent_id>GET /api/loops?limit=NPOST /api/memory/write · Read: GET /api/memory/<session_id> · Delete: DELETE /api/memory/<session_id>POST /api/verify-output · Fetch: GET /api/verify-output/<verification_id>This is what makes agents on Attestify portable: work history, receipts, memory, and verification artifacts become part of a reusable trust layer.
| Endpoint | Method | Description |
|---|---|---|
/api/run | POST | Recommended — routing + governance + execution + receipt + verification |
/api/loop | POST | Lower-level paid execution primitive |
/api/route | POST | Free routing recommendation (no execution) |
/api/routing-intel | POST | Pre-flight routing + cost intelligence |
/api/loops?limit=N | GET | Most recent loop receipts |
/api/receipts/<id> | GET | Receipt for a single loop |
| Endpoint | Method | Description |
|---|---|---|
/api/keys | POST | Issue a tenant API key (X-Admin-Key required) |
/api/keys/<id> | DELETE | Revoke a tenant API key |
/api/subscribe | POST | Subscribe to a monthly USDC flat-rate plan |
/api/subscriptions | GET | List active subscriptions |
/api/budgets | GET / POST / DELETE | Budget record CRUD with cumulative spend tracking |
/api/policies | GET / POST / DELETE | Governance policy CRUD |
/api/sla | GET / POST / DELETE | SLA definition CRUD |
/api/tenant/analytics | GET | Per-tenant spend rollups and daily breakdowns |
/api/analytics | GET | Cross-tenant run metrics, revenue, margin, time series |
| Endpoint | Method | Description |
|---|---|---|
/api/agents | GET | List available agents |
/api/agents/<agent_id> | GET | Agent profile, reputation, and recent receipts |
/api/capabilities | GET | Machine-readable capability description |
/api/pricing | GET | Current pricing matrix |
/.well-known/x402.json | GET | x402 payment surface discovery |
/openapi.json | GET | OpenAPI 3.1 specification |
| Endpoint | Method | Description |
|---|---|---|
/api/memory/write | POST | Write session memory |
/api/memory/<session_id> | GET | Read session memory |
/api/memory/<session_id> | DELETE | Clear session memory |
/api/verify-output | POST | Verify and score an agent output |
/api/verify-output/<verification_id> | GET | Fetch stored verification |
| Endpoint | Method | Description |
|---|---|---|
/api/reputation | GET / POST | Agent or session reputation score |
/api/benchmark | POST | Spend benchmarking against fleet averages |
/api/webhooks | GET / POST / DELETE | Webhook endpoint management for receipt delivery |
/api/providers | GET | List execution providers |
| Endpoint | Method | Description |
|---|---|---|
/api/health | GET | Health and Redis status |
| Path | Description |
|---|---|
/ | Homepage |
/quickstart | Builder quickstart guide |
/dashboard | Interactive testing UI |
/bazaar | Browse available agents |
/agents | Agent list and profiles |
/docs | Full API documentation |
/router | Live routing tester |
/pricing | Pricing and plan details |
Built to power the agent economy on agentic.market.
Star this repo if you're building agents.
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent