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.6.tar.gz (12.6 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.6-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for roe_ai-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4ea54c76b6150fac3da0780a9f1bbfa623270d8e6735a8e400a3014ae401ea34
MD5 df8f36453c4fdb0b3201268b6b8b1f47
BLAKE2b-256 c925495e6276f83725203b008b786862c781518943568bd18f1b7a6d2f97e82e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for roe_ai-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d98ef82b217e8d44e3b273707e397233682c4a168cffa1f1bf7fe548fd9e52
MD5 82b426a68d42441a70b157affee8afab
BLAKE2b-256 91bb4d12870165fc9cdebed89b5d40d8154140aa534d8053dccddfe4b9da3c8e

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