const pc = await api.storage.get();
const agent = api.agents.get("6704f1c2a9b3d4e5f6a7b8c9", { machine: pc });
await agent.run({ message: "Carry on where we left off." });pc = api.storage.get()
agent = api.agents.get("6704f1c2a9b3d4e5f6a7b8c9", machine=pc)
agent.run(message="Carry on where we left off.")idstringrequiredA session identifier, from list() or from agent.id.
optionsobjectThe same options as create(). runtime: "local" and memory are implied.
What comes back into the conversation
| Reopened on | You get |
|---|---|
| The device that ran it | Everything: the messages, the tool calls and their results, the todo list, the compacted state. |
| Another device | The messages and which tools were used — not what they returned. |
The conversation is read when the first run starts, not when the object is built — so nothing is fetched until you use it.
The machine is still yours to pass
Reopening on a different machine gives you the conversation, not the files it refers to. Paths in the history may point at something else entirely — honest behaviour, but yours to account for.
Options are not part of a session
Mode, budget, tools, callbacks and permissions already granted are all per run. Reopening starts from your options, with nothing remembered from the earlier one.
Reading without running
const messages = await agent.getHistory();
const points = await agent.checkpoints();messages = agent.get_history()
points = agent.checkpoints()Both open the session on their own, so an interface can show a conversation and its checkpoints without starting anything.