Sessions

memory: true

api.agents.create({ runtime: "local", memory: true })

One option turns an agent into a session: an identifier before the first run, a conversation kept on the account, a journal on the device, and the features that need both.

id before the first runoff by defaultid implies it
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

The identifier exists immediately

const agent = api.agents.create({ runtime: "local", machine: pc, model, memory: true });
agent.id;        // "6704f1c2a9b3d4e5f6a7b8c9" — before anything has run
agent = api.agents.create(runtime="local", machine=pc, model=model, memory=True)
agent.id   # set before anything has run

It is generated by the package in the shape the account uses, so an interface can route to a conversation, keep it in a URL, or store a reference before the first message is sent. Passing id to agents.get() implies memory: true.

What is written, and when

MomentWritten
Your message is acceptedStatus running, and the message.
After each stepThe assistant message, and one record per tool call.
End of the runStatus idle, and the usage.
CompactionThe summary, and the compacted state in the journal.

Each tool record carries the name, a short target — a path, a query, a key — whether it succeeded, what it cost and how long it took. Never what it returned.

A title, for a list

The first user message, trimmed to 70 characters, becomes the session's title. It is what agents.list() shows.

Without it

memory: false (default)memory: true
Conversation after the process endsgonekept
agent.idnullset
getHistory()what is in memoryread from the account
Checkpoints and rewind()unavailableavailable
history passed to run()seeds the conversationignored once the session has its own

Without memory you can still carry a conversation yourself by passing history to each run() — which is the right shape when the conversation belongs to your own database rather than to ours.

What it costs

Nothing in credits. The records are small and the journal lives on the device, in the workspace or the home directory — see the journal.