AntonCoWork API Docs Vault Repo Components
On this page

Server Reference

Anton CoWork API.

A local FastAPI service that wraps Anton's Python core and exposes it as an OpenAI-compatible HTTP surface — plus the cowork sidecar (projects, attachments, artifacts, schedules, integrations) that powers the desktop app. The server runs alongside the renderer, scoped to loopback, with no external auth.

Base URLhttp://127.0.0.1:26866
Default port26866 ANTON / T9
Authnone — loopback only
Versionsv1 · CoWork 1.0

Overview

All resource endpoints live under /v1/*. Two unversioned endpoints sit at the root for liveness checks. Every cowork-specific request carries an optional project field that scopes work to a project folder; when omitted, the active project from GET /v1/projects/active is used.

Override the host and port with environment variables before launching:

# start the server
ANTON_SERVER_HOST=127.0.0.1 ANTON_SERVER_PORT=26866 python server/main.py

CORS is locked to the renderer dev origin (http://localhost:5173), the packaged-app origin (app://-), and an optional VITE_RENDERER_URL. The desktop app talks to this server in-process — there is no external entry point.


Health

GET /health Liveness + Anton install + provider/model state. Returns config_ready, provider, live_conversations, live_pads.
GET / Tiny banner with anton_available. Useful as a connectivity probe.
# sample response
{
  "status": "ok",
  "anton_available": true,
  "mode": "anton",
  "config_ready": true,
  "provider": "anthropic",
  "model": "claude-sonnet-4-6",
  "provider_label": "Anthropic",
  "live_conversations": [],
  "live_pads": []
}

Responses API

POST /v1/responses is the headline endpoint — a near-drop-in for OpenAI's Responses API with cowork extensions for projects and attachments. Streaming is the default; pass stream: false for one-shot JSON. The first event of a streamed response carries the conversation_id the desktop app uses as its task id.

POST /v1/responses Create a response. Streams SSE events for text deltas and thought activity.

Request

POST /v1/responses
Content-Type: application/json

{
  "model": "anton",                     // optional; "anton" uses the configured default
  "input": "Summarize this quarter's roadmap",
  "stream": true,                       // SSE; false → ResponseObject JSON
  "conversation": "task-2025-Q3",         // existing id, or omit to mint one
  "project": "acme-engineering",        // optional; defaults to active project
  "attachment_ids": ["att_1a2b…"]      // uploaded via /v1/attachments/*
}

Streamed response

event: response.created
data: {"id":"resp-…", "conversation_id":"task-2025-Q3"}

event: response.in_progress
data: {"thought_role":"thought.scratchpad.start", "label":"Reading roadmap.md"}

event: response.output_text.delta
data: {"delta":"Q3 ships three things…"}

event: response.completed
data: {"id":"resp-…", "output_text":"Q3 ships three things…"}

Streaming events

The five top-level SSE events follow the OpenAI Responses contract. Anton's tool activity rides on response.in_progress frames, tagged by thought_role so clients can render an inline progress trail without parsing free-form text.

response.created
First event. Carries the response id and conversation id.
response.in_progress
Tool / phase / progress signals. Each frame has a thought_role.
response.output_text.delta
Streamed assistant text — incremental; concatenate to render.
response.completed
Terminal event with the full assembled output_text.
response.failed
Terminal error frame with code + error.

Thought roles

thought.progress
Phase change (planning, executing, summarizing).
thought.scratchpad.start / progress / result / end
Sandboxed code execution. result carries a preview.
thought.memorize.start / end
A long-term memory write.
thought.recall.start / end
A memory read; end includes the hits.
thought.context_compacted
Anton trimmed earlier turns to fit the model's context window.

Conversations

Conversations are the persistent backbone of every task. They survive restarts, carry the full message history with attached thought events, and can be reassigned to other projects.

GET/v1/conversationsList all conversations across the active project.
GET/v1/projects/{name}/conversationsScoped variant — list only within the named project.
GET/v1/conversations/{id}Conversation metadata (title, turns, preview, project).
GET/v1/conversations/{id}/messagesFull message log with role, content, and recorded thought frames.
PATCH/v1/conversations/{id}Rename or move to another project. Body: { "title"?, "project"? }.
DELETE/v1/conversations/{id}/turns/{turn_index}Delete a single user→assistant turn pair. Repairs unpaired tool_use blocks afterwards so the next chat call doesn't 400.
DELETE/v1/conversations/{id}Remove the conversation and its history from disk.

Projects

Projects are folders on disk. Each project owns its conversations, attachments, memory, and generated artifacts. Exactly one project is active at a time; new tasks default to it.

GET/v1/projectsList all projects.
POST/v1/projectsCreate a new project. Body: { "name": "…" }.
GET/v1/projects/activeGet the currently active project name.
PUT/v1/projects/activeSwitch the active project. Body: { "name": "…" }.
PATCH/v1/projects/{name}Rename a project. Body: { "name": "new-name" }.
DELETE/v1/projects/{name}Delete a project. Cannot delete the only remaining project.

Settings

Provider selection, default model, greeting, and other renderer-visible knobs. Settings are written to ~/.anton/.env and reloaded by the running server.

GET/v1/settingsCurrent settings + derived config_ready / config_error.
PUT/v1/settingsPatch settings. Returns the new config status after persisting.
POST/v1/settings/validateProbe the configured provider for credentials / reachability without saving.

Attachments

Attachments are files that augment a turn. Upload first, then pass the returned ids in attachment_ids on POST /v1/responses. Attachments are scoped to a project and attach to a conversation as soon as one exists.

GET/v1/attachmentsList attachments, optionally filtered by project or session_id.
POST/v1/attachments/uploadMultipart upload. Files are extracted and indexed; status reports as ready, processing, or failed.
DELETE/v1/attachments/{id}Drop a pending or attached attachment.

Artifacts

Artifacts are files Anton generates during a task — reports, charts, generated code, dashboards. They live in the project's .anton/artifacts directory and can be previewed in the renderer or revealed in the OS file manager.

GET/v1/artifactsList artifacts for the active or queried project.
GET/v1/artifacts/previewStreamable preview metadata for an artifact.
POST/v1/artifacts/preview-mountMount an artifact bundle behind a one-time token for in-app preview.
GET/v1/artifacts/preview-asset/{token}/{path}Serve a static asset from a mounted preview bundle.
POST/v1/artifacts/openOpen an artifact in its associated app (default OS handler).
POST/v1/artifacts/revealReveal an artifact in Finder / Explorer.

Scratchpad

Anton's sandboxed Python runtime, exposed for direct use by the desktop app and external clients. Each named scratchpad is a long-lived kernel with its own venv. Cells stream stdout / stderr / display data over SSE.

POST/v1/scratchpad/startOpen a named pad. Body sets the coding LLM to use for autocomplete.
POST/v1/scratchpad/executeRun a cell, return the final result as JSON.
POST/v1/scratchpad/execute-streamRun a cell, stream results as SSE (live stdout / display).
POST/v1/scratchpad/installpip-install packages into the pad's venv.
POST/v1/scratchpad/resetWipe in-memory state without destroying the venv.
POST/v1/scratchpad/cancelInterrupt a running cell.
GET/v1/scratchpad/viewRendered HTML view of all cells.
GET/v1/scratchpad/notebookMarkdown notebook export.
GET/v1/scratchpad/cellsStructured cells with code, outputs, timings.
POST/v1/scratchpad/closeClose the kernel; preserves the venv.
POST/v1/scratchpad/cleanupDestroy the kernel and the venv.
GET/v1/scratchpad/listList active pads with last-used timestamps.

Memory

Long-term memory is per-project. Anton calls /memory internally during recall and memorize phases; you can also seed or audit it directly.

GET/v1/memoryList memory entries for the active project.
POST/v1/memoryInsert a memory entry. Body: { name, description, type, content, project? }.
DELETE/v1/memoryRemove an entry by id or name.

Skills

GET/v1/skillsList skills installed in the active project.
POST/v1/skillsInstall a skill from a manifest.
DELETE/v1/skills/{label}Uninstall a skill by its manifest label.

Datasources

Direct access to the data vault — credentials for connectors Anton can use during scratchpad runs. Validation calls the engine's connection probe without persisting.

These endpoints back the legacy Connect Apps and Data form. The chat-driven credential workflow lives at /v1/datavault/submissions and is described end-to-end in the Data Vault docs.

GET/v1/datasourcesList configured connections (engine + name + display label).
POST/v1/datasources/validateTest a connection without saving it.
POST/v1/datasourcesSave a connection. Body: { engine, name, params }.
DELETE/v1/datasources/{engine}/{name}Remove a saved connection.

Datavault forms

The chat-driven credential collection workflow. Anton emits a form via the request_credentials tool; the renderer renders it; the user submits to this endpoint, which streams a server-side agent's verdict back as SSE — same shape as /v1/responses, so the existing client adapter consumes it natively.

The full architecture (agent, headless probe, patch dialect, UI) is on its own page — see Data Vault docs.

POST /v1/datavault/submissions Stage values + run the cowork agent. Returns SSE: text deltas, scratchpad lifecycle, and data-vault-form-patch blocks. Body: { form_id, conversation_id?, values, skipped, form_spec? }.
GET /v1/datavault/submissions/{submission_id} Peek staged metadata + field names only. Values are intentionally redacted from this HTTP surface — only the agent-side fetch_submission tool reads them.

Submit request

POST /v1/datavault/submissions
Content-Type: application/json

{
  "form_id": "fm_a3f9c2b41e",
  "conversation_id": "task-2025-Q3",
  "values": { "api_key": "phx_…" },
  "skipped": [],
  "form_spec": { /* full spec the renderer holds, with auth_method spread in for multi-method */ }
}

Streamed response

event: response.created
data: {"id":"resp-…", "model":"datavault-agent"}

event: response.output_text.delta
data: {"delta":"Trying to connect to **posthog**…"}

event: response.output_text.delta
data: {"delta":"\n\n```data-vault-form-patch\n{...}\n```\n\n"}

event: response.in_progress
data: {"thought_role":"thought.scratchpad.start"}

event: response.completed
data: {"id":"resp-…", "response":{"status":"success"}}

response.completed.response.status is one of success, retry, needs_input, or failed. The renderer doesn't have to act on it — every meaningful state change rides on a data-vault-form-patch block that flips the form to its appropriate UI.


Publish

GET/v1/publishList published artifacts for the active user.
POST/v1/publishPublish an artifact bundle to 4nton.ai; returns the share URL.
DELETE/v1/publishUnpublish a previously published artifact.

Pins

Pinned tasks — the sidebar's "Pinned" rail. Pins are reorderable and capture a recent-visit hint so the renderer can surface "where you left off."

GET/v1/pinsList pinned items.
POST/v1/pinsPin a task or project. Body: { kind, id, title }.
DELETE/v1/pins/{id}Unpin.
PUT/v1/pins/reorderSet the pin order. Body: { ids: [...] }.
POST/v1/pins/{task_id}/visitRecord a visit. Auto-pins if autoPin is enabled.

Schedules

Cron-style automation. Each schedule fires a prompt against a project + model on its cadence; the resulting conversation is saved like any other task.

GET/v1/schedulesList all schedules with next-fire timestamps.
POST/v1/schedulesCreate a schedule. Body: { cron, prompt, project?, model? }.
PUT/v1/schedules/{id}Replace a schedule's definition.
DELETE/v1/schedules/{id}Delete a schedule.
POST/v1/schedules/{id}/pausePause without deleting.
POST/v1/schedules/{id}/resumeResume a paused schedule.
POST/v1/schedules/{id}/run-nowFire immediately, off-cycle.
GET/v1/searchFull-text search across conversations, artifacts, attachments, and pins. Query: q.

Browse

GET/v1/browse/statusBrowser sandbox status — used by the renderer to enable web-aware tools.

Integrations

Third-party connectors. OAuth flows complete server-side; the renderer polls GET /v1/integrations for the latest status.

GET/v1/integrationsList configured integrations and their connection state.
POST/v1/integrations/google-drive/oauth/startBegin the Google Drive OAuth dance; returns the consent URL.
GET/v1/integrations/google-drive/oauth/callbackOAuth redirect target; persists the refresh token.

Error shape

FastAPI's default HTTPException shape, with a stable status code and a human-readable detail string. Streaming endpoints emit response.failed with the same status mapped into the code field.

{ "detail": "Anton is not installed in this desktop environment." }