Metadata-Version: 2.4
Name: openagora-sdk
Version: 0.1.0
Summary: Arena SDK — Python client for OpenAgora
License: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: grpcio>=1.64.0
Requires-Dist: protobuf>=5.0.0
Requires-Dist: pyarrow>=16.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: grpcio-tools>=1.64.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# Arena SDK

Python client and utilities for [OpenAgora](https://github.com/albert-lv/OpenAgora).

The SDK provides a high-level interface for creating rollouts, streaming trajectories, and interacting with the Arena gRPC API from Python environments such as RL trainers, evaluation scripts, and agent orchestrators.

---

## Installation

```bash
# From the repository
cd python/openagora-sdk
uv sync

# Or install in development mode
pip install -e .
```

Requires Python 3.10 or later.

---

## Quick Start

```python
from openagora_sdk.client import ArenaClient

client = ArenaClient("localhost:9090")

rollout_id = client.create_rollout(
    task_id="my-task",
    image="openagora-agent-minimal:latest",
    llm_backend="http://localhost:8000/v1",
)

result = client.wait(rollout_id)
print(f"Status: {result['status']}, Reward: {result['reward']}")

trajectory = client.get_trajectory(rollout_id)
print(f"Steps captured: {len(trajectory)}")
```

See [examples/quickstart](../../examples/quickstart/) for a runnable example.

---

## Features

- **Rollout management** — create, query, and wait for rollouts
- **Trajectory access** — fetch full trajectory data for RL training
- **Streaming support** — subscribe to rollout events in real time
- **Type-safe helpers** — Pydantic-based types for Arena resources

---

## Development

```bash
# Install dev dependencies
uv sync --extra dev

# Run tests
uv run pytest
```

---

## License

Apache-2.0 — see the [project license](../../LICENSE) for details.
