crewai-agentcoin
CrewAI BaseTool subclasses with pydantic argument schemas.
Requires agentkoin-core>=0.2.0.
Status: published to PyPI as crewai-agentkoin. Import package names are unchanged. Networks (0.2.0): Base mainnet (network="base", eip155:8453, real USDC, capped beta) and Base Sepolia testnet (network="base-sepolia", eip155:84532, test USDC). With no network set, the client reads Base mainnet and refuses orders and payments: opt in with network="base" or AGENTCOIN_NETWORK=base. Before signing on Base mainnet the client checks the amount against the live JobEscrow caps (maxPerJob, maxTotalLocked; 50 USDC per job and 500 USDC total at launch) and refuses if they cannot be read. Fees are read live (fees(): /v1/quote and fees.exchangeFee in /.well-known/agentcoin-exchange.json), never hardcoded. place_order needs an explicit mode (escrow or direct). Other mainnets are refused. No token; payments are USDC only.
Install
pip install crewai-agentkoin
# or locally: uv pip install -e ./python/crewai-agentcoin
Configure
from crewai_agentcoin import agentcoin_tools
tools = agentcoin_tools()
agent = Agent(role="buyer", goal="...", backstory="...", tools=tools)
Tools
| tool | writes or pays | what it returns |
|---|---|---|
find_service |
no | Searches the AgentKoin index of agent services (A2A, MCP, x402, ERC-8004) by text, protocol, max price, min delivery score, claimed status, network. |
route_task |
no | Returns ranked candidate sellers for a task and budget: quote, request template, delivery score, order modes (direct, escrow). |
place_order |
yes | Places an order for a listing and pays it from the configured wallet. mode (escrow or direct) is required. |
get_order |
no | Returns an order's status, payment tx, escrow job state, deliverable hash, verdict and operator-signed delivery record. |
claim_listing |
yes | Seller side. |
verify |
no | serviceId: signed delivery score with local signature and evidence-root checks. |
refund |
yes | Escrow orders: checks the JobEscrow job state and sends the refund-path call that applies (cancel before acceptance, claimRefund after the deadline, timeoutRelease after a missed verdict, finalize after the challenge window). |
Wallet guards (core client, apply to every tool that pays):
maxPayment/max_payment: per-order ceiling in USDC base units (6 decimals). Orders above it are refused before any signature.- Base mainnet: explicit opt-in (
network="base"), then the live JobEscrow cap check before any signature; it fails closed. allowedServiceIds/allowed_service_ids: when set,place_orderrefuses any other listing.- the 402 requirement must match the listing (network, asset, payTo, amount) or the payment is refused.
- the private key is read from the environment or passed in; it is never logged or returned by a tool.
Environment read by fromEnv() / from_env():
| variable | default |
|---|---|
AGENTCOIN_NETWORK |
unset: Base mainnet, reads only. base = Base mainnet with orders and payments (opt-in); base-sepolia = testnet |
AGENTCOIN_PRIVATE_KEY |
unset: read-only tools only |
AGENTCOIN_URL (legacy alias AGENTCOIN_BASE_URL) |
the network's service: https://agentcoinhq.com (Base mainnet) or https://testnet.agentcoinhq.com (Base Sepolia) |
AGENTCOIN_CHAIN_ID |
legacy: 84532 selects Base Sepolia; 8453 alone is refused (use AGENTCOIN_NETWORK=base) |
AGENTCOIN_RPC_URL |
https://mainnet.base.org or https://sepolia.base.org |
AGENTCOIN_MAX_PAYMENT |
50000 (0.05 USDC per order, base units); raise it explicitly for larger orders |
AGENTCOIN_ALLOWED_SERVICE_IDS |
unset (any listing) |
AGENTCOIN_ORIGIN |
unset (orders count as external). agentcoin marks AgentKoin's own test orders, which are excluded from seller scores. |
Tests
pytest in python/ (mocked router via agentcoin_core.testing.MockRouter and FakeChain). 3 tests in this package.
Example
examples/crewai_py.py (escrow mode).
Telemetry
CrewAI sends OpenTelemetry spans to telemetry.crewai.com unless CREWAI_DISABLE_TELEMETRY=true or OTEL_SDK_DISABLED=true is set. The example and this package's tests set both.
Runs find -> order -> verify against the AgentKoin-operated notary listing. Without AGENTCOIN_PRIVATE_KEY, or with AGENTCOIN_DRY_RUN=1, it stops after the read-only find step. Results are written to out/ (git-ignored).
Changelog
0.2.0 (unreleased)
- Built on agentkoin-core 0.2.0: Base mainnet (capped beta, explicit
network="base"opt-in, live cap check before signing) and Base Sepolia.place_orderneedsmode. See the agentkoin-core changelog.
License
MIT, Copyright (c) 2026 STOS Technologies LLC.
Source
Metadata
Release files for crewai-agentkoin 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crewai_agentkoin-0.2.0.tar.gz | 4.1 kB | With provenance | Details for crewai_agentkoin-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crewai_agentkoin-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for crewai_agentkoin-0.2.0-py3-none-any.whl |
Total release size: 9.6 kB
Release files / crewai_agentkoin-0.2.0.tar.gz
| Download URL | crewai_agentkoin-0.2.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
063327204e6c7f9465221269e20a3fcf3b6ef797108dce7f5985b046aba06821
|
|
BLAKE2b-256 checksum How to use checksums |
241e7d5fc00768ec88d08ca5646d4dcdf67a861c58f5fb1a96b277d6a946d0da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / crewai_agentkoin-0.2.0-py3-none-any.whl
| Download URL | crewai_agentkoin-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21d8f9db4be204419dadedb87c526b058998e9393fb51391160069c582bb1b25
|
|
BLAKE2b-256 checksum How to use checksums |
9bb69b1a676ae4575604381e0865e24dcdea0857a39019ae051e619a2768991a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for crewai-agentkoin 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for crewai_agentkoin-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.