Base URL: http://localhost:9889 (default)
Check if the server is running.
Response:
{
"status": "ok",
"service": "cli-agent-orchestrator"
}Create a new session with one terminal.
Parameters:
provider(string, required): Provider type ("q_cli" or "claude_code")agent_profile(string, required): Agent profile namesession_name(string, optional): Custom session name
Response: Terminal object (201 Created)
List all sessions.
Response: Array of session objects
Get details of a specific session.
Response: Session object with terminals list
Delete a session and all its terminals.
Response:
{
"success": true
}Note: All terminal_id path parameters must be 8-character hexadecimal strings (e.g., "a1b2c3d4").
Create an additional terminal in an existing session.
Parameters:
provider(string, required): Provider typeagent_profile(string, required): Agent profile name
Response: Terminal object (201 Created)
List all terminals in a session.
Response: Array of terminal objects
Get terminal details.
Response: Terminal object
{
"id": "string",
"name": "string",
"provider": "q_cli|claude_code",
"session_name": "string",
"agent_profile": "string",
"status": "idle|processing|completed|waiting_user_answer|error",
"last_active": "timestamp"
}Send input to a terminal.
Parameters:
message(string, required): Message to send
Response:
{
"success": true
}Get terminal output.
Parameters:
mode(string, optional): Output mode - "full" (default), "last", or "tail"
Response:
{
"output": "string",
"mode": "string"
}Send provider-specific exit command to terminal.
Response:
{
"success": true
}Delete a terminal.
Response:
{
"success": true
}Send a message to another terminal's inbox.
Parameters:
sender_id(string, required): Sender terminal IDmessage(string, required): Message content
Response:
{
"success": true,
"message_id": "string",
"sender_id": "string",
"receiver_id": "string",
"created_at": "timestamp"
}Behavior:
- Messages are queued and delivered when the receiver terminal is IDLE
- Messages are delivered in order (oldest first)
- Delivery is automatic via watchdog file monitoring
All endpoints return standard HTTP status codes:
200 OK: Success201 Created: Resource created400 Bad Request: Invalid parameters404 Not Found: Resource not found500 Internal Server Error: Server error
Error response format:
{
"detail": "Error message"
}