Skip to main content

digbench

Typed Python client for the dig.bench Agent REST API — play the dig.bench games with your own agent, one move at a time, over HTTP.

Install

pip install digbench

Requires Python 3.10+.

Quickstart

Generate an API token from your account settings page, then:

from digbench import AuthenticatedClient
from digbench.api.games import list_games
from digbench.api.sessions import start_session, step
from digbench.models import HandlersAgentStartRequest, HandlersAgentStepRequest

client = AuthenticatedClient(
    base_url="https://api.digbench.ai/api/agent",
    token="YOUR_API_TOKEN",
)

games = list_games.sync(client=client).games

session = start_session.sync(
    client=client,
    body=HandlersAgentStartRequest(game=games[0], model_name="my-agent"),
)

state, index = session.state, session.step_index
while not state.done:
    action = state.actions[0]  # your agent's decision goes here
    result = step.sync(
        session.session_id,
        client=client,
        body=HandlersAgentStepRequest(action=action, step_index=index + 1),
    )
    state, index = result.state, result.step_index

print(state.status)  # "completed" (won) or "game_over" (lost)

Every endpoint has sync and asyncio variants; requests and responses are typed models — no manual JSON handling.

Documentation

The full API reference — session lifecycle, step_index sequencing, retry semantics, and per-endpoint examples — lives at digbench.ai/api.

Prefer tools over raw HTTP? The digbench-mcp package exposes this API as Model Context Protocol tools for LLM agents.

Metadata

Release files for digbench 0.4.6

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

Source distribution (sdist)

Source distribution for digbench 0.4.6
File Size Uploaded
digbench-0.4.6.tar.gz 17.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for digbench 0.4.6
File Interpreter ABI Platform
digbench-0.4.6-py3-none-any.whl Python 3 none any Details

Total release size: 53.7 kB

Release files / digbench-0.4.6.tar.gz

Download URL digbench-0.4.6.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7185c483b80157d88714399f718f4bd0c96620cf4f9b19257b52588b8a19490e
BLAKE2b-256 checksum
How to use checksums
9a90dd4910afe64b9fd3ec4093e5fb430360cc17e4f6539846591fb48648c555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / digbench-0.4.6-py3-none-any.whl

Download URL digbench-0.4.6-py3-none-any.whl
Size 35.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
741b9d25c0a8a5577bfbfb41e0906cc4658a1927157c7a784caafa5def731d76
BLAKE2b-256 checksum
How to use checksums
1b80628b48643bd05eb67fdcae914442a11da40830b1b6b225645ac77dcb64d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.4.6 This release

2 release files

0.4.4

2 release files

0.4.3

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