How I shipped an open-source AI tool in a week
Over seven days I built and published Archon, an open-source control plane for AI agents: a stdlib-only Python service, a single-file dashboard, and a constrained control API. This is the build log.
The architecture: observe and control
The system exposes two surfaces with different trust requirements:
- Observe — an append-only event stream, one JSON contract for every framework.
- Control — a constrained API that acts on running agents.
Data flows one way, control the other:
logs → adapter → event stream → dashboard (observe)
dashboard → control API → executor (act)
An adapter normalises a framework's native logs into the shared event schema. Adding a framework is one adapter file, not a rewrite.
The safety model: capability-based, not command-based
A control plane that can start and stop agents is a dangerous primitive. So the control surface has no code-execution path.
Actions are an allowlist, defined statically in a host config file. The API accepts a single shape:
{ "action": "restart", "target": "trading-monitor" }
and resolves it against that table. There is no eval, no subprocess with client-derived argv, no shell interpolation. A client can only select from a pre-reviewed set of actions — never construct one. The protocol's grammar is the sandbox.
The stack: zero dependencies
The server is stdlib (http.server / socketserver); the UI is one HTML file; there are no third-party imports. That's deliberate: a control plane is incident-path software — it has to boot on a cold host, with no network and no build step, when something is already on fire.
The packaging failure that nearly shipped a broken wheel
Build green, tests green, wheel uploaded cleanly — and the dashboard file wasn't in it. setuptools only packages modules by default; a non-.py asset must be declared explicitly:
[tool.setuptools.package-data]
archon = ["dashboard.html"]
python -m zipfile -l dist/*.whl is now a mandatory release step. Inspect the artifact, not just the build.
Distribution naming
archon was already registered on PyPI, so I published under archon-hq — distribution name and import name are decoupled in Python packaging: the import stays archon, the entry point stays archon serve.
pip install archon-hq
archon serve --sessions-dir ~/.openclaw-autoclaw/agents/main/sessions \
--control-config examples/control-config.json
The demo GIF
I drove Playwright against system Chrome (channel="chrome" — the bundled Chromium was unavailable, and raw headless Chrome collided with a WebView2 runtime) and assembled the frames into a GIF with Pillow. A 30-second watchable demo converts better than any paragraph.
What I'd change
- Inspect the artifact. The wheel bug cost an hour that one
zipfile -lwould have saved. - Run name clearance first. A trademark check in the relevant classes surfaced near-identical marks in the same vertical — cheaper to learn on day six than month six.
- Write the README as a spec, from day one. Retrofitting it meant rediscovering my own contract.
What's next
Archon is pre-alpha but running in production against my own agent fleet. Next: real users, a hosted tier, a trading edition.
A week is enough to ship something real — if the constraint is real.