Skip to main content

Python SDK for the Roe AI API

Project description

Roe AI Python SDK

A Python SDK for interacting with the Roe AI API.

Installation

uv add roe-ai

Quick Start

Authentication

Set your API credentials as environment variables:

export ROE_API_KEY="your-api-key-here"
export ROE_ORGANIZATION_ID="your-organization-uuid-here"

Basic Usage

from roe import RoeClient

# Initialize client
client = RoeClient()

# List agents
agents = client.agents.list_base_agents()
print(f"Found {agents.count} agents")

# Run an agent
job = client.agents.run(
    agent_id="your-agent-uuid",
    prompt="Hello world"
)
result = job.wait()

# Process results
for output in result.outputs:
    print(f"{output.key}: {output.value}")

Batch Processing

# Run multiple jobs
batch = client.agents.run_many(
    agent_id="agent-uuid",
    inputs_list=[
        {"prompt": "Analyze sentiment: I love this!"},
        {"prompt": "Analyze sentiment: This is terrible."},
        {"prompt": "Analyze sentiment: It's okay."},
    ]
)

# Wait for all to complete
results = batch.wait()
for result in results:
    print(result.outputs)

File Uploads

# File path (auto-upload)
job = client.agents.run(
    agent_id="agent-uuid",
    document="path/to/file.pdf",
    prompt="Analyze this document"
)

# Existing Roe file ID
job = client.agents.run(
    agent_id="agent-uuid",
    document="file-uuid-here",
    prompt="Analyze this document"
)

Examples

For detailed examples, see the examples/ directory:

  • run_agent_simple.py - Basic agent execution
  • run_agent_with_file.py - File upload handling
  • run_agent_many.py - Batch processing
  • list_agents.py - List available agents
  • get_agent.py - Get agent details
  • agent_versions.py - Work with agent versions
  • file_upload_methods.py - Different file upload methods

Configuration

The client can be configured via environment variables or constructor parameters:

  • ROE_API_KEY - Your API key (required)
  • ROE_ORGANIZATION_ID - Your organization ID (required)
  • ROE_BASE_URL - API base URL (optional)
  • ROE_TIMEOUT - Request timeout (optional)
  • ROE_MAX_RETRIES - Max retries (optional)

Documentation

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

roe_ai-0.1.8.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

roe_ai-0.1.8-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file roe_ai-0.1.8.tar.gz.

File metadata

  • Download URL: roe_ai-0.1.8.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roe_ai-0.1.8.tar.gz
Algorithm Hash digest
SHA256 90d34acf644d03d135333ca0b808a145b0152407e7da5bf026356667f30ab1f1
MD5 ae9e8ca35c87f1b61954e298f98a19c9
BLAKE2b-256 7bc0966cc9ca466eea576c54fea596ceca527d36ead2f7cb36718b9b9576c95d

See more details on using hashes here.

Provenance

The following attestation bundles were made for roe_ai-0.1.8.tar.gz:

Publisher: publish.yml on roe-ai/roe-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file roe_ai-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: roe_ai-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for roe_ai-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c06811ddaf8bea6046686d01c11e1f087b5ca5b6201286bcba9e2d193b20d870
MD5 333dfe3865af173143c576582aec0465
BLAKE2b-256 796e49e375eb6e04373efdaa361cbfe1c1f53b2cd5708fa6d8ff9bb6342ee301

See more details on using hashes here.

Provenance

The following attestation bundles were made for roe_ai-0.1.8-py3-none-any.whl:

Publisher: publish.yml on roe-ai/roe-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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