Start a thread and send it its first message, as the web composer does: one agent, or several to compare when compare names more. The thread is created in the workspace the key works in (a team workspace key's own, or X-Universe for a personal key) unless workspace names one; naming a different workspace than the key works in is refused with workspace_mismatch. requestId makes a retry safe: the same id and body replay the first outcome. holdOpener creates the thread without sending anything, so its first POST /threads/{id}/messages becomes the opener.

post/threads

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/threads
  • Auth
    HTTP bearer

Request body

requestIdstring required

Idempotency key (16–100 letters, digits, dashes or underscores).

agentTypestring required

The agent's harness type.

llmstring

The model; the harness default when omitted.

reasoningEffortstring

Thinking level the model supports.

textstring

The first message. Required unless files or holdOpener is given.

capabilitiesstring[]

Tool ids to grant (all available ones when omitted).

agentIdstring

One of the caller's saved agents to run on, with its own tools and skills.

projectobject

A GitHub repository and branch mounted into the session: {repoFullName, branch}.

machineMountobject

A folder a Mac lent through This Mac.

browserMountobject

A browser window a Mac lent through This Mac.

screenMountobject

A screen a Mac lent through This Mac.

workspacestring nullable

Team workspace slug; defaults to the workspace the key works in.

interactionMode'plan' | 'build'

Send the first message in Plan or Build mode.

holdOpenerboolean

Create the thread without sending a message yet.

importIdstring

Continue a conversation imported from a local agent.

timezonestring

IANA timezone for the session.

Response

Thread started.

playgroundIdstring required

The new thread's id.

undeliveredstring[]

Changes