Datoka Agent
Tanda terima yang ditandatangani untuk langkah-langkah alur kerja agen AI yang dinyatakan. Hash file secara lokal; siapkan dan verifikasi secara gratis. Terbitkan tanda terima sebesar 0,002 USDC melalui x402 di Base. HTTP, MCP, dan A2A.
Server MCP Terhosting
npx add-mcp 'https://datoka-agent.bhazarstudio.workers.dev/mcp'Terpasang ke Claude Code, Codex, Cursor, dan lainnya
Dokumentasi
Datoka Agent · HTTP / MCP / A2A
A verifiable receipt for each declared agent step.
For developers who need to retain and check signed records of their agent workflows. Keep raw prompts and outputs on your systems; Datoka receives their hashes.
0.002 USDC per receipt · Free verification · No subscription
Try free verification / Vérifier une preuve Connect your agent
1. Prepare — free
Check your execution declaration and calculate its commitment before buying.
2. Issue — 0.002 USDC
Approve one x402 payment on Base. Receive a signed declaration receipt and retain the purchase state for recovery.
3. Verify — free
Check the signature against trusted keys. Use the common-proof page for DatoQA proofs, or verify_agent_receipt for Agent execution receipts.
Use it in a real workflow
Hand a result to another agent, retain a specific report version, or record a declared failure before retrying. Prepare from local files without uploading their contents.
Three use cases and runnable commands · Download the free preparation helper
What you get
A signed commitment to your declaration, durable issuance and retries that reuse the original purchase. A receipt does not independently prove execution, factual accuracy or blockchain anchoring.
En français: vous achetez un reçu signé de la déclaration de votre agent. La préparation et la vérification sont gratuites. Le code du moteur reste privé.
MCP endpoint: https://datoka-agent.bhazarstudio.workers.dev/mcp (POST)
Integration guide
# Datoka Agent
Signed receipts for declared AI-agent executions. Launch price: 0.002 USDC per receipt on Base (eip155:8453). No subscription.
A receipt proves a signed declaration and integrity; it does not independently observe execution or establish result correctness. Receipts are not blockchain-anchored.
## Endpoints
- Service: https://datoka-agent.bhazarstudio.workers.dev
- OpenAPI: https://datoka-agent.bhazarstudio.workers.dev/openapi.json
- Catalogue: https://datoka-agent.bhazarstudio.workers.dev/catalog
- Pricing: https://datoka-agent.bhazarstudio.workers.dev/pricing
- Free common-proof verification page: https://datoka-agent.bhazarstudio.workers.dev/verify
- Streamable HTTP MCP: https://datoka-agent.bhazarstudio.workers.dev/mcp
- Public keys: POST https://datoka-agent.bhazarstudio.workers.dev/v1/operations/get_agent_public_keys with {}
- POST /v1/operations/verify_proof_receipt: free. Free verification of a common Datoka proof against an independently obtained caller-supplied public trust registry and explicit issuer/scope/chain. Send only the proof, never raw documents. receiptVerified concerns signature, context and dates; status remains incomplete because the artifact is checked locally. No payment, factual accuracy or parent signatures are verified.
- POST /v1/operations/issue_proof_receipt: authenticated non-production pilot only. Issue a Datoka Proof Receipt v0.1 from a commitment-only statement. Authenticated non-production pilot only; not sold through x402 in this release. Never send raw prompts or artifacts.
- POST /v1/operations/prepare_agent_event: free. Validate an agent execution declaration and compute its commitment. Does not create a receipt.
- POST /v1/operations/issue_agent_receipt: 0.002 USDC. Persist a signed execution declaration receipt. Public price: 0.002 USDC via x402 on the advertised network. Preserve event, idempotencyKey and payment authorization on retries. Signed declarations do not independently prove execution.
- POST /v1/operations/verify_agent_receipt: free. Verify the declaration against a trusted Datoka receipt. A valid signature does not independently prove the action occurred.
- POST /v1/operations/get_agent_public_keys: free. Return public keys of this issuer. The operator must establish trust in this issuer independently.
## A2A integration
When A2A_ENABLED=true, the signed Agent Card is at /.well-known/agent-card.json, public keys at /.well-known/jwks.json, and JSON-RPC at /a2a. See /a2a/docs for the supported A2A 1.0 profile. Tasks require a bearer client token. When explicitly advertised and activated, x402 supports issue_agent_receipt; issue_proof_receipt remains pilot-only. Check the network in the payment quote.
Standalone client: https://datoka-agent.bhazarstudio.workers.dev/a2a-client.mjs. Install @a2a-js/sdk@1.3.0; see the file for its origin, credential-file and trusted-public-keys arguments. The example only requests public keys and never pays.
## Start over A2A without registration
Public sessions use a secret generated by your agent: dka_public_ followed by 32 cryptographically random bytes encoded as 64 lowercase hexadecimal characters. Send it as a Bearer token. Save it before the first request and reuse it; possession grants access to that session's tasks. Never use a memorable password, expose it in a URL or logs, or generate a new one on every retry. A lost token cannot be recovered. It does not identify a person and cannot authorize a wallet payment or free pilot issuance.
Node.js 24+ quickstart (free, production key pinned in the downloaded client; review that trust before running):
\`\`\`sh
npm install @a2a-js/sdk@1.3.0
curl -fsS 'https://datoka-agent.bhazarstudio.workers.dev/a2a-client.mjs' -o a2a-client.mjs
node a2a-client.mjs --public datoka-session.private
\`\`\`
The command creates and durably saves the session secret if the file does not exist, then requests public keys over A2A. Existing files are reused. Protect the file like a password. For another origin or trust policy, use the explicit HTTPS_ORIGIN TOKEN_FILE TRUSTED_JWKS_FILE arguments.
Each paid receipt still requires explicit x402 activation, a checked 0.002 USDC quote and a wallet signature. Follow /a2a/docs. HTTP 429 means wait and retry the original request; never replace an accepted payment. Public session requests have approximate edge limits of 60/minute per source IP and 600/minute per Cloudflare location, plus durable limits per session. Shared networks share the IP allowance.
## First free request
\`\`\`sh
curl -sS 'https://datoka-agent.bhazarstudio.workers.dev/v1/operations/get_agent_public_keys' -H 'Content-Type: application/json' -d '{}'
\`\`\`
## Connect directly over MCP
Add this remote Streamable HTTP server URL in your MCP client: https://datoka-agent.bhazarstudio.workers.dev/mcp
No account or API key is required for the four free tools in production. Call get_agent_public_keys with {} to test the connection.
Client configuration example: https://datoka-agent.bhazarstudio.workers.dev/mcp.json (clients may require their own JSON format).
Paid issuance requires an x402-capable client with its own wallet; adding the MCP URL alone does not enable spending.
HTTP discovery manifest: https://datoka-agent.bhazarstudio.workers.dev/.well-known/x402
## Manual MCP connection
Use POST with Accept: application/json, text/event-stream and Content-Type: application/json.
A browser GET to /mcp is not a tool call; this stateless server returns 405 for the optional standalone SSE stream.
Initialize with {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}.
For subsequent requests use the negotiated MCP-Protocol-Version. An MCP SDK handles initialization, notifications and headers.
Sending Accept: application/json alone returns 406; text/plain returns 415.
## What a normal 402 means
A price quote or challenge transfers no funds. Only an authorized payment followed by confirmed settlement buys a receipt.
Quotes may repeat and may come from robots: they are not unique buyers or evidence of checkout abandonment.
A rejected payment is not a normal unpaid quote.
## Verify a common proof without uploading its document
Open https://datoka-agent.bhazarstudio.workers.dev/verify and try the synthetic example. For your own proof, supply an independently obtained public trust registry and explicit issuer, scope and optional chain. The page sends only the proof and public trust policy; document hashing and comparison happen on your device.
The free verify_proof_receipt operation is exposed in the same HTTP/MCP catalogue and A2A skills. Its input is {proof,trust,issuer,scope,chain?}. Unknown fields, raw artifacts and private keys are rejected. A valid report has receiptVerified=true and status=incomplete: the server has not received or verified the artifact. An invalid signature or expired proof has receiptVerified=false; HTTP 200 alone never means a valid proof.
trustSource=caller_supplied means the report relies on your supplied keys; it is not an independent identity certification by Datoka. Sources, parent signatures, payment, authorization and anchoring are not verified by this operation.
HTTP/MCP checks do not persist proof contents. A2A uses the existing private task storage model: its input and result are retained with the task. Never put raw prompts, outputs or secrets into a proof statement.
## Who this service is for
Developers operating AI-agent workflows who need a verifiable receipt of a declared step or hand-off. Hash inputs and outputs locally, request a signed receipt, then keep it with your own audit record.
You buy signature issuance and durable idempotent receipt recovery. You do not buy execution of your agent, factual validation, identity certification or blockchain anchoring. Evaluate the free preparation and verification steps before spending.
## Buying a receipt
1. Compute JCS/SHA-256 hashes of inputs and outputs locally. Never send raw prompts or outputs.
2. POST {event,idempotencyKey} to /v1/operations/issue_agent_receipt. See OpenAPI for the strict event schema.
3. Read the HTTP 402 and PAYMENT-REQUIRED header. Check exact scheme, Base chain, native USDC, amount <= 2000 atomic units and the payTo address below.
4. Use an EOA wallet funded with native USDC on Base to sign the EIP-3009 authorization, off-chain. Smart wallets and Permit2 are not supported by this service.
5. Persist the complete event, idempotencyKey AND original payment payload privately before submitting PAYMENT-SIGNATURE.
6. Save the returned receipt AND PAYMENT-RESPONSE. Verify the receipt with the free verifier or locally against a trusted public key.
7. If a response is lost, retry the SAME stored purchase. Never create a replacement signature or idempotency key automatically, even after expiry. payment_pending requires recovery, not a new charge.
Native USDC: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Authorized recipient: 0x4a7A972F84E2A64b3B9B64AC1383Df5c413c0E59
For MCP, payment is in params._meta["x402/payment"], confirmation in result._meta["x402/payment-response"]. A tool result with isError=true is an error even with HTTP 200.
## Use your own workflow
Three concrete uses and runnable commands: https://datoka-agent.bhazarstudio.workers.dev/use-cases.md.
Download https://datoka-agent.bhazarstudio.workers.dev/workflow.mjs (Node 24+, no dependencies). Run:
\`\`\`sh
node workflow.mjs --input task.json --output result.pdf --metadata metadata.json --request receipt-request.json
\`\`\`
Metadata fields: agentId, runId, stepId, tool, outcome, startedAt, completedAt (UTC with milliseconds). The helper hashes exact file bytes locally and calls only free preparation. It never uploads documents or opens a wallet. It creates a new request file without overwriting an existing one. Keep source files unchanged while hashing; JSON whitespace affects byte hashes.
Use neutral labels, never secrets. Preparation validates your declaration but does not independently observe execution or issue a receipt.
Then run node example.mjs --request receipt-request.json for a free quote. Add --buy --approve-one-purchase only with the wallet and saved-state settings below. Retry with the same state; a different supplied request is refused. To resume without the request file, omit --request and reuse the original saved purchase state.
## Runnable client
Download https://datoka-agent.bhazarstudio.workers.dev/example.mjs. Install Node 24+ and run:
\`\`\`sh
npm install @x402/core@2.27.0 @x402/evm@2.27.0 viem@2.57.0
node example.mjs
\`\`\`
This default command only requests a free price quote. To purchase once, set DATOKA_TEST_PRIVATE_KEY_FILE to a private JSON file containing a test wallet's privateKey, and DATOKA_PURCHASE_STATE to a new private file path in an existing directory. Then run node example.mjs --buy --approve-one-purchase. Never use your personal wallet seed. The example caps the purchase at 0.002 USDC, persists the authorization before submission and reuses the same state on retry. Back up the private state; do not delete it after a timeout.
The operator distribution also provides examples/purchase.ts for a dedicated test wallet and independent local signature verification.
## Optional source attribution
You may send X-Datoka-Source with smithery, glama, producthunt, mcpservers, mcpharbor, a2aregistry, x402scan, bazaar or 402ad. Only a fixed source label is counted; never put a person, token or customer ID in it. Public page links can use the same utm_source values. These are unverified aggregate hints, not unique visitors or proof of purchases.
## Errors
400: invalid JSON, MCP request or event; correct the request before paying.
402: payment required or rejected; inspect the offer/error, do not loop blindly.
403: origin or access is not allowed.
405: wrong HTTP method; GET /mcp normally returns this because standalone SSE is unavailable.
406: MCP Accept must include both application/json and text/event-stream.
415: use Content-Type: application/json.
409: request/authorization conflict; retain the original purchase.
429: rate/quota limit; wait before retrying the same request.
503/payment_pending: settlement outcome uncertain; retain and resume original purchase only.
503/payment_gateway_unavailable: payment provider unavailable; retain original purchase.
Verification is free. Replayed paid receipts do not incur a new charge. Third-party funding/withdrawal fees are separate from the receipt price.