← projects

Project case study

AgentMES

shipped

Manufacturing execution system for autonomous agents. OpenAI's 7-stage AI-Native Engineering Workflow as a bipartite state machine, agents do throughput work, humans own the judgment gates.

platform · 2026 · repo ↗ · live ↗
PythonBlaxelCodexRedisFastAPISSE
Event context Blaxel × Codex × Redis AI Hack Day Built at Wordware HQ, San Francisco · April 2026

AgentMES is a manufacturing execution system for autonomous agents.

The architecture: tickets flow left to right through 7 columns in a kanban. Agents do the throughput work (planning, drafting, coding, testing, verifying). Humans own the judgment gates (approval, taste calls, edge-case overrides). Receipts accumulate inside each card so the final card body is the audit trail. No separate logs to reconcile.

The demo runs two tickets in parallel through the same pipeline, a code change (OAuth /v2 rate-limit fix that triggers the Stage 5 memory-drift catch) and a knowledge-work ticket (status-update email), both finishing in merged state in under 10 seconds. Same orchestrator, two kinds of work.

Renderer-agnostic. The same 7-stage orchestrator drives a terminal kanban (Rich) and a real interactive web kanban (FastAPI + SSE). Pick the surface; the state machine is identical.

Originally built at the Blaxel × Codex × Redis AI Hack Day at Wordware HQ (April 2026). The substrate decision was the takeaway: MES-style bipartite state machines are the right backbone for human-in-the-loop agent work, agents handle the throughput, humans hold the bar.

Implementation notes

  • Codex. The build-stage agent: it writes the actual code change (the OAuth race fix landed +47/-3). What I learned is that giving the build agent a narrow, well-framed ticket beats a broad prompt; the 7-stage pipeline exists to hand Codex exactly that.
  • Blaxel. The sandbox runtime for the test stage: it spins up an isolated environment, runs the change across iterations, captures results, and tears down. The innovative part is that the test stage is real execution, not the model claiming the tests pass.
  • Redis. Durable state plus the lesson store: the document stage writes a reusable lesson (mem_4471) and receipts accumulate inside each card. Because the receipts live in Redis, the final card body is the audit trail, with no separate logs to reconcile.

The real takeaway was the substrate decision: an MES-style bipartite state machine, where agents do the throughput and humans hold the judgment gates, is the right backbone for human-in-the-loop agent work.