What is the Store?
The store is a local file-based storage system that allows agents to track work items and remember information across multiple runs. It’s particularly useful for:- Multi-run workflows - Track progress when agents run on a schedule
- Multi-agent coordination - Share state between agents working together
- Task management - Track tasks through status workflows
- Agent memory - Remember facts, preferences, and context across runs
agentuse serve -C path/to/agents, -C is the served scope for agent files. AgentUse still walks upward to find the project root, so agent folders inside the same repository can share the same store.
Under
agentuse test and any other mock run, every store is re-rooted at <project-root>/.agentuse/store-mock/<timestamp>-<pid>/, seeded on first use by copying the real store so the agent still reads realistic data. Nothing a mock run writes reaches production state, including the reserved metrics store behind the dashboards. The scratch copy is kept so you can inspect what the run would have written, and swept after 7 days.When you enable the store, your agent automatically gets tools for creating, reading, updating, deleting, and listing items. Tell the agent what to store and when in your agent file’s instructions.
Configuration
Isolated Store
Usestore: true for a store that’s private to one agent:
myagent from myagent.agentuse).
Shared Store
Use a string name to share a store across multiple agents:All agents using the same store name can read and write to the same data, enabling coordination without explicit communication.
Capabilities
Whenstore is configured, your agent can:
Listing and searching
store_list is built to be token-efficient: by default it returns lightweight summary rows (id, type, title, status, tags, parent, timestamps) without the data payload. The agent scans the summaries, then calls store_get for the full data of the one item it needs, instead of pulling every payload into context.
It accepts these parameters:
The response is
{ count, total, items }:
countis the number of rows returned andtotalis how many items match the filters beforelimit/offset, so the agent knows whether more remain.- Alongside the rows, the response carries a single top-level
dataKeysByTypemap listing thedatakeys seen for each item type, so the agent knows what it could request viafieldsorstore_getwithout paying for the key list once per row. On a 243-item store, a 40-row listing went from 6,639 tokens to 3,785 this way. When you passfields, the key list is dropped entirely and each row instead reportsmissingFieldsfor any key it doesn’t have.
An unparseable
since, or an impossible calendar date like 2026-02-31, comes back as a tool error naming the accepted forms rather than being silently ignored.Counting
To size a store before reading it, usecountOnly: true. It returns total plus byType, byStatus, oldest, and newest, with no rows at all, for around 140 tokens. It respects every filter and ignores limit/offset, so it always describes the whole matching set.
This matters because store_list has no default limit: an unfiltered call returns every item and fails loudly against the tool-output cap rather than silently truncating. Ask for the shape first, then ask for rows.
The same projection applies to store_get: pass fields: ["url", "score"] to return only those keys from a large item instead of the whole payload.
Atomic coordination
Usestore_claim for a shared work queue. Selection and transition happen
under one store lock, so two concurrent runs cannot claim the same matching row:
{ success: true, claimed: false, item: null }.
Use store_update_if for compare-and-set updates. Conditions can include the
current status, exact values inside data through where, and the prior
updatedAt value. A stale condition returns matched: false without modifying
the item.
Do not implement claiming as store_list followed by store_update. Another
run can select the same item between those calls. Code Mode makes control flow
deterministic, but only atomic store primitives make concurrent transitions
atomic.
Writing Instructions
Guide your agent’s store usage through clear SOP instructions. Here are common patterns:State Machine
Parent-Child Relationships
Tagging for Priorities
Agent Memory
Storage Location
Stores are saved to:Example: Content Pipeline
Debugging
View Store Contents
If you are runningagentuse serve, open the store browser:
Check Lock Status
Reset Store
Best Practices
Use Meaningful Types
Use Meaningful Types
Name your types clearly: “topic”, “article”, “review” instead of “item1”, “item2”.
Define Status Transitions
Define Status Transitions
Document valid status values and transitions in your SOP.
Store Results in Data
Store Results in Data
Put operation results in the
data field for later reference.Clean Up Old Items
Clean Up Old Items
Periodically delete completed items to keep the store manageable.
Next Steps
Manager Agents
Build orchestrating agents with store integration
Scheduling
Run agents on schedules with persistent state
Sub-Agents
Coordinate teams sharing a store