Persistent State / Key-Value Store for Agents
Problem Statement
Currently, Venice AI agents have no ability to persist data as a source of truth in the course of a conversation without outputting it to the user. This creates significant limitations for:
Interactive gaming/story (RPG character sheets, RPG state tracking)
Stateful projects (anything that mutates data over time)
Current limitation: If an agent does output data, it gets buried in conversation history and is eventually lost to context compression. This is okay for most data, but not for stateful conversations. Current memory implementation can not actively be used by an agent for dragging documents and values along.
Proposed Solution
A State Tool or Key-Value Store that agents can read/write/delete:
state_write("char_hp", 15);
state_read("char_hp"); → returns 15
state_list(); → returns ["char_hp"]
state_delete("char_hp"); → deletes the entry with the key “char_hp”Its also possible to safe larger data, like a document.
state_write("birgit_sheet", "Name: Birgit\nHP: 15\nMaxHP:20\nWeapons:Bio Rifle, Sword");
state_list(); → returns ["birgit_sheet", "char_hp"] Implementation
I think it should be implemented in browser storage and conversation-scoped. Alternatively it could also have a scope switch parameter to enable inter-conversation values. When a conversation is deleted, its values get deleted as well.
Benefit
I believe it’s a comparatively easy implementation for a huge benefit. It allows keeping track of important information that would easily go out of the context window otherwise. LLMs with a system prompt to update specific data with this tool will almost always do that or can be nudged to do it if needed. It allows Dungeon Master AIs and is a drop-in workaround of many other missing tools that can be simulated through data persistence and manipulation. As long as we dont have full custom local tools it’s the easiest best next thing.
Log in to comment and vote
No comments yet
Be the first to share your thoughts.