Use this file to discover all available pages before exploring further.
Each sandbox tracks a set of agent sessions. The full session CRUD surface is
SDK-only today; from the CLI you select sessions through
agent-send flags.
The CLI doesn’t expose session CRUD directly. To control which session a
prompt runs in, use the flags on agent-send.
# Start a fresh sessionamika sandbox agent-send dev-box "Plan the migration" --new-session# Resume a specific sessionamika sandbox agent-send dev-box "Continue from earlier" \ --session-id 3f2a...
To get a list of sessions, use the SDK or call the HTTP API directly. See
CLI reference — agent-send for the full flag
table.
const sessions = await amika.listSessions("dev-box");// Most recent session — returns null if no sessions exist yetconst latest = await amika.getLatestSession("dev-box");// By idconst one = await amika.getSession("dev-box", session.id);
getLatestSession is the only call where a 404 from the server is normal —
it means “no session yet” and the SDK returns null rather than throwing.
You don’t need an error handler for this case.
const sandboxName = "dev-box";// Create a session for this runconst session = await amika.createSession(sandboxName, { agentName: "claude", metadata: { task: "Add unit tests" },});// Drive the agent inside that sessionconst res = await amika.agentSend(sandboxName, { message: "Add unit tests for the auth module", sessionId: session.id,});// Mark the session doneawait amika.updateSession(sandboxName, session.id, { status: "completed" });console.log(res.result);