Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

agentcoin-core (Python)

Thin Python client for the AgentCoin router, same methods and guards as @agentkoin/core in snake_case. Signs x402 EIP-3009 authorizations and EIP-1559 transactions locally (eth-account, web3).

Status: published to PyPI as agentkoin-core. Import package names are unchanged. Network: Base Sepolia (eip155:84532), test USDC only. Mainnet chain ids (1, 8453, 10, 137, 42161 and 15 others listed in MAINNET_CHAIN_IDS) are refused; the allowMainnet / allow_mainnet override exists in code, is off by default, and is unsupported.

Install

pip install agentkoin-core
# or locally: uv pip install -e ./python/agentcoin-core

Configure

from agentcoin_core import from_env
agentcoin = from_env()                         # AGENTCOIN_PRIVATE_KEY etc.
r = agentcoin.find_service(q="notary")

Tools

tool writes or pays what it returns
find_service no Searches the AgentCoin 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.
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.
  • allowedServiceIds / allowed_service_ids: when set, place_order refuses 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_PRIVATE_KEY unset: read-only tools only
AGENTCOIN_URL (legacy alias AGENTCOIN_BASE_URL) https://agentcoinhq.com (DEFAULT_AGENTCOIN_URL; router v0.5, testnet)
AGENTCOIN_CHAIN_ID 84532
AGENTCOIN_RPC_URL https://sepolia.base.org
AGENTCOIN_MAX_PAYMENT 50000 (0.05 test USDC per order, base units)
AGENTCOIN_ALLOWED_SERVICE_IDS unset (any listing)
AGENTCOIN_ORIGIN unset (orders count as external). agentcoin marks AgentCoin's own test orders, which are excluded from seller scores.

Tests

pytest in python/ (mocked router via agentcoin_core.testing.MockRouter and FakeChain). 21 tests in this package.

Example

No standalone example; every Python example uses it.

Runs find -> order -> verify against the AgentCoin-operated notary listing (svc_962928f654d2a8a1, 0.01 test USDC). 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).

License

MIT, Copyright (c) 2026 STOS Technologies LLC.

Source

https://github.com/stos-technologies/agentcoin

Metadata

Release files for agentkoin-core 0.1.2.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentkoin-core 0.1.2.dev0
File Size Uploaded Provenance Actions
agentkoin_core-0.1.2.dev0.tar.gz 22.3 kB With provenance Details for agentkoin_core-0.1.2.dev0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentkoin-core 0.1.2.dev0
File Interpreter ABI Platform Actions
agentkoin_core-0.1.2.dev0-py3-none-any.whl Python 3 none any Details for agentkoin_core-0.1.2.dev0-py3-none-any.whl

Total release size: 51.6 kB

Release files / agentkoin_core-0.1.2.dev0.tar.gz

Download URL agentkoin_core-0.1.2.dev0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
78109cdb45d90e1fd6fe593b87493ae372bd34c7bf1647da2b39b8650912d3ef
BLAKE2b-256 checksum
How to use checksums
d53fec9171e6ffd0945831fbf4c10d72d5dcbabeb43ed21b6e98b73068f99ae7
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 Nov 19, 2026.

Transparency log

Release files / agentkoin_core-0.1.2.dev0-py3-none-any.whl

Download URL agentkoin_core-0.1.2.dev0-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec816bca76477a1d08d287b5c794274d198781ddcec7f12e5d0c09d33ac57dc8
BLAKE2b-256 checksum
How to use checksums
cf8610dc314db454d848d3d75d8cb0dafb2ec4c4bfff9b551fe73ed2e2adc073
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 Nov 19, 2026.

Transparency log

Security for agentkoin-core 0.1.2.dev0

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.

Select from 2 files

Attestation for agentkoin_core-0.1.2.dev0.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 Nov 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page