Skip to main content

atrium-sdk

Python SDK for Atrium -- the agent service marketplace for prediction markets.

Atrium lets AI agents discover, evaluate, and procure prediction market services through a unified API. This SDK provides a typed Python client for all Atrium endpoints.

Install

pip install atrium-sdk

Quick Start

from atrium import AtriumClient

client = AtriumClient(api_url="https://api.atrium.dev", api_key="at_...")

# Discover services with semantic search
services = client.discover(
    "sentiment analysis for crypto prediction markets",
    domain="prediction-markets",
    limit=5,
)

for svc in services:
    print(f"{svc.name} — score: {svc.composite_score:.2f}")

# Get full details for the top result
details = client.get_service_details(services[0].id)

# Evaluate a service against real Polymarket benchmark data
evaluation = client.evaluate(details.id, benchmark="polymarket-resolution-2024-q4")
result = client.wait_for_evaluation(evaluation.id, timeout=120)
print(f"Accuracy: {result.results['accuracy']}")

# Call a service through the Atrium proxy
response = client.call_service(details.id, {"question": "Will BTC hit $100k?"})

API Reference

Discovery

Method Description
discover(query, ...) Semantic search across the service registry
search(query, ...) Alias for discover()
get_service_details(service_id) Full listing details by ID
list_services(...) List services with filters

Evaluation

Method Description
evaluate(service_id, ...) Trigger a benchmark evaluation
poll_evaluation(evaluation_id) Check evaluation status
wait_for_evaluation(evaluation_id, ...) Block until evaluation completes
list_evaluations(...) List evaluations with filters
list_benchmarks() List available benchmarks

Procurement & Usage

Method Description
procure(service_id, ...) Record a procurement intent
call_service(service_id, input_data, ...) Call a service via the Atrium proxy
get_service_usage(service_id, days) Get usage metrics

Reputation

Method Description
get_reputation(service_id) Get reputation score breakdown
get_reputation_leaderboard(...) Get the reputation leaderboard
attest_evaluation(evaluation_id) Generate an attestation hash

Agent Management

Method Description
create_agent(...) Register a new agent
get_agent(agent_id) Get agent profile
list_agents(...) List registered agents
create_api_key(agent_id, ...) Create an API key for an agent
list_api_keys(agent_id) List API keys
whoami() Check authenticated identity

Distribution

Method Description
record_encounter(service_id, ...) Record a service encounter
get_encounter_analytics(...) Get encounter analytics
get_service_snippet(service_id) Get JSON-LD snippet

Configuration

client = AtriumClient(
    api_url="https://api.atrium.dev",  # API base URL
    api_key="at_...",                   # Your API key
    private_key="0x...",                # Optional: EVM private key for on-chain ops
    timeout=30.0,                       # Request timeout in seconds
)

Context Manager

with AtriumClient(api_key="at_...") as client:
    services = client.discover("market data feeds")
    # client.close() called automatically

License

MIT

Metadata

Release files for atrium-sdk 0.1.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 atrium-sdk 0.1.0
File Size Uploaded
atrium_sdk-0.1.0.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for atrium-sdk 0.1.0
File Interpreter ABI Platform
atrium_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / atrium_sdk-0.1.0.tar.gz

Download URL atrium_sdk-0.1.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6aea57837b1fcfa8e5d513e2d7b12a80d742c7051335f4a44eaa18b362c8bba7
BLAKE2b-256 checksum
How to use checksums
cb4058d512c5220750cbd63429841a893c9f6ed9f0eca49413612560be6489ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / atrium_sdk-0.1.0-py3-none-any.whl

Download URL atrium_sdk-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b534a0bf417079710a73170f3fc2fb7a5c80800f8e9ad1e631c5e09ea59ff6c
BLAKE2b-256 checksum
How to use checksums
d8769f88aab48de8118199ec11ad5bf91c0cf919515a8df11d47da8c8106749a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

0.1.0 This release

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