Desktop reference · Local API

Turns and approvals

TALOS Desktop local API — Follow a session live, answer its approvals and questions, queue and redirect messages, run your own commands, and give it a goal.

Reference for TALOS Desktop 0.2.4 generated from the source of the release · released

Follow a session live, answer its approvals and questions, queue and redirect messages, run your own commands, and give it a goal. Paths are relative to /api/v1.

The live event stream of a session (server-sent events): every message, tool call, approval and state change as it happens.

On reconnection the browser sends Last-Event-ID and the stream resumes after that sequence number (it wins over after). The events are described on the Events page of this reference.

Path

sessionId
The session.

Query

after
The last sequence number already seen, to open the stream after it the first time (a browser sends no Last-Event-ID on its first connection). Once at most, never empty.

Answers An event stream (text/event-stream).

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

Stop a running session.

Path

sessionId
The session.

Body

None: the body is empty.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Stop the session’s current turn.

The body may be empty; with { redirectId } it also cancels a redirection in flight.

Path

sessionId
The session.

Body

figlie
Not yet described.
redirectId
The redirection to cancel (a UUID).

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

POST /sessions/{sessionId}/mcp-elicitation

Section titled “POST /sessions/{sessionId}/mcp-elicitation”

Answer an MCP server that asked you for data (a form) or to open a page.

The content of the form goes to the MCP server only: it is not in the answer, the history or the logs.

Path

sessionId
The session.

Body

requestIdrequired
The request, from McpElicitationRequested.
actionrequired
accept, decline or cancel.
content
With accept of a form only: the values, matching the schema the server asked for.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Redirect the running turn with a new message: the agent takes it into account without starting over.

Path

sessionId
The session.

Body

messaggiorequired
The message.
redirectId
An id for this redirection (a UUID), to cancel it with …/stop.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Run a command of yours in the session’s folder (a ! command in the chat); it is recorded in the process ledger.

Path

sessionId
The session.

Body

comandorequired
The command.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

POST /sessions/{sessionId}/dove-girano-i-comandi

Section titled “POST /sessions/{sessionId}/dove-girano-i-comandi”

Choose where the session’s commands run on Windows: WSL 2 or Windows itself.

Path

sessionId
The session.

Body

dove
wsl2, windows, or null for the default.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

POST /sessions/{sessionId}/comandi-nella-conversazione

Section titled “POST /sessions/{sessionId}/comandi-nella-conversazione”

Choose whether your ! commands and their output enter the model’s conversation (off by default).

Path

sessionId
The session.

Body

acceso
true to include them.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

GET /sessions/{sessionId}/impostazioni-comandi

Section titled “GET /sessions/{sessionId}/impostazioni-comandi”

Read the two command settings of a session: where commands run, and whether they enter the conversation.

Path

sessionId
The session.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

The approval or question a session is waiting on, read only: { pending: null } when it waits for nothing.

A parent reads it when a delegated agent below it waits, to draw the card in the parent; the answer goes through that agent’s …/approve or …/question with rispostoDa.

Path

sessionId
The session.

Query

capacita
Not yet described.

Answers The JSON envelope.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

Answer an approval request of the agent (with the “On request” permission): allow or deny that one action.

The request id is required: there is never an answer “to the last pending request”.

Path

sessionId
The session.

Body

requestIdrequired
The request.
approvatorequired
true to allow, false to deny.
ambito
With approvato: true only: cartella to allow the same action in that folder until the session ends, percorso for that path. Which folder or path is taken from the request, never from the client.
rispostoDa
The session you answer from, when the card of a delegated agent is shown in its parent; the server checks it is the agent itself or one of its ancestors.
automazioneModificata
With approvato: false only: “Edit” on an automation card, the changed draft to show instead.
obiettivoModificato
With approvato: false only, and not with ambito or automazioneModificata: “Edit the checks” on the card of a goal the agent proposed (goal_create), the id of the goal you set yourself instead (ob-…).
domandaModificata
Not yet described.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Answer a question the agent asked you.

Path

sessionId
The session.

Body

requestIdrequired
The question.
statusrequired
answered, skipped, cancelled or expired.
answers
With answered only: the answers, by question.
rispostoDa
The session you answer from, when the question of a delegated agent is shown in its parent.
showsDetails
Not yet described.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Decide on a plan the agent proposed: proceed, proceed accepting its changes, start a clean conversation with it, or keep planning.

The body must be application/json and come from this TALOS window (or carry the token from a client that is not a browser): proceeding raises the session’s permission. The answer is sent once the decision is on disk; the same decision again is idempotent.

Path

sessionId
The session.

Body

requestIdrequired
The plan request.
decisionerequired
procedi-con-conferma, procedi-accetta-modifiche, conversazione-pulita or continua-a-pianificare.
hashrequired
The plan’s fingerprint, sha256: and 64 hexadecimal digits.
feedback
With continua-a-pianificare only: what to change (up to 4,000 characters).

Answers The JSON envelope.

Errors3
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
PAYLOAD_LIMIT 413 The body is larger than the server accepts: shorten it, or put the text in a file and attach it.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

The messages waiting in the session’s queue, sent after the current turn.

Path

sessionId
The session.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Queue a message to send after the current turn.

Path

sessionId
The session.

Body

paginaBrowser
Not yet described.
messaggiorequired
The message.
allegaSeTroppoGrande
Not yet described.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Remove a queued message, or empty the queue.

Path

sessionId
The session.

Body

id
One message to remove; without it, the whole queue.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Send a queued message now: during a turn it enters as a correction, otherwise it resumes the session.

Path

sessionId
The session.

Body

idrequired
The queued message.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

The goal of the conversation as it stands, or null when it has none.

A goal belongs to the main conversation: its text, its state (attivo, in-pausa, bloccato, tetto when a limit of turns or tokens was reached, fatto), why it paused, and its contract — the checks that prove it done — with the last result of each. Setting a goal starts nothing by itself.

Path

sessionId
The session.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Set a new goal for the conversation, replacing the one before in whatever state it was; with criteri, the goal is born with its contract.

Not for a delegated agent, a Workflow step or a conversation nobody is in front of (an automation): GOAL_NOT_ALLOWED. A check that is not in shape refuses the whole goal (GOAL_CONTRACT_INVALID).

Path

sessionId
The session.

Body

testorequired
The goal, in your words (up to 4,000 characters).
criteri
The checks that prove it done, up to 20. Each one has a testo (up to 300 characters) and a verifica: { tipo: "comando", comando, uscita? } (a command run in the session’s folder and the exit code it must give, 0 by default; one whose result could hide behind a pipe, ||, ; or & is refused), { tipo: "file", percorso, fatto, testo? } (fatto is esiste, non-esiste, contiene or non-contiene) or { tipo: "giudizio" } (what no command can tell, weighed by a judge).

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Pause the active goal (the body must be empty). Already paused: it stays as it is, with its reason.

Path

sessionId
The session.

Body

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Resume a paused or blocked goal (the body must be empty). With the session idle, its checks run and work continues at once.

Path

sessionId
The session.

Body

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Clear the goal (the body must be empty). Its history stays in the conversation’s journal.

Path

sessionId
The session.

Body

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Replace the whole contract of the goal: the full list of checks, the ones kept with their id.

Adding checks is free; removing or changing one needs conferma, the fingerprint of the contract you were shown. Without it the answer is GOAL_CONTRACT_NEEDS_CONFIRMATION, naming the checks removed and changed, and nothing changes.

Path

sessionId
The session.

Body

criterirequired
The checks, in the same form as for POST …/goal; the ones kept carry their id (c1, c2…).
conferma
The fingerprint of the contract you confirmed (sha256: and 64 hexadecimal digits), or false for an explicit no.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Add checks to the goal, after the ones it has (they get their id). Adding asks for more, so no confirmation is needed.

Path

sessionId
The session.

Body

criterirequired
The checks to add, in the same form as for POST …/goal, without id.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Ask the conversation’s own model to propose the checks for a goal, from its text and the project’s context. Nothing is saved: confirm the checks with POST …/goal.

A proposal that does not succeed is not an error: the answer says so (pavimento: true, with the reason), and the goal can still be set without checks.

Path

sessionId
The session.

Body

testorequired
The goal (up to 4,000 characters).
lingua
The language to write the checks in: it or en.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Run the goal’s checks now, in the session’s folder on this computer, and save their results (it can take minutes).

Refused while a turn, an agent, a Workflow step or one of your commands is working in that folder, while another check is running, and for a goal that is done or has no contract. A check that would need your approval is reported as not verifiable.

Path

sessionId
The session.

Body

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Type to search the guides.

    Ask the docs

    Ask in plain words. A small model finds the passage of the guides that answers it, on this device: the question never leaves it.

    all-MiniLM-L6-v2 (Apache-2.0) and the ONNX runtime, served by talos-code.com and kept in your browser’s cache. It finds passages; it does not write answers.

    Loading the model