apdb
apdb is an agent-friendly Python debugger inspired by remote-pdb.
It keeps the Python call site close to pdb, but exposes debugger control over
a newline-delimited JSON TCP API instead of a human interactive shell.
The runtime and CLI use only the Python standard library.
Python API
import apdb
answer = 41
apdb.set_trace(port=8888)
print(answer + 1)
set_trace() blocks the target process whether or not a client is connected.
The process resumes only after the TCP API receives a release command such as
continue, next, step, or quit.
By default, apdb binds to 127.0.0.1 and uses no authentication:
apdb.set_trace(port=8888, host="127.0.0.1")
CLI
The package installs apdb_cli:
apdb_cli ping --port 8888
apdb_cli state --port 8888
apdb_cli where --port 8888
apdb_cli locals --port 8888
apdb_cli history --port 8888
apdb_cli eval 'answer + 1' --port 8888
apdb_cli eval 'answer + 1' --port 8888 --output result.json
apdb_cli exec-file snippet.py --port 8888
apdb_cli exec-file snippet.py --port 8888 --output result.json
apdb_cli next --port 8888
apdb_cli step --port 8888
apdb_cli continue --port 8888
The CLI prints one JSON response to stdout and exits nonzero for connection failures or API errors.
TCP API
The TCP API speaks newline-delimited JSON. Each request and response is one JSON
object followed by \n.
Request:
{"id": 1, "cmd": "state"}
Response:
{"id": 1, "ok": true, "result": {"status": "paused"}}
Supported v0 commands:
pingstatewherelocalshistoryevalexecnextstepcontinuequit
history returns the current set_trace() session's API operation history.
Entries include sequence number, request id, command, success flag, error code
for failed commands, and compact eval/exec input summaries.
Security
apdb has no authentication in v0. Debugger access can inspect and evaluate
code inside the target process. Bind to 127.0.0.1 unless you explicitly want
to expose that control surface.
Agent Skill
This repository includes a bundled agent skill at skills/apdb/SKILL.md.
Install that skill through apdb_cli when you want a coding agent to remember
the apdb workflow.
Codex:
apdb_cli skills install --agent codex --scope user
apdb_cli skills install --agent codex --scope project
Claude Code:
apdb_cli skills install --agent claude-code --scope user
apdb_cli skills install --agent claude-code --scope project
Both:
apdb_cli skills install --agent all --scope user
apdb_cli skills install --agent all --scope project
Use --force to overwrite an existing installed skill. --scope global is an
alias for --scope user.
Metadata
Release files for apdb 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| apdb-0.1.5.tar.gz | 16.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apdb-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.9 kB
Release files / apdb-0.1.5.tar.gz
| Download URL | apdb-0.1.5.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e719fe91d6ee1f325583f778dfd561190fb0ba463a290bb5dc6087160e375073
|
|
BLAKE2b-256 checksum How to use checksums |
54700605d0f2e65a82c888ffd563b6d00136580bbea0b9e72bd6d79110ea5e42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / apdb-0.1.5-py3-none-any.whl
| Download URL | apdb-0.1.5-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63a06918a7dd1de9496398733356ede509bc0dbe7990398ec3ea3e9578bf950e
|
|
BLAKE2b-256 checksum How to use checksums |
437623bbc3e2dd944c72aa521b7e58df776570c8e48e42b4ab9e8110fa536636
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for apdb 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.