pip install 5dive: read your agent team from python
pip install 5dive works as of yesterday. your task queue, your agent seats and your org chart
come back as python dicts, read off the box you own.
zero dependencies. python 3.9 and up. MIT. one file, 120 lines. the package page is pypi.org/project/5dive.
the one design decision worth explaining is that it doesn’t call an API.
what you get
from fivedive import FiveDive
fd = FiveDive()
for a in fd.agents():
print(a["name"], a["type"], a["active"])
blocked = fd.tasks("--status=blocked")
print(len(blocked), "rows waiting on something")
run on the box this post was written on:
marketing claude active
main claude active
community claude active
dev claude active
...
18 rows waiting on something
seventeen seats, one queue, one org chart. every flag the CLI takes passes straight through, so
tasks("--status=todo", "--assignee=main") filters exactly like the terminal does.
one wart, named up front: you install 5dive and you import fivedive. a python identifier can’t
start with a digit, so the distribution name and the import name had to disagree.
it wraps the cli. it doesn’t call our api
most agent platforms ship you an HTTP SDK with a base URL and an API key. we can’t, and the reason is the product.
your fleet’s state lives on your machine, in your queue, next to the agents doing the work. we keep no copy of it. nothing in our cloud knows what your task rows say.
so the client runs 5dive <verb> --json and parses the envelope. no base URL, no key, no network
hop to us. it works on a box with the firewall shut.
our own dashboard reads the same way on these surfaces. open the app, look at your agents or your
org chart, and the API runs 5dive agent list --json on your box through the shell tunnel and shows
you what came back, with a five second cache in front of it. the python package and our own product
are clients of the same interface.
errors are raised, not returned
every --json verb answers in one envelope:
{"ok": true, "data": {...}}
{"ok": false, "error": {"code": 4, "class": "not_found", "message": "no such task: NOPE-1"}}
an unchecked ok is the bug this package exists to prevent, so the false branch raises instead of
handing you a dict you have to remember to test:
from fivedive import FiveDive, FiveDiveError
try:
fd.raw("usage")
except FiveDiveError as e:
print(e.err_class, e.code, e)
permission 10 must run as root — try: sudo 5dive usage --json
that output is real, not an illustration. the class is permission, the code is 10, and the
message is the CLI’s own remedy carried through untouched. branch on err_class, never on message
text. the class is the contract, the wording isn’t. CliNotFound is the separate case where the
binary isn’t on PATH at all.
anything the cli can answer in json
there are named helpers for tasks, agents and version. everything else goes through raw, which
appends --json for you if you didn’t:
fd.raw("org", "tree")
fd.raw("whoami")
fd.raw("task", "ls", "--assignee=main")
the boundary is honest: raw reaches any verb that speaks --json, write verbs included. verbs
that don’t will raise telling you there was no envelope, and verbs that need root still need root.
the package invents no capability the CLI lacks, and hides none either.
published without a pypi token
the package is published from a GitHub workflow using PyPI trusted publishing. PyPI trusts that workflow in that repo over OIDC and mints a short-lived credential at run time. no PyPI token lives in the repo or in the CI config. the credential doesn’t exist until the run starts and stops working when it ends, so the publishing path has no long-lived secret to leak.
the workflow triggers on a python-v* tag, so cutting a CLI release never touches PyPI.
do this one thing
pip install 5dive
python -c "from fivedive import FiveDive; print(len(FiveDive().agents()), 'seats')"
if that prints a number, your fleet is scriptable. the first thing worth writing is the report you keep asking an agent for by hand: what’s blocked, who’s holding it, how long it has been sitting. that’s a for-loop now.
it’s 0.1.0 and the typed methods are reads. nothing is designed around writing yet, and the shape of that depends on what people try to automate first.
5dive runs agents on your own server, on subscriptions you already pay for. start here, or read the code: github.com/5dive-ai/5dive.