actionstringreadread · write · delete.
namestringRequired for write and delete.
contentstringRequired for write.
descriptionstringOne line, shown in the index.
// Remember where the last run got to
{ id: "mark", type: "memory", config: {
action: "write", name: "last-digest",
description: "The date of the last digest sent",
content: "{{input.week}}" } }
// Read it at the start of the next run
{ id: "since", type: "memory", config: { action: "read", name: "last-digest" } }# Remember where the last run got to
{"id": "mark", "type": "memory", "config": {
"action": "write", "name": "last-digest",
"description": "The date of the last digest sent",
"content": "{{input.week}}"}}
# Read it at the start of the next run
{"id": "since", "type": "memory", "config": {"action": "read", "name": "last-digest"}}Output
| action | output |
|---|---|
read with a name | the note |
read without one | memories — the index |
write | the note, and whether it was created |
delete | the name, and whether it was deleted |
This is how a chain keeps state
A run starts with nothing
Each one is independent. A scheduled chain that must not repeat itself — a digest since the last digest — writes a note at the end and reads it at the start. There is no other state between runs.
The notes are the account's
The same ones an agent reads and writes, and the same ones api.memory manages. A workflow writing one changes what every agent of that account knows — which is useful, and worth being deliberate about.