Data-stores
Part of Make scenario building. Install the skill and your agent reads this page when it needs the depth.
Data stores and data structures
A scenario forgets everything between runs. A data store is the memory: a small keyed table the built-in Data store modules read and write. A data structure is a named field schema: it shapes a store's records, or types a webhook's payload so later modules can map named fields.
Default to none. Need one only when a run must know what an earlier run did (seen this email already? running total?) or several scenarios share a lookup table. A one-off transform needs neither.
Order of operations
Dependencies run structure → store → scenario, so create in that order.
A new scenario gets its own new store. A store another scenario writes to is that scenario's state:
sharing it mixes records, breaks both dedup keys, and a later cleanup deletes data the other scenario needs.
Reuse an existing store only when the user names it or explicitly asks to share one (a shared lookup, below).
A store that merely looks similar by name or fields is not a match — the data_store_list check the tool
descriptions suggest is for finding the store the user named and avoiding a duplicate name, not for picking
one yourself.
data_structure_create, preferably from a realsamplepayload rather than a hand-writtenspec. Skip entirely for a store whose records need no fixed shape. Reuse a structure only when it belongs to the store the user asked to share.data_store_createwith the structure's id, a name that ties it to this scenario, and a modestmaxSizeMB.app_findfor the operation ("add a record to a data store", "check if a record exists") → take the Data store module names from the result, never guess them →module_spec(schemas: true).- Put the store's id in the module's
datastoreparameter, in the samescenario_create/scenario_patchcall as the rest of the design.
State the store and structure names you picked or created before the scenario write that uses them.
Patterns
- Dedup. Key = the source item's stable id. Look the key up →
filteron "does not exist" → process → add the record with that key. Add after processing succeeds, or a failed run marks the item as seen. - Counter / running total. Get the record → compute the new value in the mapper → update the record.
Not safe under parallel runs; set the scenario to sequential (
settings_set) when the count must be exact. - Shared lookup — only on an explicit request. One scenario maintains the store; others only read it. Say which scenario owns writes.
- Typed webhook payload. A structure from a real sample, assigned to the webhook trigger with
scenario_patch, gives later modules stable field names and (withstrict) rejects malformed requests. Still learn one real request first when nobody has seen the payload — see the webhook section of the skill.
Changing or removing
data_structure_updatereplaces the whole spec — include every field that must survive.data_store_delete/data_structure_deletefirst report which scenarios still use the target. Relay that list and get an explicit yes before calling again withconfirmed: true; deleted records do not come back.