Skip to main content
An agent session is a durable chat with a coding agent on a rig. Its transcript is stored on the server and can outlive the rig. You pick a session each time you send a prompt. The CLI can list and read sessions with amika sessions, and the SDK can list sessions and read their transcripts.

Prerequisites

A rig in the active / running / started state. See Create a rig.

CLI: pick or start a session at agent-send time

To control which session a prompt runs in, use the flags on agent-send.
See CLI reference: agent-send for the full flag table.

CLI: list and read sessions

amika sessions list lists your organization’s agent chats. amika sessions show prints one chat and every message in it.
The list shows each chat’s session ID, agent, status, rig, and last update. Add -o json to either command for machine-readable output. See amika sessions for details.

SDK: list, read, and continue sessions

Sessions are created when you send a prompt. There is no separate create or update call.

List sessions

Sessions come back newest first. Omit rigRef to list sessions across all your rigs. limit defaults to 50 on the server. total can be larger than sessions.length, so keep it when showing a partial list.

Read a transcript

Continue a session

A fetched session has send, sendStream, and refresh methods bound to it.
You can also continue a session from its rig by passing sessionId:

End-to-end example

Session shape

agentSessions.get() adds messages, the full transcript. See Types.
Earlier SDK versions had createSession, listSessions, getLatestSession, getSession, and updateSession. Those methods have been removed. Use client.agentSessions instead.

Next steps

Send a message to an agent

TypeScript SDK reference