Orcrist: A Coding Agent using LLM state machines Orcrist is a new domain-specific language for state machines whose states are executed by an LLM, paired with a desktop coding agent that runs on it. Before touching a task, the agent writes an Orcrist machine grounded in the grammar and authoring guide read at runtime from the repo's metamodel/orcrist.langium file, then executes it one state at a time with guards deciding what happens next until a final state is reached. The project requires Node 20 or newer and an API key for Anthropic or OpenAI, or a local Ollama model that supports tool calling. Orcrist is a DSL for state machines whose states are executed by an LLM, and a desktop coding agent that runs on it. You give the agent a task. Before touching anything it writes an Orcrist machine for that task, grounded in the grammar and the authoring guide in this repo, and then executes that machine one state at a time. Each state's prompt goes to the model, the model works with real tools, the runtime measures what it can and records what the state is declared to report, and the machine's guards decide what happens next. The run ends when it reaches a final state. The point is the one the authoring guide makes: a to-do list only contains what was explicitly asked for, and has no answer for what happens when a step doesn't go as planned. A machine has to declare its failure paths, its retry budgets and its escalation states before the work starts. A run in progress. The transcript carries the states as they happen; the panel on the right holds the machine, the state now executing with the instruction it was given, and the store, with each location marked by who writes it: the agent, a measurement, or a set . orcrist/ ├── metamodel/ │ ├── orcrist.langium the grammar, ground truth for the authoring step │ └── authoring-guide.md the criteria the authoring model is told to follow ├── examples/ .orc canonical syntax, shown to the authoring model ├── src/ the app: core, language implementation, renderer ├── electron/ the main process and the preload bridge ├── scripts/ the self-test ├── prompts/ project prompts to run the agent against ├── brand/ the mark, the lockup, the icons ├── screens/ the screenshots in this README └── docs/ how the app works, in depth The grammar, the guide and the examples are read at runtime , not compiled in: the app walks up from its own folder until it finds metamodel/orcrist.langium . Editing the language therefore changes what the authoring step is grounded in without rebuilding anything, and a checkout with metamodel/ missing has nothing to author machines against. - Node 20 or newer , with npm - macOS, Linux or Windows - An API key for Anthropic or OpenAI, or a local Ollama https://ollama.com with a model that supports tool calling git clone