v1.6.1

Agent Execution Endpoints

Last updated


Endpoints that run agent requests, stream logs, and report the daemon's version and updates.
MethodPathDescription
POST/v1/sendRun an agent request
POST/v1/chat/completionsStateless OpenAI-compatible chat completion
GET/v1/info/versionBuild version stamped at compile time ({version, dev}); dev is true for an untagged build
GET/v1/i18nAdded in v1.5.0. The dashboard's interface dictionary as {lang, dict}, in one of 16 languages. The language follows reply_lang; on auto it comes from ?lang= (the browser language, en when empty or unknown), and a reply_lang with no dictionary also returns en. Keys missing from that language fall back to English
GET/v1/logSSE stream. With no query it carries daemon slog records only (EventDaemonLog frames, source = level) — the same feed the TUI header shows. It includes new-chat verification codes, so daemon frames are attached only for loopback callers. ?sessions=a,b adds those sessions' events on the same connection; replay=0 skips the backlog, daemon=0 drops the daemon frames. A remote caller, or one passing daemon=0, must pass sessions (400 otherwise). Since v1.3.8 session events carry backend-formatted text — trace (the thinking or tool-call line, e.g. ⏵ API(Weather)), tool_display on tool calls and confirmations, and confirm_title, restricted_lines and restricted_note on confirmations — so every surface shows the same wording
GET/v1/daemonlocal — {content, start, more}: the daemon.log lines of the last 28 days. ?from= / ?to= (yyyy-MM-dd-HH-mm, local time) narrow the window, ?keyword= keeps only lines containing it (case-insensitive) and, since v1.3.22, ?level= (DEBUG, INFO, WARN, ERROR) keeps one level. Also since v1.3.22 the result is paged from the end: ?limit= returns at most that many matching lines (0, the default, returns all) ending before index ?before=; start is the index of the first returned line, to pass as the next before, and more is true while older lines remain. A malformed time, a negative limit or a before below -1 returns 400
GET/v1/system/updatelocal — added in v1.0.11. {version, latest, update_available}; latest is resolved by following the GitHub releases/latest/download/x redirect (502 with the running version when that lookup fails)
POST/v1/cmd/updatelocal — added in v1.0.11 as POST /v1/system/update, moved here in v1.5.1 (the old path was Removed in v1.5.1). Opens a terminal window running agen update and returns 202 {status:"opened"}; the update itself runs in that terminal, not in the daemon. macOS uses Terminal.app, WSL launches the Windows terminal, Linux tries xdg-terminal-exec, x-terminal-emulator, gnome-terminal, konsole, xfce4-terminal, kitty, alacritty, wezterm, xterm in that order. 501 when no terminal is reachable
POST/v1/cmd/claude/loginRemoved in v1.6.0 (added in v1.5.1). It opened a terminal window running claude auth login for the Login button on the Claude Code card in Config › Model; that button is gone too, so sign in by running claude in your own terminal. The path now gets the JSON 404 of an unknown /v1/ route
GET/v1/mcp/toolsList the tools registered from connected MCP servers (mcp__*)