r/Python • u/No-Base-1700 • Jul 06 '25
Discussion We built an AI-agent with a state machine instead of a giant prompt
Hola Pythonistas,
Last year we tried to bring an LLM “agent” into a real enterprise workflow. It looked easy in the demo videos. In production it was… chaos.
- Tiny wording tweaks = totally different behaviour
- Impossible to unit-test; every run was a new adventure
- One mega-prompt meant one engineer could break the whole thing • SOC-2 reviewers hated the “no traceability” story
We wanted the predictability of a backend service and the flexibility of an LLM. So we built NOMOS: a step-based state-machine engine that wraps any LLM (OpenAI, Claude, local). Each state is explicit, testable, and independently ownable—think Git-friendly diff-able YAML.
Open-source core (MIT), today.
- GitHub: https://github.com/dowhiledev/nomos
- Documentation: https://nomos.dowhile.dev
Looking ahead: we’re also prototyping Kosmos, a “Vercel for AI agents” that can deploy NOMOS or other frameworks behind a single control plane. If that sounds useful, Join the waitlist for free paid membership for limited amount of people.
https://nomos.dowhile.dev/kosmos
Give us some support by contributing or simply by starring our project and Get featured in the website instantly.
Would love war stories from anyone who’s wrestled with flaky prompt agents. What hurt the most?
13
u/[deleted] Jul 06 '25
The GitHub link returns a 404
6
u/marr75 Jul 06 '25
I've found that these methods allow you to use smaller/less capable LLMs for some agentic use cases thanks to the benefits you listed, unfortunately, there are 2 large downsides which mostly offset the benefits, IMO:
9
u/d4v3y0rk Jul 06 '25
“Free Paid Membership” 🤪
3
u/nadavperetz Jul 06 '25
Nice! Since you highlight workflows, why don't you compare also against Langgraph?
Neat website/docs. Congrats!
3
u/Key-Violinist-4847 Jul 11 '25
I usually work in classical ML, but was asked recently to build out the internal tooling for our own internal agents. I also noticed how hard it was to integrate OSS agent tooling for actual, practical enterprise use.
Actually, since I’m not marketing anything… the landscape is full of complete utter garbage that just isn’t up to par for practical integration lol.
I ended up running my own state machine packages for a bit, until I found Apache Burr (and Outlines for prompt management).
Your project looks super interesting but it is hard for me to now justify moving away from a fairly simple, Apache sponsored project — what unique practical advantages would you say this solves for someone already running a barebones state machine module for agents?