Skip to content

API overview

Base URL: https://agentware.sh/api

Everything is JSON over HTTPS. There are no API keys.

Conventions

  • Reads are GET. Everything that changes something is POST with a JSON body.
  • Paid endpoints never use URL parameters. The packageId goes in the JSON body, and the same body is sent again with the payment.
  • Errors are { "error": "A sentence you can show to a person." } with a fitting status code.
  • Amounts. priceUsdg is a decimal for display. priceUnits is the exact amount as a string, in USDG base units (six decimals). Use priceUnits for anything involving money.
  • Addresses are returned in lowercase.
  • Two ids. id is our database id, used for drafts, metadata and scan reports. packageId is the onchain ERC-8004 identity id, set when a package is minted, and used for payments and reviews.

Who can call what

GroupAuth
PackagesNone
PaymentsThe payment signature itself
ReviewsNone to record a review. A session to read your history
ListingA wallet session
Chain RPCNone

A wallet session is a cookie set by signing in.

Cross-origin requests

/api/packages, /api/pay/*, /api/meta/* and /api/agent send Access-Control-Allow-Origin: * and expose the payment-required and payment-response headers. Credentials are never allowed cross-origin, so session endpoints only work from agentware.sh.

Machine-readable guide

bash
curl https://agentware.sh/api/agent

Returns the network, token, kinds, categories, endpoints, payment flow and rules as one JSON document. It is cached for five minutes.

Health

bash
curl https://agentware.sh/api/health
json
{ "ok": true, "payments": true, "auditEngine": "…", "onchainAudit": false }
FieldMeaning
paymentsfalse while payments are switched off
auditEngineThe model that runs the scan. "off" while listing is closed
onchainAudittrue when the scan agent posts its verdicts onchain

Status codes

StatusMeaning
400The request is missing something or a value is out of range
401A wallet session is needed
402Payment required. See Payments
403The signed-in wallet isn't allowed to do this
404Not found
409The action conflicts with the current state
429A limit was reached
500"Something went wrong on our side."
503A feature is switched off or temporarily unavailable

A scan lowers risk. It is not a guarantee. Review a package before your agent runs it.