Skip to main content

aimarket-bridges

🌐 English · Русский · Español · Français · 中文 · Glossary

Give your LangGraph, CrewAI or AutoGen agent 47 more tools in two lines.

from aimarket_bridges.langchain import aimarket_tools

tools = aimarket_tools("https://modelmarket.dev", intent="verifiable randomness")

Every tool is a real capability on the AIMarket network — a verifiable random draw, a Byzantine-resistant consensus number, a proof of elapsed sequential work, an optimal-transport plan — each returning a signed receipt your agent can verify without trusting the marketplace.

Install

pip install "aimarket-bridges[langgraph]"
pip install "aimarket-bridges[crewai]"
pip install "aimarket-bridges[autogen]"
pip install "aimarket-bridges[agent-framework]"

The core has no framework dependency. Install only the one you use: their pydantic floors have collided before, and a bridge has no business dragging one framework into another's environment. (Measured 2026-08-24: crewai 1.15.17, autogen-core 0.7.5 and agent-framework-core 1.15.0 do currently resolve together on pydantic 2.12.5, which is how CI runs all four suites in one job.)

The four adapters

Framework Import Returns
LangChain / LangGraph aimarket_bridges.langchain list[StructuredTool]
CrewAI aimarket_bridges.crewai list[crewai.tools.BaseTool]
AutoGen aimarket_bridges.autogen list[autogen_core.tools.BaseTool]
Microsoft Agent Framework aimarket_bridges.agent_framework list[agent_framework.FunctionTool]

Same signature everywhere:

aimarket_tools(
    base_url,               # the hub, e.g. "https://modelmarket.dev"
    intent="",              # rank by relevance instead of taking the whole catalogue
    limit=0,                # cap how many tools the agent sees
    max_price_usd=None,     # never hand over a tool you cannot afford
    free_only=False,
    budget_usd=1.0,         # hard ceiling across every call these tools make
)

What it costs

Capabilities are priced per call, from $0.001. The budget_usd ceiling is enforced before each call and is safe across threads, so an agent that loops cannot outspend it. max_price_usd filters at build time — the honest place for a limit, because once a tool is in the agent's registry the agent decides when to call it.

There is a free trial tier: an agent with no wallet can try capabilities before any payment is set up.

Receipts actually verify

Every call returns a signed 7-field receipt. It is kept out of the tool's text result — it would cost the model context for a blob it never reads — and is available through the framework's own metadata channel and through HubClient.last_receipt.

Verification uses the key of the capability's origin, not the hub's. This matters: 42 of the 47 live capabilities are federated, so their receipts are signed by the provider, not by the broker that routed the call. Checking against the hub's key reports invalid-signature on perfectly valid receipts for 89% of the catalogue.

Refusals are results, not crashes

When a capability rejects its input, your agent gets a sentence it can act on:

sortes.draw@v1 refused this input: 'num_bytes' must be an integer, got str

and it corrects the argument on the next turn. Nothing raises, so one bad argument does not abort the surrounding graph or crew. Transport and configuration failures do raise — those the model cannot fix, and swallowing them yields an agent that reports success having called nothing.

Without a framework

The core is usable on its own if you are wiring something with no adapter yet:

from aimarket_bridges import fetch_catalog, HubClient

capabilities = fetch_catalog("https://modelmarket.dev", intent="consensus")
with HubClient("https://modelmarket.dev", budget_usd=0.50) as hub:
    result = hub.invoke(capabilities[0], {"values": [1.0, 2.0, 3.0, 100.0]})
    print(result.output, result.receipt_verified)

fetch_catalog raises when the hub is unreachable rather than returning an empty list. An agent that starts up believing it has no capabilities is a much worse failure than one that refuses to start.

Notes on the frameworks

Written against langchain-core 1.5.2, langgraph 1.2.10, crewai 1.15.8, autogen-core 0.7.5 and agent-framework-core 1.15.0, each verified by introspection rather than from documentation. They disagree about how a tool declares its arguments, which is most of what this package absorbs:

  • langchain-core accepts a raw JSON Schema dict, so a capability's schema passes straight through.
  • crewai requires a pydantic model and reads .model_fields off it.
  • autogen derives schemas from Python type annotations, so a runtime-shaped capability needs an explicit args model.
  • agent-framework takes either, and only one of the two works here: given a pydantic model it advertises the by-alias schema but validates the un-aliased dump against it, so fourier.verify@v1 — whose argument really is called lambda — can never be called (TypeError: Missing required argument(s): lambda). The adapter hands over the hub's own schema instead, which the framework supports directly and which the model then reads verbatim.

The oneOf in kantor.transport@v1 (a point is an array of numbers or a number) and in fermat.route@v1 (an edge is an array or an object) becomes a proper union in all three.

Apache-2.0.

Metadata

Release files for aimarket-bridges 0.2.0

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

Source distribution (sdist)

Source distribution for aimarket-bridges 0.2.0
File Size Uploaded
aimarket_bridges-0.2.0.tar.gz 415.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aimarket-bridges 0.2.0
File Interpreter ABI Platform
aimarket_bridges-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 485.5 kB

Release files / aimarket_bridges-0.2.0.tar.gz

Download URL aimarket_bridges-0.2.0.tar.gz
Size 415.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e555e43112dad0d41d1e8bbcb2017fe7816669a0d06bfbe628da96fa7cfa87ae
BLAKE2b-256 checksum
How to use checksums
e429629fb671f06f7d9afe359b2cce18ec3be44585734fc44727fca1a12e34b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / aimarket_bridges-0.2.0-py3-none-any.whl

Download URL aimarket_bridges-0.2.0-py3-none-any.whl
Size 70.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71a0e601074eb293ea1790c0b4321cdee4b2d393f7c880cc879355ca0d0bf928
BLAKE2b-256 checksum
How to use checksums
752c75edc063489e49dc121c81dc58aa15603fea2c4e3abac6d33028af2fa3ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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