What a shared, short-lived store is good for.
Each case says which id goes to whom, and plays out in an example store. The read id reads the store; the write id reads and writes it. None of these cases hold personal data or secrets.
Watch a long task from the chat
An agent or a script writes its progress as it goes. You open the
store in ChatGPT with show_store and watch it update
while you keep talking.
- Agent or script · write id
- You in the chat · read id
- Agent or script
- You in the chat
The store is empty.
- The agent starts and writes where it is.
- Your chat shows the store: step 1 of 4.
- The agent moves on and writes step again.
- One check fails: the agent says so in failures.
- The view in your chat refreshes on its own and shows the failure.
- The agent finishes.
- You see it is done, without asking the agent.
Several agents, one board
Each agent writes its own keys: what it is doing, what it found. Whoever coordinates reads one store instead of asking each of them.
- Agent A · write id
- Agent B · write id
- Coordinator · read id
- Agent A
- Agent B
- Coordinator
The store is empty.
- Agent A writes its status, under its own name.
- Agent B writes its own key: it never touches A's.
- The coordinator reads both in one store.
- Agent A updates its key.
- Agent B updates its key.
- The coordinator reads the board again: both are done.
Hand off between chats
One conversation leaves what it found in a store; the next one, or another assistant, picks it up with the read id. No copying and pasting of long text.
- First chat · write id
- Next chat · read id
- First chat
- Next chat
The store is empty.
- The first chat writes what it found.
- It adds what is still open.
- A new chat, given the read id, reads both keys and carries on.
A vote
Each participant writes their vote in a key of their own,
vote.<participant>. Whoever shows the result
reads the store and counts when reading. There is no shared counter:
a write replaces the whole key, and there is no atomic increment.
- Ana · write id
- Ben · write id
- Cleo · write id
- Whoever shows the result · read id
- Ana
- Ben
- Cleo
- Whoever shows the result
The store is empty.
- Ana votes in her own key.
- Ben votes in his.
- Cleo votes in hers.
- Counted when read: option-b 2, option-a 1.
- Ben changes his mind: he writes his key again.
- Counted again: option-b 3.
A debugging scratchpad
A script writes intermediate values over HTTP, and you watch them in the browser, on the store's page opened with the read id, without adding a log viewer to the project.
- Script · write id
- Browser · read id
- Script
- Browser
The store is empty.
- The script writes the last request it made.
- The store's page, open in the browser, shows it.
- It tries again and counts.
- This time it works.
- The page shows what changed, field by field.
Answer an agent's question
An agent writes what it needs to know and waits; you answer by asking your chat to write the reply into the same store. Each writes its own key.
- Agent · write id
- You in the chat · write id
- Agent
- You in the chat
The store is empty.
- The agent asks, and waits.
- Your chat shows the question.
- You answer in your own key.
- The agent reads the answer and goes on.
Agents take turns
Three agents talk only through the store. turn says
whose turn it is. Each agent writes only its own keys, plus
turn when it passes it on: that is what keeps writers
from overwriting each other.
- Coordinator · write id
- Agent A · write id
- Agent B · write id
- Agent C · write id
- Coordinator
- Agent A
- Agent B
- Agent C
The store is empty.
- The coordinator writes the topic and gives the turn to agent A.
- Agent A reads, says its part in its own key, and passes the turn to B.
- Agent B reads what A said, answers, and passes the turn to C.
- Agent C answers and hands the turn back.
- The coordinator opens a second round.
- Second round: agent A answers briefly and passes the turn to B.
- Agent B agrees and passes the turn to C.
- Agent C agrees and hands the turn back to the coordinator.
- The coordinator writes the decision.
- Everyone reads it.
- Anything confidential: anyone with an id can read the store.
- Anything that must be readable for longer than 1 day.
- Anything larger than 256 KB.