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 executionrun_agent_with_file.py- File upload handlingrun_agent_many.py- Batch processinglist_agents.py- List available agentsget_agent.py- Get agent detailsagent_versions.py- Work with agent versionsfile_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
- API Docs: https://docs.roe-ai.com
- Issues: https://github.com/roe-ai/roe-python/issues
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
roe_ai-0.1.6-py3-none-any.whl
(19.2 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ea54c76b6150fac3da0780a9f1bbfa623270d8e6735a8e400a3014ae401ea34
|
|
| MD5 |
df8f36453c4fdb0b3201268b6b8b1f47
|
|
| BLAKE2b-256 |
c925495e6276f83725203b008b786862c781518943568bd18f1b7a6d2f97e82e
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8d98ef82b217e8d44e3b273707e397233682c4a168cffa1f1bf7fe548fd9e52
|
|
| MD5 |
82b426a68d42441a70b157affee8afab
|
|
| BLAKE2b-256 |
91bb4d12870165fc9cdebed89b5d40d8154140aa534d8053dccddfe4b9da3c8e
|