Skip to content

feat: add AgentKoin action provider (escrowed x402 orders with delivery verdicts, Base Sepolia) - #1643

Open
kemppelinvestments-del wants to merge 2 commits into
coinbase:mainfrom
kemppelinvestments-del:feat/agentcoin-action-provider
Open

kemppelinvestments-del wants to merge 2 commits into
coinbase:mainfrom
kemppelinvestments-del:feat/agentcoin-action-provider

Conversation

@kemppelinvestments-del

@kemppelinvestments-del kemppelinvestments-del commented Nov 12, 2026 •

Copy link
Copy Markdown

Description

Adds agentkoinActionProvider, with 7 actions: find_service, route_task, place_order, get_order, claim_listing, verify and refund. It lets an agent find a paid agent service, pay it through an escrow, and get a refund if a staked evaluator rules the work was not delivered (or if no verdict arrives before the deadline).

  • supportsNetwork: Base Sepolia (base-sepolia, 84532) only.
  • No API key. Signing and transactions go through the agent's EvmWalletProvider.
  • place_order checks the router's unsigned transactions against local constants (test USDC, JobEscrow address, chain, amount, buyer as client) before signing, and the amount is capped by maxPayment (default 0.05 test USDC). An optional allowedServiceIds allowlist is supported.
  • verify checks the operator's EIP-191 signatures over RFC 8785 canonical JSON locally.
  • refund reads the job state, simulates the applicable JobEscrow call (cancel, claimRefund, timeoutRelease or finalize) and only sends it if the simulation succeeds.
  • The client is inlined (no new dependencies; uses viem and zod already in the package). Schemas are static zod objects and actions use @CreateAction.
  • Direct (non-escrow) x402 payments are left to the existing x402 action provider.

Disclosure: the AgentKoin service is an early testnet deployment run by us (STOS Technologies LLC). Client libraries and plugins (MIT): https://github.com/stos-technologies/agentcoin. Live testnet router: https://agentcoinhq.com/llms.txt

Tests

  • Unit tests: agentkoinActionProvider.test.ts (28 tests, mocked wallet provider and fetch), covering schemas, RFC 8785 canonicalization, signature checks, the escrow funding flow and its refusals (amount over maxPayment, wrong escrow contract, funding tx for another client, allowlist), claims and the refund paths.
  • pnpm run lint, pnpm run format:check, tsc --noEmit and the full pnpm test in typescript/agentkit pass (63 suites, 932 tests).
  • Live read-only check against the testnet router with the compiled provider:
Network: Base Sepolia
Actions: AgentKoinActionProvider_find_service, _route_task, _place_order, _get_order, _claim_listing, _verify, _refund

find_service {q: "notary", limit: 1}  -> 1 result
route_task {task: "timestamp notary"} -> 3 candidates, top svc_962928f654d2a8a1
verify {serviceId: "svc_962928f654d2a8a1"} -> signature valid, signer 0xf1b2…Cf68 (AgentKoin operator), evidence root matches
  • End-to-end escrow on Base Sepolia (earlier run of the same flow through our standalone AgentKit plugin): job 15, funded, delivered, verdict and finalize on chain. Record: https://agentcoinhq.com/v1/notarize/15

Checklist

  • Added documentation to all relevant README.md files
  • Added a changelog entry

Note: the project was renamed from AgentCoin to AgentKoin. The live service domain (agentcoinhq.com) and the GitHub repo name keep the old name for now.

Adds agentcoinActionProvider (find_service, route_task, place_order, get_order, claim_listing, verify, refund) for escrowed agent-to-agent orders with delivery verdicts on Base Sepolia. Includes static zod schemas, unit tests, README and a changeset.
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Nov 12, 2026
Renames the action provider, its directory, files, identifiers, README and changeset from AgentCoin to AgentKoin. The hosted service domain and wire-level identifiers keep their current names.
@kemppelinvestments-del kemppelinvestments-del changed the title feat: add AgentCoin action provider (escrowed x402 orders with delivery verdicts, Base Sepolia) feat: add AgentKoin action provider (escrowed x402 orders with delivery verdicts, Base Sepolia) Nov 19, 2026
@kemppelinvestments-del

Copy link
Copy Markdown
Author

Hi team, a quick update: we renamed our project from AgentCoin to AgentKoin, so I updated the PR title, description, code, docs and changelog to match (one new signed commit, d1ab61a; no conflicts, and lint, format and tests still pass). The PR is ready for review whenever someone has time. Happy to make any changes you'd like. Thank you!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants