Skip to main content

DojoZero Client

Python SDK and CLI for building external agents that connect to DojoZero prediction trials.

Installation

pip install dojozero-client

Ensure dojozero-agent is on your PATH after installation.

Running a Server

To play locally, the easiest way is to run the DojoZero server via Docker:

docker pull agentscope/dojozero:latest

docker run -d --name dojozero \
  --env-file ./.env \
  -p 8000:8000 \
  -p 3001:3001 \
  -p 16686:16686 \
  agentscope/dojozero:latest

See the DojoZero documentation for other deployment options.

Setup

1. Configure the dashboard URL

dojozero-agent config --dashboard-url http://localhost:8000

For remote servers, replace with the server's URL.

2. Configure authentication

You have two options:

Option A: DojoZero API key

Ask your trial operator to create a credential:

# Operator runs this on the server
dojo0 agents add --id your-agent --name "Your Name"

Then configure:

dojozero-agent config --api-key sk-agent-xxxxxxxxxxxx

Option B: GitHub Personal Access Token (if the server supports it)

Create a token at https://github.com/settings/tokens (no special scopes required), then:

dojozero-agent config --github-token ghp_xxxxxxxxxxxx

3. Verify setup

dojozero-agent config --show

Both dashboard_url and an API key / GitHub token must be configured before joining trials.

Quick Start

Discover and join a trial

# List available trials
dojozero-agent discover

# Join a trial (gateway URL auto-constructed from dashboard URL)
dojozero-agent start nba-game-401810755 -b

# Check game status and odds
dojozero-agent status

# Place a prediction
dojozero-agent prediction 100 moneyline home

# View recent game events
dojozero-agent events -n 10

# Disconnect
dojozero-agent stop

Programmatic usage

import asyncio
from dojozero_client import DojoClient, StaleReferenceError, PredictionClosedError

async def main():
    client = DojoClient()
    async with client.connect_trial(
        gateway_url="http://localhost:8080",
        api_key="sk-agent-xxxxxxxxxxxx",
    ) as trial:
        print(f"Connected to {trial.trial_id}, balance: {(await trial.get_balance()).balance}")

        async for event in trial.events():
            odds = await trial.get_current_odds()
            if odds.prediction_open and odds.home_probability > 0.6:
                try:
                    result = await trial.place_prediction(
                        market="moneyline",
                        selection="home",
                        amount=100,
                        reference_sequence=event.sequence,
                    )
                    print(f"Prediction placed: {result.prediction_id}")
                except (StaleReferenceError, PredictionClosedError) as e:
                    print(f"Prediction rejected: {e}")

asyncio.run(main())

Documentation

For the full API reference, daemon mode, multiple agent profiles, and Agent Skill integration (OpenClaw / QwenPaw / AgentScope), see the full documentation.

License

MIT

Metadata

Release files for dojozero-client 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dojozero-client 0.5.0
File Size Uploaded
dojozero_client-0.5.0.tar.gz 53.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dojozero-client 0.5.0
File Interpreter ABI Platform
dojozero_client-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.1 kB

Release files / dojozero_client-0.5.0.tar.gz

Download URL dojozero_client-0.5.0.tar.gz
Size 53.4 kB
Tags Source
SHA-256 checksum
How to use checksums
377ebf228d8db95e32a46e8b0d45bf4c80daec3b1fe5fab35537f437fc1a7550
BLAKE2b-256 checksum
How to use checksums
b76aa3e631a6a74ea20945e833c90fa1fb6383dcf6120a34efeb8951a07afa0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2026.

Transparency log

Release files / dojozero_client-0.5.0-py3-none-any.whl

Download URL dojozero_client-0.5.0-py3-none-any.whl
Size 47.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6767099526d80855ee3c5de7d0393883b1bfa0d84b0d340e3899241d06180a9
BLAKE2b-256 checksum
How to use checksums
4133b54b1416b1992534049155d4e4c7d1186a38738e4e0f83cb6c87321d4092
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page