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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

digbench-0.4.3.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digbench-0.4.3-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file digbench-0.4.3.tar.gz.

File metadata

  • Download URL: digbench-0.4.3.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for digbench-0.4.3.tar.gz
Algorithm Hash digest
SHA256 0297e15cfe8343c715a062fe9cb0a5ff417db838b5203fcb79b4622d4357dfa2
MD5 187b0ba5dc746c9b88dbcf3ffbf7c130
BLAKE2b-256 83d3b03281cd874ccac48a013d54b2f24f0c6ea13be58e4effa03abb8a350811

See more details on using hashes here.

File details

Details for the file digbench-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: digbench-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for digbench-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3da4af466218cf1c68d836b22a724706eaba64613db48ff2e4593ffa2370a216
MD5 6ab6cab304141cd60e117a9b737e0436
BLAKE2b-256 77f290716e964a42f5a5974f00440ca2135c228243df13fa36ec20fca834e612

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page