Prompt an agent
curl --request POST \ --url http://127.0.0.1:8004/api/panes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/prompt \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "prompt": "example", "wait": true, "timeout_ms": 1, "agent_id": 1 }'Pastes prompt into the pane’s agent and submits it. With wait (the default), replies once the agent has started and settled (idle, done, blocked, or waiting on background work).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Pane ID
Request Bodyrequired
Section titled “Request Bodyrequired”object
How long to wait, in milliseconds: 10 minutes by default, at most an hour.
The agent instance meant (a pane’s agent_id); refused with 409 if
another has replaced it.
Responses
Section titled “Responses”With wait, the turn’s outcome; without, {"submitted": true}
With wait, the turn’s outcome; without, {"submitted": true}.
object
None once the agent has exited.
object
Lifecycle states for an agent occupying a pane.
This intentionally follows Herdr’s small semantic vocabulary. Failure and permission details belong in the accompanying message/notification instead of multiplying lifecycle states.
Background work the agent’s screen shows, such as “2 shells, 1 monitor”.
Whether the agent was seen working on the prompt.
The rendered screen once output went quiet; None once the pane has closed.
object
Example
{ "status": { "state": "unknown" }}The prompt is more than 64 KiB; or a malformed ID or JSON body
Missing or wrong access token
The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)
No such pane
No agent, the agent isn’t agent_id, a dialog is waiting for an answer, the agent is busy (with wait), or the agent can’t take a multi-line prompt
A body over the size limit
No Content-Type: application/json
A body that doesn’t match its schema
Writing to the pane failed