I made a state machine framework for guided conversations with LLMs
It’s written in Python and I call it GoalChain. It lets you build a conversation flow graph that the user traverses. When there’s enough input it spits out a dictionary with the defined fields. Otherwise it will jump state to state as led by the user. It was fun to write, and it’s surprisingly effective if you keep in mind you’re prompt-engineering every string and field name. README.md has a mini-tutorial. Would be cool to get some ideas for how to build it further and what improvements I could make.
In plain words
GoalChain is a Python framework for building guided conversations with large language models using state machine graphs. It structures dialogue flows where users navigate between states, and the system collects information until it has enough data to output a structured dictionary with defined fields. The framework is designed for developers who need to guide LLM interactions toward specific information-gathering goals, requiring careful attention to prompt engineering for field names and conversational strings.
written from the facts on this page · September 2026
Does the same job
all alternatives →- IBI built a tiny LLM to demystify how language models workApr 2026 · github.com · ▲915
Built a ~9M param LLM from scratch to understand how they actually work. Vanilla transformer, 60K synthetic conversations, ~130 lines of PyTorch. Trains in 5 min on a free Colab T4. The fish thinks the meaning of life is food. Fork it and swap the personality for your own character.
- A1A 100-Line LLM Framework2025 · github.com · ▲9
I've seen a lot of comments about how complex frameworks like LangChain can be. Over the holidays, I wanted to see how minimal an LLM framework could get if we stripped away everything non-essential. The result is an LLM framework in just 100 lines of code. These 100 lines capture what I see as the core abstraction of most LLM frameworks: a nested directed graph that breaks down tasks into multiple LLM steps, with branching and recursion to enable agent-like decision-making. From there, you can layer on more advanced features like agents, RAG, task decomposition, and more. I’ve intentionally…
- MCMamba-Chat – A Chat LLM Based on State Space Models2023 · github.com · ▲9
Hey everyone! Many of you might have come across the Mamba paper a few days ago, which introduced an LLM based on a state space model architecture. The Mamba architecture is quite useful as its complexity scales subquadratically with input length and is therefore way more efficient than transformer models: https://github.com/state-spaces/mamba I got really excited about the paper, so I decided to fine-tune the model on a chat dataset. It turns that this actually worked quite well! The model is quite suitable for casual chatting, which honestly surprised me given that it…
- GBGraph-Based Editor for LLM Workflows2024 · github.com · ▲8
Hey HN, We’re excited to share PySpur, an open-source tool that provides a graph-based interface for building, debugging, and evaluating LLM workflows. Why we built this: Before this, we built several LLM-powered applications that collectively served thousands of users. The biggest challenge we faced was ensuring reliability: making sure the workflows were robust enough to handle edge cases and deliver consistent results. In practice, achieving this reliability meant repeatedly: 1. Breaking down complex goals into simpler steps: Composing prompts, tool calls, parsing steps, and branching…
- CRChainFactory – Run Structured LLM Inference with Easy Parallelism2024 · github.com · ▲8
hi everyone. how does moving llm call prompts and output structure definitions away from code into configuration land sound? would you use something like this if it was stable and well documented enough? please don't hold back the criticism. i appreciate all feedback (constructive & otherwise).
- KAKnowing – an LLM tool built on concept hierarchies, not prompt-response2024 · ▲5
Hey HN! I've spent the past year full-time building Knowing, a tool for interacting with LLMs directly inside hierarchical structures instead of the usual prompt-response format. The idea started because I realized how much more intuitive it felt to build concept hierarchies continuously—no more endless copy-pasting or wondering how everything connects. The journey’s been a struggle. While I see huge potential in structuring AI interactions this way (writing books fast, planning projects, or organizing ideas), it’s been hard to pin down clear use cases in the market. I’m also working in near…
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com
