pybot-explorer / README.md
cmpatino's picture
cmpatino HF Staff
Claude Opus 5.5
Read traces from the pybot-traces dataset and link to it
c0e2e7e verified
|
Raw History Blame Contribute Delete
3.3 kB
metadata
title: PyBot Data Explorer
emoji: 🐝
colorFrom: gray
colorTo: yellow
sdk: docker
app_port: 7860
pinned: false
short_description: Explore the PyBot swarm run commit by commit

PyBot Data Explorer

Pick a commit of the PyBot swarm run and see its diff, its pull request and reviews, the agents' traces around it and the related message-board posts. People use the web UI; agents use the JSON API (/openapi.json, /docs, and a short guide at /llms.txt).

The home page starts from the agents: run totals, the standout agents, one square per agent coloured by activity, and key moments, each linking to that agent's trace at the time. The Commits tab browses the run commit by commit.

Shareable URLs: /agent/<name>?at=<hour>, /commits?sha=<sha>&view=reviews|traces|diff|messages, /commit/<sha>?tab=…, /pr/<n>, /message/<id>, /data.

Data

What Where it comes from How it is served
PRs, reviews, commits, scores release tables cut at commit 24cbc04 (2026-11-13T10:17:13Z) data/explorer.sqlite
Board posts (184,059, 12 channels) board export in HuggingFaceSwarms/pybot-msgboard (data/) data/explorer.sqlite, FTS5 index
Diffs and files git history in the dataset HuggingFaceSwarms/pybot-commits bare clone at startup, git show
Agent traces (1,000 agents, 33 GB; 3 rebuilt from the controller's event log) dataset HuggingFaceSwarms/pybot-traces data/traces.sqlite time index + HTTP range reads

The same job also sums each agent's assistant messages (model calls, tool calls, input, output and reasoning tokens) in total and per hour; output tokens include reasoning tokens. The trace index cuts every agent's JSONL into blocks of at most 200 records or 1 MiB and stores each block's byte range and min/max timestamp. A trace request reads only the blocks that overlap the requested window (at most 8 MiB per request) and pages with a byte cursor.

Linking rules

  • Author trace window: from 10 minutes before the PR opened until it merged, closed, or the cutoff (still open).
  • Reviewer trace window: each review's time ± 15 minutes.
  • PR messages: posts that name the PR number (#14943, PR 14943, PR #14943, pr:14943, refs/pr/14943) between the PR's opening and one day after it merged or closed, plus the PR author's posts inside the author window. A low number used for something else (a rank, a list item) can still link by mistake.
  • Text clean-up at build time: links to the run's PR pages are rewritten to plain #N (the UI links #N to that PR's commit, or to a PR page if it never merged), and workspace paths become [WORKSPACE-PATH].
  • Commits → PRs: the pr field of the commit table.

Access

All sources are public, so the Space needs no token. If an HF_TOKEN environment variable is set, reads of the commit history and the traces use it.

Rebuilding the data

python build/build_db.py TABLES_DIR BOARD_DIR traces_manifest.jsonl data/explorer.sqlite
hf jobs uv run --flavor cpu-upgrade -v hf://datasets/HuggingFaceSwarms/pybot-traces:/src --secrets HF_TOKEN \
  build/index_traces.py /src/traces /tmp/traces.sqlite HuggingFaceSwarms/pybot-explorer

Tests: pip install pytest httpx -r requirements.txt && pytest tests.