API reference
New session
POST /v1/agents/new-session
View as MarkdownStarts a fresh conversation on a computer. The next message has no memory of earlier ones.
Request
json
{ "machineId": "m_7f2a", "channel": "api" }Response
json
{ "sessionId": "cs_02KQA" }The next POST /message on this computer lands in this session.
Errors
Gotchas
- Always send
channel: "api". The default exists for the CLI. - You rarely need this. One long conversation per computer is the normal shape; rotate when a new task should not see the old context.
- A running task is not stopped by a new session. Call
/abortfirst if you want it stopped.