Official Python SDK for BotManifold - Robot Policy Verification & Competition Platform
Project description
BotManifold SDK
Official Python SDK for BotManifold - Robot Policy Verification & Competition Platform.
Installation
pip install botmanifold
Quick Start
from botmanifold import BotManifoldClient
client = BotManifoldClient(api_key="bm_live_...")
# Verify a policy (primary use case)
report = client.verify.run("my_policy.zip", scenario="messy_room")
print(f"Verdict: {report.verdict}") # SAFE, UNSAFE, or ERROR
print(f"Score: {report.score}")
# Submit to arena (competition)
submission = client.arena.submit("my_policy.zip", scenario="messy_room")
print(f"Submission ID: {submission.id}")
CLI Usage
# Verify a policy (primary command)
botmanifold verify my_policy.zip --scenario messy_room
# Submit to arena
botmanifold arena submit my_policy.zip --scenario messy_room
# Check submission status
botmanifold arena status <submission_id>
# View leaderboard
botmanifold arena leaderboard --scenario messy_room
API Reference
BotManifoldClient
The main entry point for the SDK.
client = BotManifoldClient(
api_key="...", # Or set BOTMANIFOLD_API_KEY env var
base_url="...", # Optional, defaults to production
timeout=30, # Request timeout in seconds
)
Verify API (Primary)
# Quick verification (waits for result)
report = client.verify.run(
policy="policy.zip",
scenario="messy_room",
num_episodes=5,
timeout=300,
)
# Check if safe
if report.is_safe:
print("Policy is safe!")
# Async verification (non-blocking)
job = client.verify.submit(policy, config)
report = client.verify.wait(job.job_id)
Arena API (Competition)
# Submit to competition
submission = client.arena.submit(policy, scenario)
# Check status
status = client.arena.status(submission.id)
# Wait for completion
result = client.arena.wait(submission.id)
# View leaderboard
entries = client.arena.leaderboard(scenario="messy_room", limit=10)
Environment Variables
| Variable | Description |
|---|---|
BOTMANIFOLD_API_KEY |
API key for authentication |
BOTMANIFOLD_API_URL |
Custom API base URL |
BOTARENA_API_KEY |
Legacy API key (deprecated) |
Migration from botarena
The botarena package is deprecated. Update your imports:
# Old (deprecated)
from botarena import Client
client = Client()
submission = client.submit("policy.zip", scenario="messy_room")
# New (recommended)
from botmanifold import BotManifoldClient
client = BotManifoldClient()
report = client.verify.run("policy.zip", scenario="messy_room") # Primary
submission = client.arena.submit("policy.zip", scenario="messy_room") # Arena
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Run linting
ruff check botmanifold/
License
Proprietary - see LICENSE file.
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
botmanifold-0.3.0.tar.gz
(13.3 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
File details
Details for the file botmanifold-0.3.0.tar.gz.
File metadata
- Download URL: botmanifold-0.3.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6d836efd99e62c507fa9bd76f834c27d75297c86e7145305869981f1be33964
|
|
| MD5 |
4061b25a3bfd5c3fc22b8a9c31a39507
|
|
| BLAKE2b-256 |
d899de32af44a31a6c7aa1d03d301799c0e756fb37973884f4c2233345ec8451
|
File details
Details for the file botmanifold-0.3.0-py3-none-any.whl.
File metadata
- Download URL: botmanifold-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2824822a0d438409efc6546206f5a550457fdf0bd63bfc6e0249dcc81dc3e736
|
|
| MD5 |
c82fc97b7f6ac8c32db8749701dda80a
|
|
| BLAKE2b-256 |
ed5eda947935853a49ab7e1665148a27ca434c6cb3a45ec13b0704d89bf01af5
|