- agent-console: /agents + /jobs now call the real /v1/agents + /v1/jobs API (server reads + register/create/advance actions), graceful demo fallback; +server-only dep. - dashboard: webhook endpoint management + recent deliveries; in-app Notification Center (header bell) over delivery runs. - admin: analytics/reporting page (summary cards + CSS bar charts, no new dep) + CSV export route. - roadmap 6.1-6.3 checked. 1308 tests / 213 suites, typecheck + builds green.
3.0 KiB
3.0 KiB
SettleKit — Agent Console
The Agentic + Innovation surface: a window into autonomous agents doing commerce. It shows agents discovering published agent-services, paying for each call via x402, citing the sources they were grounded in, and presenting signed proofs-of-citation.
Real domain logic, not mocked JSON
lib/data.ts is deterministic but drives the real SettleKit spine — it never
ships hand-written JSON:
- Marketplace — listings are built with
createAgentService(...)(@settlekit/agent-services), published withpublishAgentService, and surfaced throughdiscoverPublishedAgentServices/discoverAgentServices. The agent-readable§11metadata (generateAgentMetadata) is what an agent reads to pay via x402. - x402 spend — each simulated agent invocation runs through
recordAgentUsage/agentUsageCost; per-agent and per-service totals are aggregated withaddMoney(@settlekit/common). - Reputation — star ratings are folded with
aggregateAgentReputation(ratingAverage). - Citation toll — sources are created with
createSource(@settlekit/citation-toll) into anInMemorySourceRegistry, andcomputeRoyaltyDistributionproduces the recursive royalty fan-out (depth-0 author leg + depth>0 citation legs). - Attribution —
detectReuse(@settlekit/attribution) finds the sources an agent's answer was grounded in, andissueCitationProofmints a real, HMAC-signed, expiring proof.
A fixed clock (2026-06-18T09:00:00Z) plus fixed integer counts make every
Money total, royalty leg, reputation average, and reuse score byte-stable across
renders. (The proof nonce/signature use randomUUID, so they are the only
non-deterministic fields — by design.) Swap this module for the Pg-backed stores
to go live.
Pages
| Route | Surface |
|---|---|
/ |
Console overview — agents, services, x402 spend, citations, proofs |
/agents |
Autonomous agents — budget cap, requests, USDC spent, proofs |
/services |
Discovered agent-services — price, network, reputation, x402 meta |
/citations |
Worked example — reuse detection, recursive toll, proof-of-citation |
Develop
pnpm --filter @settlekit/agent-services... build # build domain deps' dist/
pnpm --filter @settlekit/agent-console dev # http://localhost:3008
Config
CITATION_PROOF_SECRET— HMAC secret for proof signing (dev fallback provided).NEXT_PUBLIC_API_URL— live API base (defaulthttp://localhost:8787).SETTLEKIT_API_KEY— server-side Bearer credential for the live/v1/agentsand/v1/jobscalls. Accepts ansk_live_…key or the API'sAPI_BOOTSTRAP_KEY(which bindsDEFAULT_ORG_ID). When unset or invalid the API returns 401 and the/agentsand/jobspages degrade to the seeded LocalPort demo data with a clear "demo data" notice, so offline dev still works.