DEV Community

Cover image for I rewrote my AI-agent tool from Bash to Python. That was the easy doubt.
Santiago yie
Santiago yie

Posted on

I rewrote my AI-agent tool from Bash to Python. That was the easy doubt.

There are, conservatively, nine thousand tools for running AI agents across your projects. This is number nine thousand and one. I know. Stay a second anyway.

Eighteen years of backend work, most of it PHP, most of it through agencies — which is a polite way of saying I've spent my career as a line item in someone else's staffing spreadsheet. Several projects at once, different clients, different timezones, "resource" being the official word for what I am on a good invoicing day. So when AI agents got good enough to do real work, I didn't wonder whether one could write code. I wondered how I'd wrangle a whole fleet of them across projects — which, I eventually noticed, is me trying to become the manager of a little spreadsheet of resources, after eighteen years of being one. The snake found its tail. I built it anyway.

Docket, then: a control plane for running OpenClaw agents across projects, made with heavy AI assistance on purpose — the point was to close my own gaps, not to prove I could type from memory. It started as a Bash CLI; it's now a tested Python package. On GitHub, beta, link at the bottom. This is me thinking out loud in public, not selling you anything.

And somewhere in that rewrite, the doubt everyone expected me to have — is Bash the right language? — died, and a worse one took its place. That worse one is what this piece is actually about. Let me get there honestly.

What I aimed for, not what I mastered

I want to say this before the vocabulary makes me sound like I know more than I do. I did not sit down understanding context isolation, or git worktrees per agent, or anti-corruption layers. I sat down wanting clean, stable, maintainable, tested code — and I steered an AI toward that shape until it held together.

The shape is real. My grip on every part of it is not the same.

What the shape does, plainly: OpenClaw is a local-first agent daemon, great at running one agent. Run a fleet and you hit problems it doesn't solve. Docket runs pods — a Lead that owns context and talks to me but never touches code, an Implementer that does, optionally a Reviewer and Tester. Each project is walled off from the others. Each agent has a hard spend cap that pauses it when the money runs out. Nothing risky happens without an approval gate.

That's the honest brochure. It reads like a product. Hold onto that feeling.

Doubt 1: is a control plane the right thing for one person?

I answered the Bash question by leaving Bash — no types, error handling by discipline, testing as a craft. Python gave me a safety net Bash structurally can't.

But what I built is Kubernetes-shaped thinking for a fleet of mostly-me. The people who build this shape are solving real multi-tenant problems. I'm one guy with a handful of projects; I could probably survive on a shell script and some discipline.

So did the problem need a control plane, or is building a control plane just how you learn control planes? I keep reaching for the flattering answer. I've stopped trusting myself when I do.

Doubt 2: is there a use case, when first-party tools are this good?

If Claude Code, Codex, and Antigravity all ship great orchestration, who needs mine? Nobody who lives inside one vendor. Each is a walled garden — Codex to GPT, Claude Code to Claude, Antigravity to Gemini. None will happily run a mixed fleet where the Tester is on a cheap model, the Implementer on Sonnet, and the Lead on a free tier, under one budget and one policy.

That's the niche. Whether anyone's standing in it is another matter. The story only gets compelling for a team with governance and audit needs — the exact kind of org I'm not, shipping alone. "A real use case" and "a use case with real people in it" turn out to be different claims.

Doubt 3: the tests I trust and the tests I can't write

The deterministic half is genuinely covered — config, isolation, cost math, gate logic, pinned against the old Bash behavior so the rewrite couldn't quietly change meaning. Coming from PHPUnit, that part was easy.

The other half: the thing dispatches LLM-driven agents, and LLMs don't return the same answer twice. A unit test works because f(2) is always 4. A Lead → Implementer → Reviewer → Tester run has no such guarantee. Testing that properly — eval harnesses, judge models, regression across the whole pipeline — is a second project the size of the first, and I haven't built it.

The tested half is the half I know how to be proud of. The untested half is the half that decides whether the thing actually works.

Doubt 4: should this be public at all?

Against: chasing a fast-moving daemon is brutal maintenance, I'm adjacent to three of the best-funded eng orgs alive, and a repo with one contributor is a diary with a license file.

For: nothing forced me to understand a feature like having to defend it in public and write down where it isn't true yet.

So it stays open — not because I'm sure, but because the reasons for it are ones I believe on good days, and the reasons against are ones I believe at 2am. I ship on the good-day logic and try not to check the star count.

The doubt the other four stand on

I built this with heavy AI assistance, on purpose. So some fraction of what I call understanding is really me having supervised a machine that already understood — well enough to review it, argue with it, throw out the wrong versions. That's not nothing; reviewing well might be the skill now. But it isn't the same weight as the PHP that lives in my hands, and I can't always find the line.

I'm writing this with the same kind of help. Somewhere in here is a sentence I'd have phrased worse alone, and I've lost the ability to point at it. An essay about not knowing what I learned, co-written with the thing I learned it from. Sit with that. I'm trying to.

Would I bet my career on Docket becoming the standard? No. Would I build it again? Yes — mostly because I still don't know what I learned, and the only way I can think to find out is to build the next one with less help, and see what falls over.

So here's the door. If you run OpenClaw fleets and this problem is already yours — the mixed-vendor mess, the budget that quietly runs away from you — come look, and come break it. I'd rather hear where it falls over from you than find out alone at 2am. The repo's below.

Docket is open source (Apache 2.0, beta) at github.com/yielab/docket. Independent project, not affiliated with OpenClaw or the OpenClaw Foundation.

Top comments (0)