Agents and harnesses

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.

View as .mdUpdated

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.

HarnessKindTransportConnect
Claude CodeMCP clientStreamable HTTPclaude mcp add --transport http abazi https://api.52-28-238-205.sslip.io/mcp --header "Authorization: Bearer $ABAZI_AGENT_KEY"
Claude DesktopMCP clientmcp-remote bridge"command": "npx", "args": ["-y", "mcp-remote", "https://api.52-28-238-205.sslip.io/mcp", "--header", "Authorization:Bearer ${ABAZI_AGENT_KEY}"]
CursorMCP clientStreamable HTTP"abazi": { "url": "https://api.52-28-238-205.sslip.io/mcp", "headers": { "Authorization": "Bearer YOUR_AGENT_KEY" } }
Any MCP clientMCP clientStreamable HTTP or stdioPOST https://api.52-28-238-205.sslip.io/mcp Authorization: Bearer YOUR_AGENT_KEY {"method":"tools/list"}
JSON-RPCAPIJSON-RPC 2.0 over HTTPPOST https://api.52-28-238-205.sslip.io/mcp {"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_spending_status","arguments":{}}}
Python SDKSDKRESTgw = 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 HTTPAPIREST + OpenAPIPOST https://api.52-28-238-205.sslip.io/v1/payment-intents Authorization: Bearer YOUR_AGENT_KEY Idempotency-Key: task-42
TypeScriptSDKREST, typed from OpenAPIcreateClient<paths>({ baseUrl: "https://api.52-28-238-205.sslip.io", headers: { Authorization: `Bearer ${process.env.ABAZI_AGENT_KEY}` } })
Local model on Tether QVACReference agentMCP, model on devicenpx qvac serve --openai → the local model picks Abazi tools; Abazi holds the keys

Compare the harnesses

HarnessTransportBest forSetupAuthTools
Claude CodeStreamable HTTPCoding agents and scripted tasks in a terminal1 commandBearer header set at claude mcp addSix MCP tools
Claude Desktopstdio, bridged to HTTP by mcp-remoteA person chatting with an assistant that can buy2 steps: edit the config, restartBearer header passed to mcp-remoteSix MCP tools
CursorStreamable HTTPAgents inside the editor1 fileheaders in mcp.jsonSix MCP tools
Any MCP clientStreamable HTTP, or stdio through mcp-remoteYour own agent, another MCP host, a quick curl check1 requestBearer header on every requestSix MCP tools
JSON-RPCJSON-RPC 2.0 over HTTP POST to the MCP endpoint, no sessionScripts, non-MCP agent frameworks, any language with an HTTP client1 requestBearer header on every requestSix MCP tools
Python SDKRESTPython agents and back-end jobs2 linesBearer header, set once in the clientREST equivalents of the tools
Plain HTTPRESTAny language, any HTTP client1 requestAuthorization: Bearer and Idempotency-KeyREST equivalents of the tools
TypeScriptREST, typed from the OpenAPI contractNode and browser agents that want types2 steps: generate types, create the clientBearer header in createClientREST equivalents of the tools
Local model on Tether QVACMCP; the model runs on your machineAgents whose model must stay on the device3 steps: serve the model, connect MCP, run the loopBearer header held by the agent program, never by the modelThree 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_status and get_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.
ToolWhat it doesInputs (required in bold)
search_catalogFind 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_purchaseBuy 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_purchaseStart 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_statusCheck 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_statusYour 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_receiptGet 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

ResultWhat it meansWhat the agent does
paidALLOW. The payment confirmed; the result carries the resource and a receipt_id.Use the resource. Keep the receipt id.
submittedALLOW. The payment was sent and is waiting for confirmation.Poll get_purchase_status after poll_after_ms.
awaiting_approvalREQUIRE_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_DENIEDDENY, for example HARD_CAP_EXCEEDED.Follow next_action. Never retry a denial with a new idempotency key.

Next steps

On this page