Agents and harnesses
Every way an agent uses Abazi, from Claude Code and Cursor to a typed TypeScript client and a local model on Tether QVAC, with one credential, one policy and the same receipts.
An agent reaches Abazi over MCP, JSON-RPC, REST or an SDK. It calls six tools over the Model Context Protocol (MCP), sends the same tool calls as plain JSON-RPC requests to the MCP endpoint, or calls the same operations over the REST API, directly or through an SDK. Every harness on this page is one of those paths with a different front end. Pick the one your agent already runs in.
| Harness | Kind | Transport | Connect |
|---|---|---|---|
| Claude Code | MCP client | Streamable HTTP | claude mcp add --transport http abazi https://api.52-28-238-205.sslip.io/mcp --header "Authorization: Bearer $ABAZI_AGENT_KEY" |
| Claude Desktop | MCP client | mcp-remote bridge | "command": "npx", "args": ["-y", "mcp-remote", "https://api.52-28-238-205.sslip.io/mcp", "--header", "Authorization:Bearer ${ABAZI_AGENT_KEY}"] |
| Cursor | MCP client | Streamable HTTP | "abazi": { "url": "https://api.52-28-238-205.sslip.io/mcp", "headers": { "Authorization": "Bearer YOUR_AGENT_KEY" } } |
| Any MCP client | MCP client | Streamable HTTP or stdio | POST https://api.52-28-238-205.sslip.io/mcp Authorization: Bearer YOUR_AGENT_KEY {"method":"tools/list"} |
| JSON-RPC | API | JSON-RPC 2.0 over HTTP | POST https://api.52-28-238-205.sslip.io/mcp {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_spending_status","arguments":{}}} |
| Python SDK | SDK | REST | gw = Gateway("YOUR_AGENT_KEY", base_url="https://api.52-28-238-205.sslip.io"); gw.purchase(service_id=svc["service_id"], task_id="task-42", idempotency_key="task-42-step-1") |
| Plain HTTP | API | REST + OpenAPI | POST https://api.52-28-238-205.sslip.io/v1/payment-intents Authorization: Bearer YOUR_AGENT_KEY Idempotency-Key: task-42 |
| TypeScript | SDK | REST, typed from OpenAPI | createClient<paths>({ baseUrl: "https://api.52-28-238-205.sslip.io", headers: { Authorization: `Bearer ${process.env.ABAZI_AGENT_KEY}` } }) |
| Local model on Tether QVAC | Reference agent | MCP, model on device | npx qvac serve --openai → the local model picks Abazi tools; Abazi holds the keys |
Compare the harnesses
| Harness | Transport | Best for | Setup | Auth | Tools |
|---|---|---|---|---|---|
| Claude Code | Streamable HTTP | Coding agents and scripted tasks in a terminal | 1 command | Bearer header set at claude mcp add | Six MCP tools |
| Claude Desktop | stdio, bridged to HTTP by mcp-remote | A person chatting with an assistant that can buy | 2 steps: edit the config, restart | Bearer header passed to mcp-remote | Six MCP tools |
| Cursor | Streamable HTTP | Agents inside the editor | 1 file | headers in mcp.json | Six MCP tools |
| Any MCP client | Streamable HTTP, or stdio through mcp-remote | Your own agent, another MCP host, a quick curl check | 1 request | Bearer header on every request | Six MCP tools |
| JSON-RPC | JSON-RPC 2.0 over HTTP POST to the MCP endpoint, no session | Scripts, non-MCP agent frameworks, any language with an HTTP client | 1 request | Bearer header on every request | Six MCP tools |
| Python SDK | REST | Python agents and back-end jobs | 2 lines | Bearer header, set once in the client | REST equivalents of the tools |
| Plain HTTP | REST | Any language, any HTTP client | 1 request | Authorization: Bearer and Idempotency-Key | REST equivalents of the tools |
| TypeScript | REST, typed from the OpenAPI contract | Node and browser agents that want types | 2 steps: generate types, create the client | Bearer header in createClient | REST equivalents of the tools |
| Local model on Tether QVAC | MCP; the model runs on your machine | Agents whose model must stay on the device | 3 steps: serve the model, connect MCP, run the loop | Bearer header held by the agent program, never by the model | Three slim MCP tools exposed to the model |
The same everywhere
The harness changes how the agent talks. It does not change what Abazi does.
- One agent credential. An
agk_test_...credential identifies the agent on MCP, JSON-RPC and REST alike. It carries no spending power on its own. - Six tools, or their REST equivalents.
search_catalog,request_purchase,request_installment_purchase,get_purchase_status,get_spending_statusandget_receipt. Each maps to one REST operation. - One policy. Every purchase runs through the same mandate and the same deterministic policy engine, and comes back as ALLOW, REQUIRE_APPROVAL or DENY with a reason code.
- The same receipts. A paid purchase produces a signed receipt with a public verification link, whichever harness asked for it.
- No keys in the agent. The agent never holds a wallet key, a card number or its own limits. Abazi's signer holds the keys; the owner's mandate holds the limits.
| Tool | What it does | Inputs (required in bold) |
|---|---|---|
| search_catalog | Find paid services you can buy, with price, networks and merchant trust tier. Use before request_purchase when you don't know the service_id. Does not spend money. | query, category, max_price_base_units, limit |
| request_purchase | Buy one paid resource by service_id or url. The gateway checks your spending rules, pays, and returns the resource. Use a new idempotency_key per purchase; reuse it to retry the same purchase. Never retry a denial. | service_id, url, task_id, idempotency_key, input, purpose, wait_seconds |
| request_installment_purchase | Start an installment plan (for example 4 x 0.30 USDC) from a merchant's published plan. Always needs owner approval of the total. Use only for plans, not single purchases. | plan_id, task_id, idempotency_key |
| get_purchase_status | Check a purchase you started: payment status and delivery status are separate. Use after awaiting_approval or submitted, waiting poll_after_ms between calls. | intent_id |
| get_spending_status | Your own budget: available, reserved and spent, plus your per-purchase limits and when your rules expire. Use when a purchase was denied for budget. | — |
| get_receipt | Get a signed receipt and its public verification link. Use to prove a purchase happened. | receipt_id |
Transports: stdio; streamable-http at https://api.52-28-238-205.sslip.io/mcp with Authorization: Bearer YOUR_AGENT_KEY (an agent credential).
Get an agent credential
Create the agent
In the Console, open Agents and choose New agent. Abazi shows the secret (agk_test_...) once and stores only a hash. Put it in your secret manager or in an environment variable such as ABAZI_AGENT_KEY.
Sign a mandate
Set the agent's limits, rails and networks, then sign with your passkey. Without a signed mandate every purchase is denied with MANDATE_MISSING. See Write a mandate.
Connect a harness
Follow the page for your harness below. Every page ends with a first search and a first purchase, so you see the whole path once before the agent runs on its own.
A rotated or revoked credential fails on the next call with AGENT_CREDENTIAL_INVALID. The agent should stop and ask for a new one, never retry with the old key.
What every harness handles
| Result | What it means | What the agent does |
|---|---|---|
paid | ALLOW. The payment confirmed; the result carries the resource and a receipt_id. | Use the resource. Keep the receipt id. |
submitted | ALLOW. The payment was sent and is waiting for confirmation. | Poll get_purchase_status after poll_after_ms. |
awaiting_approval | REQUIRE_APPROVAL, for example ABOVE_AUTO_THRESHOLD. Approvers get a link; the agent does not. | Poll get_purchase_status with the same intent. The link expires after 10 minutes. |
Error POLICY_DENIED | DENY, for example HARD_CAP_EXCEEDED. | Follow next_action. Never retry a denial with a new idempotency key. |
Next steps
Environments
Base URLs, credential format, and the networks, card issuing and anchoring the current public environment settles on.
Claude Code
Add Abazi's MCP server to Claude Code with one command, check the six tools, and let Claude Code search the catalog and make its first purchase under your mandate.