Skip to main content

AIMarket Agent v2.1.1

CI Test coverage License: Apache-2.0

Ecosystem: AICOM overview & live demos · Community: Discord · Pollux · Telegram · Castor

Reference consumer agent for the AIMarket Protocol. pip install aimarket-agent — any AI (Claude, GPT, Cursor, LangChain) can discover, pay, and invoke capabilities across the AIMarket federation. MIT Licensed.

SDK versions: this package is on the Python 2.x line. Dart/TypeScript/Rust SDKs use 0.1.x — see docs/sdk-version-policy.md.

Live Hub

This agent connects to modelmarket.dev — the reference hub with 12 capabilities and 15 plugins. Federated peers and oracles (Platon randomness, Chronos VDF, Murmuration consensus, Lumen reputation, …) appear in search when their manifests are pinned on the hub.

Install

pip install aimarket-agent

Quick Start

# Full autonomous cycle
aimarket-agent run "translate spec to 5 languages + legal review" \
  --base-url https://modelmarket.dev \
  --budget 3.00

# Search capabilities
aimarket-agent search "code review" --base-url https://modelmarket.dev

# Invoke a single capability
aimarket-agent invoke prod-translate/translate.multi@v2 \
  --base-url https://modelmarket.dev \
  --input '{"text":"Hello world"}'

Python SDK

from aimarket_agent import AIMarketAgent

agent = AIMarketAgent(
    base_url="https://modelmarket.dev",
    budget=3.00,
    affiliate_id="my_app"
)

# Full cycle: discover → channel → invoke → settle → BOM
result = agent.run("translate spec to 5 languages + legal review")
print(f"Spent: ${result['total_spent_usd']:.2f}")

# Discovery only
capabilities = agent.discover("summarize long documents")
for c in capabilities:
    print(f"  {c['capability_id']} — ${c.get('price_per_call_usd', 0):.2f}")

# Single invoke
result = agent.invoke_single(
    "prod-translate", "translate.multi@v2",
    {"text": "Hello world", "locales": ["ru", "fr", "de"]}
)

# Pay-on-Verified: escrow the debit until Metis verifies the output.
# The result carries a "verification" envelope; poll it to the verdict
# (exponential backoff, no deadline by default — pass max_wait_s to bound).
result = agent.invoke_single(
    "prod-translate", "translate.multi@v2",
    {"text": "Hello world"},
    verify={"requested": True, "intent": "translate to French", "mode": "auto"},
)
final = agent.wait_for_verification(result["receipt"]["nonce"])
print(final["verification"]["status"])  # "settled" (paid) or "refunded"

Full Autonomous Cycle

① GET  /.well-known/ai-market.json     → discover hub
② POST /ai-market/discover              → search capabilities
③ POST /ai-market/channel/open          → pre-fund channel
④ POST /capabilities/{pid}/{cid}/invoke → invoke (safety-gated)
⑤ POST /ai-market/channel/close         → settle + refund
⑥ Save bill_of_materials.json           → signed audit trail

Safety Gate

If an invocation is blocked by the safety gate (injection, PII, etc.), the agent receives HTTP 403 with a signed rejection receipt and the channel is auto-refunded.

Output

[discover] 12 capabilities across 12 products
[plan]     translate.multi@v2  (est $0.40)
[channel]  opened ch_a8f3 with $3.00 deposit
[call]     translate.multi@v2 ....... $0.40 ✓ 8.1s
[settle]   used $0.40, refund $2.60
[saved]    bill_of_materials.json

Configuration

CLI flag Default Description
--base-url http://127.0.0.1:9083 Hub URL
--budget 3.0 Max budget in USD
--affiliate Affiliate ID for revenue share
--json false Output as JSON

Demo

Related repos

Repo Role
aimarket-hub Reference hub
aimarket-protocol Normative v2 spec
aimarket-sdks TS/Rust/Dart SDKs
argus Personal agent reference client
dioscuri Twin community agents — MNEMOSYNE Q&A

Community

The DIOSCURI twins answer questions from synced GitHub docs.

Channel Twin Best for
Discord Pollux Help, ideas, show-and-tell
Telegram Castor Releases, digests, quick news

Ecosystem map: Alien Monitor · AICOM

License

MIT · Maintained by AI-Factory · modelmarket.dev · Hub API

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aimarket_agent-2.1.2.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aimarket_agent-2.1.2-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file aimarket_agent-2.1.2.tar.gz.

File metadata

  • Download URL: aimarket_agent-2.1.2.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for aimarket_agent-2.1.2.tar.gz
Algorithm Hash digest
SHA256 0ecbcad1d3ad0a57395962578bb3e8023c9fb14f0401cca5451f2935bcd2b495
MD5 b03907959b7d9b3b88df07e23da48368
BLAKE2b-256 02b29c0c9f2504007f2ba4003f699ad612b9caa631df224f45bb60918da743c0

See more details on using hashes here.

File details

Details for the file aimarket_agent-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: aimarket_agent-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for aimarket_agent-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd419a1989255af27f263c66166701ad929af97c97933d0da47ff53f0a458885
MD5 5e7c7eef2edf241314f0546940322ba1
BLAKE2b-256 cb35f255ba2f789d7348ea606b3ff06720b5c92909a1e58b34c9ce41037058b1

See more details on using hashes here.

Release history Release notifications | RSS feed

2.2.0

2 files

This release

2.1.2 This release

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page