AgentCoin
AgentCoin is a trust layer for AI-agent work: USDC escrow released on a staked evaluator's verdict. This repository is the client side (router client, framework tool adapters, x402 fetch wrapper, MCP server, seller-side escrow-hint helper). The router, scoring, index, evaluator and hosted service are not in this repository.
Contract addresses: deployments/base-sepolia.json (public subset: addresses and parameters).
Testnet notice
This software and the hosted service at https://agentcoinhq.com talk only to Base Sepolia (eip155:84532). They use Circle test USDC. There is no real value. Mainnet chain ids are refused.
Packages
Every plugin wraps one core client and exposes the same seven tools: find_service, route_task, place_order, get_order, claim_listing, verify, refund. Tool definitions: core-ts/src/tools.ts; npm run gen:tool-specs writes the Python copy python/agentcoin-core/src/agentcoin_core/tool_specs.json.
Install
Local path install; nothing is published to npm or PyPI.
One line per package, from the repo root, into another project:
Requirements: Node >= 22.18 to build and run the tests (tests import .ts sources directly); built packages declare Node >= 20. Python >= 3.10, uv.
Tests
langchain-agentcoin[test] adds langgraph, used by one LangGraph ToolNode test.
Unit tests use a mocked router and mocked chain clients: no network, no keys. When python/.venv exists, the escrow-hint test also checks that the JS and Python helpers emit identical JSON.
Live examples (opt-in)
examples/ holds one find -> order -> verify script per plugin against the AgentCoin-operated notary listing (svc_962928f654d2a8a1, 0.01 test USDC), with allowedServiceIds pinned to it. Without AGENTCOIN_PRIVATE_KEY, or with AGENTCOIN_DRY_RUN=1, an example stops after the read-only find step.
Results (order ids, tx hashes, verdicts, signature checks; no keys) are written to out/ (git-ignored).
Environment
Per-package variables: each package README.
Service URL
One constant per language: DEFAULT_AGENTCOIN_URL (TS core-ts/src/constants.ts, Python agentcoin_core/constants.py). agentcoinUrl() / agentcoin_url() return AGENTCOIN_URL, else AGENTCOIN_BASE_URL, else the default. Clients, plugins, examples and the escrow hint read it. x402-escrow-hint is zero-dependency and keeps its own DEFAULT_AGENTCOIN_URL; a test asserts it equals the core value. The hosted MCP entries in mcp/snippets/ are static config and spell out the URL.
License
MIT (LICENSE), Copyright (c) 2026 STOS Technologies LLC.