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.5.tar.gz (11.7 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.5-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: roe_ai-0.1.5.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for roe_ai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 84728cf1976f5d35ac468ca0303613d66779aaa35f27545c527db5ce76934b76
MD5 3efe801cd5e4d4ad52c9e842215e0f91
BLAKE2b-256 5b27df9b3ce66affceb0be09b103bbe665abbddf1e5451e33046d147508b189e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: roe_ai-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for roe_ai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 db5fa1ebf016a1228d25ff5c38f88ca9b29fc131994653f30d746c1a10b2b25c
MD5 0d548759c3cc7eced34eae0073288654
BLAKE2b-256 8ab9a4cb45515f076ce76010345f9b6588a9ff8ec5de62c6b42d98f9a7420dcd

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