A run without memory lives in the object and disappears with it. With memory: true the agent is a session: it has an identifier from the moment it is created, and the conversation survives a restart.
The split, which is the whole design
| Kept | Where | So that |
|---|---|---|
| The messages, and each tool call's name, short target, success, credits and duration | On the account | Any device can reopen the conversation and show what happened. |
| The content of tool results | On the device only | What a file contains, what a database returned, what a page said — none of it is stored by the platform. |
On the device that ran it, the journal gives a complete resume. From another device, the conversation and the list of tools used come back, without what the tools returned. That is not a limitation to be fixed — it is what keeps a session from being a copy of your files.
Using one
const agent = api.agents.create({
runtime: "local", machine: pc, model: "gemini-3.5-flash",
memory: true,
});
agent.id; // already set, before the first run
await agent.run({ inputs: "Read the notes and list what is unfinished." });
// Another process, later
const again = api.agents.get(agent.id, { machine: pc });
await again.run({ inputs: "Now do the first one." });agent = api.agents.create(
runtime="local", machine=pc, model="gemini-3.5-flash",
memory=True,
)
agent.id # already set, before the first run
agent.run(inputs="Read the notes and list what is unfinished.")
# Another process, later
again = api.agents.get(agent.id, machine=pc)
again.run(inputs="Now do the first one.")Finding them again
const sessions = await api.agents.list({ limit: 30 }); // most recent firstsessions = api.agents.list(limit=30) # most recent firstWhat a session unlocks
- Checkpoints — rewinding to an earlier message needs a session.
- Compaction that survives a restart.
recall— searching earlier conversations of the account.- A title, taken from the first message, for showing in a list.
Ending one
await agent.destroy(); // the account's copy, the device journal, and its checkpointsagent.destroy() # the device journal and its checkpointsA refusal from the account is raised rather than swallowed: a session that still exists must not be reported as gone. A session that was never written answers as destroyed, which is the outcome asked for.