Skip to main content

Quick Start

from roe import RoeClient

client = RoeClient()

# List agents
agents = client.agents.list_base_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}")

Authentication

Set credentials as environment variables:
export ROE_API_KEY="your-api-key-here"
export ROE_ORGANIZATION_ID="your-organization-uuid"

Batch Processing

batch = client.agents.run_many(
    agent_id="agent-uuid",
    inputs_list=[
        {"prompt": "Analyze sentiment: I love this!"},
        {"prompt": "Analyze sentiment: This is terrible."},
    ]
)

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"
)

Timeout Configuration

job = client.agents.run(
    agent_id="agent-uuid",
    timeout_seconds=600,  # 10 minutes
    document="contract.pdf"
)

try:
    result = job.wait()
except TimeoutError:
    print("Job exceeded timeout")

Configuration

Environment variables:
  • 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)
I