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.6.tar.gz (17.9 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.6-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: digbench-0.4.6.tar.gz
  • Upload date:
  • Size: 17.9 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.6.tar.gz
Algorithm Hash digest
SHA256 7185c483b80157d88714399f718f4bd0c96620cf4f9b19257b52588b8a19490e
MD5 81898fa1e13c6b2dbc0c3ad48dfdbbdc
BLAKE2b-256 9a90dd4910afe64b9fd3ec4093e5fb430360cc17e4f6539846591fb48648c555

See more details on using hashes here.

File details

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

File metadata

  • Download URL: digbench-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 35.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 741b9d25c0a8a5577bfbfb41e0906cc4658a1927157c7a784caafa5def731d76
MD5 d7679965b493a3b0961a1a7848ff2bf5
BLAKE2b-256 1b80628b48643bd05eb67fdcae914442a11da40830b1b6b225645ac77dcb64d9

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