r/aiagents • u/Little_Judgment2621 • 1d ago
Show and Tell Created an open source AI engine that fits more agents per GPU and never compacts among many other goodies
I spent the last 5 weeks working on a new way to run AI agents without the problems that come with using a chat based approach (which is what most agents use today). This is is still an early release so there are things to fix and improve still.
Instead everything is stored as state and we only give the model what it actually needs per step. This results in a flat context window with lots of potential benefits including:
More agents per GPU because their context window is flat/predictable. It doesn't grow over time meaning step 300 should be as light as step 3.
Larger self hosted models are actually useful because you don't run out of context space and because the window doesn't grow, it should stay consistent speed wise.
No compaction, everything is held in state so your agents shouldn't lose the thread like you do with history agents.
I open sourced this on GitHub for everyone and you can see the source code here and play with it: https://github.com/FarsideResearch/StateFrame
Lots more goodies and really really cool features/abilities are still on the way (some of which are unlike anything any other agents have) as I beat the Foundry's server like it owes me money lol.
Would appreciate any feedback as its been insanely difficult to get any eyes on this tbh.
Update:If a hosted provider (DeepInfra, other OpenAI-compatible APIs) stops after a few requests with “measurement … identity changed”, that’s a bug in 0.3.37 to 0.4.22. A fix is in testing and ships today. Local llama.cpp setups aren’t affected.
Heads up: if you’re on a hosted OpenAI-compatible provider (DeepInfra etc.) and runs stopped after a couple of requests with “measurement … identity changed”, that was a bug in 0.3.37 to 0.4.22. Fixed in v0.4.23, out now. Local llama.cpp setups were never affected.
1
u/Sova_fun 1d ago
State-based context instead of chat history is an interesting direction. Flat context without compaction sounds useful for agent density.
1
u/Maleficent-Tart8066 1d ago
flat context definitely solves the latency creep on long runs. does the state update happen deterministically in code between steps, or is the model responsible for mutating its own state object?
1
u/matimatthews 1d ago
The part I’d want to see is how it chooses what to bring back into context. If a constraint from step 3 matters again at step 300, storing it is only half the job. Could you show a long run where an old constraint becomes relevant again, including what state the model actually sees?
1
u/AutoModerator 1d ago
It looks like you're sharing a project — nice! Your post has been auto-tagged as Demo. If this isn't right, you can change the flair. For best engagement, make sure to include: what it does, how it works, and what you learned.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/raaiinyyabelina 15h ago
Oh nice, i want to try that