Skip to main content

Official Python SDK for Axiomeer AI Agent Marketplace

Project description

Axiomeer Python SDK

PyPI version Python License

Official Python client for the Axiomeer AI Agent Marketplace.

Discover and execute tools, APIs, RAG systems, datasets, and more through natural language.

Installation

pip install axiomeer

Or install from source:

git clone https://github.com/ujjwalredd/axiomeer.git
cd axiomeer/sdk/python/
pip install -e .

Quick Start

from axiomeer import AgentMarketplace

# Initialize client with your API key
marketplace = AgentMarketplace(api_key="axm_your_api_key_here")

# Shop for a tool using natural language
result = marketplace.shop("I need to get weather information")

# Execute the selected tool
execution = result.execute(marketplace, location="New York")

print(f"Weather: {execution.result}")

Authentication

Get your API key from Axiomeer:

# Option 1: Pass directly
marketplace = AgentMarketplace(api_key="axm_xxx")

# Option 2: Use environment variable
import os
os.environ["AXIOMEER_API_KEY"] = "axm_xxx"
marketplace = AgentMarketplace()  # Auto-loads from env

Usage Examples

Basic Shopping

# Find a tool for your task
result = marketplace.shop("I need to send SMS messages")

print(f"Selected: {result.selected_app.name}")
print(f"Reasoning: {result.reasoning}")
print(f"Confidence: {result.confidence:.2%}")

# Execute the tool
execution = result.execute(
    marketplace,
    to="+1234567890",
    message="Hello from Axiomeer!"
)

if execution.success:
    print(f"Success! Result: {execution.result}")
else:
    print(f"Failed: {execution.error}")

Advanced Shopping with Filters

# Shop with specific requirements
result = marketplace.shop(
    task="I need weather data",
    required_capabilities=["real-time", "global"],
    excluded_providers=["unreliable-weather"],
    max_cost_usd=0.01
)

# Check alternatives
for alt in result.alternatives:
    print(f"Alternative: {alt.name} by {alt.provider}")

Direct Execution

# Execute a tool directly by app_id
execution = marketplace.execute(
    app_id="weather-api-openweather",
    params={"location": "San Francisco", "units": "metric"}
)

print(execution.result)

List Available Apps

# Browse marketplace
apps = marketplace.list_apps(category="weather", limit=10)

for app in apps:
    print(f"{app.name}: {app.description}")
    print(f"  Provider: {app.provider}")
    print(f"  Capabilities: {', '.join(app.capabilities)}")
    print()

Error Handling

from axiomeer import (
    AgentMarketplace,
    AuthenticationError,
    RateLimitError,
    ExecutionError
)

try:
    marketplace = AgentMarketplace(api_key="axm_xxx")
    result = marketplace.shop("I need to process images")
    execution = result.execute(marketplace, image_url="https://example.com/photo.jpg")

except AuthenticationError:
    print("Invalid API key")
except RateLimitError as e:
    print(f"Rate limit exceeded. Retry after {e.retry_after} seconds")
except ExecutionError as e:
    print(f"Tool execution failed: {e}")
    print(f"Details: {e.details}")

API Reference

AgentMarketplace

Main client for interacting with Axiomeer.

__init__(api_key, base_url, timeout)

  • api_key (str): Your Axiomeer API key
  • base_url (str, optional): API base URL (default: http://localhost:8000)
  • timeout (int, optional): Request timeout in seconds (default: 30)

shop(task, required_capabilities, excluded_providers, max_cost_usd)

Find the best tool for your task.

Returns: ShopResult

execute(app_id, params)

Execute a tool with given parameters.

Returns: ExecutionResult

list_apps(category, search, limit)

List available applications.

Returns: List[AppListing]

health()

Check API health status.

Returns: Dict[str, Any]

Models

ShopResult

Result from shopping for a tool.

Attributes:

  • selected_app (AppListing): The recommended tool
  • reasoning (str): Why this tool was selected
  • confidence (float): Confidence score (0.0 - 1.0)
  • alternatives (List[AppListing]): Alternative tools

Methods:

  • execute(marketplace, **params): Execute the selected tool

ExecutionResult

Result from executing a tool.

Attributes:

  • success (bool): Whether execution succeeded
  • result (Any): The execution result
  • app_id (str): Tool that was executed
  • execution_time_ms (float): Execution time
  • cost_usd (float): Cost in USD
  • error (str): Error message if failed

AppListing

Represents a tool in the marketplace.

Attributes:

  • app_id (str): Unique identifier
  • name (str): Tool name
  • description (str): Tool description
  • provider (str): Provider name
  • capabilities (List[str]): List of capabilities
  • trust_card (Dict): Trust and security information
  • category (str): Tool category
  • uptime (float): Uptime percentage

Environment Variables

  • AXIOMEER_API_KEY: Your API key (alternative to passing it directly)
  • AXIOMEER_BASE_URL: Custom API base URL (default: http://localhost:8000)

Support

License

MIT License - see LICENSE for details.

Project details


Download files

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

Source Distribution

axiomeer-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

axiomeer-0.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file axiomeer-0.2.0.tar.gz.

File metadata

  • Download URL: axiomeer-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for axiomeer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71178cbea78adb2d2eafe8586e5c8a0ec639fb2b99e5b738cea1d49b1ba8abe2
MD5 d964a768b5465781cfb2f2d2ac4f80e0
BLAKE2b-256 eba6cd96885c61ca0fa755e1f581661bc4902d4977a33d3d40548fdbd2b27134

See more details on using hashes here.

File details

Details for the file axiomeer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: axiomeer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for axiomeer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2378fd20e92439e8e55f2c34ff9408c42d3f8debf9afcc96e430e4dc2dda907
MD5 fe5285794066e73e9fa925069aaf8fcc
BLAKE2b-256 f4c6f80f177a91db532a8b49015d15ddb7d830c85e7bebaae2112ad2213caf49

See more details on using hashes here.

Supported by

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