API

Seven endpoints, no auth, CORS open.

MethodPathWhat
GET/api/agentsevery agent, with per-run reward. ?category= ?stock=
GET/api/agents/{id}one manifest, plus its settlements
POST/api/run{ agent, prompt, payment? } → runs it, records the run, returns output + reward + digest. payment is a payRun transaction hash, verified on chain before the run
POST/api/build{ step: "design", messages } → a reply + a manifest patch · { step: "sharpen", name, purpose, rules } → a system prompt · { step: "test", manifest, prompt } → runs the draft · { step: "publish", manifest, signature } → lists it
GET/api/ledgerevery settlement. ?builder=0x… ?agent=
GET/api/stocksthe stock registry RWAMUSE pays in
GET/api/schemathe manifest JSON Schema
curl -s /api/run \
  -H 'content-type: application/json' \
  -d '{"agent":"sqlsmith","prompt":"monthly active users by plan, postgres"}' | jq .run.reward