An autonomous, on-chain agent on Solana that discovers tools via SAP, executes AI tasks, and settles payments via x402 — with no human in the loop.
It targets both bounty categories from one codebase:
| Category | What it does | Payment rail |
|---|---|---|
| 1. General Payment Volume (SAP escrow) | discover SAP agents -> brain picks tool -> open escrow -> run task -> Synapse Sentinel verify -> settle calls on-chain | on-chain escrow |
| 2. Ace Data Cloud usage (x402) | register on SAP -> brain plans 3+ distinct Ace services -> run each -> settle per-request | AceDataCloud x402 facilitator (Solana) |
npm install
cp .env.example .env # fill in RPC, keypair, Ace payer, LLM key
npm run agent:register # one-time: register on SAP mainnet
npm run build && npm start # runs the autonomous loop (RUN_CATEGORY=both)
# or target one category:
npm run run:escrow-category
npm run run:ace-categoryUse DRY_RUN=true to rehearse the full flow without broadcasting, and
MAX_SPEND_USDC as a hard spend cap so the autonomous loop can never run away.
- SAP mainnet registration —
src/sap/registration.ts(idempotent). - Complete automated workflow —
src/index.tsloop: trigger -> discover -> decide -> execute -> pay, no manual steps. - Discover tools via SAP —
src/sap/discovery.ts(DiscoveryRegistry). - At least one AI capability —
src/brain/llm.ts+ Ace AI services. - Synapse Sentinel used at least once —
src/sap/sentinel.ts. - Escrow payments w/ Synapse RPC —
src/sap/escrow.ts+src/exec/synapse-rpc.ts. - Ace account + x402 via Ace facilitator —
src/ace/client.ts. - 3+ distinct Ace services —
src/ace/services.ts(chat, image, search, music).
SAP SDK (discovery/escrow/sentinel/memory) + Synapse Client SDK (RPC execution)
- LLM brain (autonomous tool selection) + Ace x402 client (Solana settlement).
See SOLUTION.html for the full design rationale, the three approaches we weighed, and the decision record.
MIT.