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.4.tar.gz (16.6 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.4-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: digbench-0.4.4.tar.gz
  • Upload date:
  • Size: 16.6 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.4.tar.gz
Algorithm Hash digest
SHA256 162b6e252952de95acf714a704baa6bf399dc6e124d88873efaa2e3d12c5ffaf
MD5 f12e42ca4c43c611f65d19a3b2146a3e
BLAKE2b-256 a611f8df8af89be4b5eeed3a81489983b358fbbd0f4d26edb24eec9e017c15a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: digbench-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 32.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 09438033a9a67327b8dde905215f14854349eef730e5745f4f8ded898a5a2ce2
MD5 0b896c137f301fb2519c3c5bfd7a793f
BLAKE2b-256 99c05550e0039a3c2d73dc98c63515f8d04cbaaca36e8afbd22fced7c84f3319

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