Intro: I'm pleased to announce AI-gent Workflows [0], a new AI Agents platform with a local reasoning layer. It's based on a purpose-built state machine [1] (Actor Model) and comes with various devtools, observability, basic tools (eg search, scraping), and ubiquitous UIs. It can work natively on mobile devices, and UI sessions are more akin to remote desktop connections (easy sharing without any syncing).
Context: There was a brief HN discussion [2] while still in the stealth mode, as it addresses some design mistakes of other frameworks. In secai (the project's codename), everything is an "organic workflow" from the bottom layer up, including tools. It's called a "stateful flow graph" and it decides about the control flow. Each graph transition can be debugged to a very granular decision-making step. That leads us to the most interesting part - reasoning.
Reasoning: Turns out LLMs are great at translating procedures to that state machine, which happens via simple relations between states. Combined with Inversion of Control (IoC), all the actions are performed and reasoned about within the state machine itself (not an FSM). This isn't a low-code solution, but there is a schema layer, which may be given to a codeless person to easily adjust an agent. Because agents are state machines and agents can easily define state machines, they can effectively create themselves (to a degree).
Prompts: Everything is defined in a schema and prompts are mostly data structures. Each state can have a prompt attached to itself, and each prompt can have documents (context). Above states, there's an abstraction of Stories with actors (state machines). All the prompts are nicely archived in an SQLite file.
Memory: There are 3 memory layers - long term (SQL), short term (dynamic state machines), and the transition log. The last one is actually a stream of ML-ready binary vectors. Thanks to the relational nature of the "stateful flow graph", combined with logical clocks (each state has one), it can be used to mine useful data insights.
Devtools: This is probably the broadest topic, but I'll keep it short - distributed debugger, REPL, SVG diagrams, code generators, grafana dash generators, deep-linked Otel traces, and more.
Performance: Before starting the work on the AI layer, I've ported libp2p-pubsub to this state machine to see how much slower it would get in their own load tests - resulting in +15-20% CPU, with the same memory ceiling.
It took 18 months and >30k CLoC of Golang to make it.
Enjoy!
pancsta•3h ago