Skip to main content
The store configuration and on-disk item format are experimental and may change without migration. Discuss feedback in GitHub Discussions.

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
Stores live at the AgentUse project root:
When you run 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

Use store: true for a store that’s private to one agent:
The store is named after the agent (e.g., 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

When store is configured, your agent can:
Keep each item compact. Store rows are workflow records, not document or analytics containers. Aim to keep data at or below 8 KiB. Normalize repeated records into separate typed items, and keep large reports or datasets as file artifacts. Larger items are accepted, but store tools warn because reading and updating them consumes substantial model context.

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 }:
  • count is the number of rows returned and total is how many items match the filters before limit/offset, so the agent knows whether more remain.
  • Alongside the rows, the response carries a single top-level dataKeysByType map listing the data keys seen for each item type, so the agent knows what it could request via fields or store_get without 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 pass fields, the key list is dropped entirely and each row instead reports missingFields for 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, use countOnly: 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.
Keep retrieval cheap. Size it (countOnly), narrow it (since, type, status, q), scan the summary rows, then store_get the single item you want. Only set includeData: true (or list fields) when you genuinely need payloads for several items at once. For a known set of IDs, pass ids to fetch them in one store_list call.
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

Use store_claim for a shared work queue. Selection and transition happen under one store lock, so two concurrent runs cannot claim the same matching row:
An empty queue returns { 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:
Don’t edit items.json directly while an agent is running. The lock file prevents corruption from concurrent access.

Example: Content Pipeline

Debugging

View Store Contents

If you are running agentuse serve, open the store browser:
Each store has its own table:
Session and approval logs link store tool activity to the matching store table. When AgentUse knows the item ID, the link highlights the changed row:

Check Lock Status

Reset Store

Best Practices

Name your types clearly: “topic”, “article”, “review” instead of “item1”, “item2”.
Document valid status values and transitions in your SOP.
Put operation results in the data field for later reference.
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