Skip to main content
Complete documentation of all Laddr API endpoints.

Base URL

All API requests should be made to: http://localhost:8000
For production deployments, replace localhost with your server’s hostname or IP address.

Authentication

API key authentication is optional. If LADDR_API_KEY environment variable is set, all endpoints require authentication. Header Format:
Alternative (Bearer Token):
WebSocket Authentication:
  • Query parameter: ?api_key=your-api-key
  • Or use X-API-Key header
  • Or use Authorization: Bearer your-api-key header
If LADDR_API_KEY is not set, authentication is disabled (no-op).

Health

Check the system’s health status.
Response:
Tracing Backend Values:
  • "database" - SQLite-based internal tracing
  • "langfuse" - Langfuse external tracing
  • "disabled" - Tracing not available

Prompts (Preferred)

The prompts API is the recommended way to submit tasks to agents.

Create Prompt

Submit a new prompt execution.
Request Body:
  • prompt_name (required) - Name of the agent to execute
  • inputs (required) - Input data for the agent
  • mode (optional) - Execution mode: "single" (default) or "sequential"
  • agents (optional) - For sequential mode: ordered list of agent names to run in sequence
Response:
Sequential Mode Example:
This runs agents in order, piping output from one to the next.

Get Prompt

Retrieve details of a specific prompt execution.
Response:

List Prompts

List all prompt executions with pagination.
Query Parameters:
  • limit - Maximum number of results (default: 50)
Response:

Cancel Prompt

Cancel a running prompt execution.
Response:

Jobs (Legacy)

The jobs API is maintained for backward compatibility. Use the prompts API for new integrations.

Submit Job

Submit a job using the legacy endpoint.
Response:

Get Job

Retrieve a specific job by ID.
Response:

List Jobs

List all jobs with pagination support.

Replay Job

Replay a previous job execution.
Request Body:
  • reexecute - If true, re-run the job. If false, return stored result.

Batches

Batch operations allow you to submit multiple tasks to an agent in parallel. Each task gets its own unique job_id and trace_id, but all tasks are grouped under a batch_id for tracking.

Submit Batch Tasks

Submit multiple tasks to an agent’s queue in parallel.
Request Body:
  • tasks (required) - List of task payloads to execute in parallel
  • wait (optional) - If true, wait for all responses before returning (default: false)
  • batch_id (optional) - Existing batch ID to add tasks to, or null to create new batch
Response (non-blocking):
Response (blocking, wait=true):

Add Tasks to Batch

Add more tasks to an existing batch (useful for adding aggregator tasks after evaluator workers complete).
Request Body:
  • agent_name (required) - Agent to run the new tasks
  • tasks (required) - List of task payloads to add
  • wait (optional) - If true, wait for responses (default: false)
Response:

Get Batch

Retrieve batch metadata and status.
Response:

List Batches

List recent batch operations.
Query Parameters:
  • limit - Maximum number of batches to return (default: 50)
Response:

Agents

List Agents

List all registered agents with metadata.
Response:

Chat with Agent

Send a message to an agent and optionally wait for response.
Query Parameters:
  • message (required) - Message to send to the agent
  • wait (optional) - If true, wait for response (default: true)
  • timeout (optional) - Timeout in seconds when waiting (default: 30)
Response (wait=true):
Response (wait=false):

Get Agent Tools

Get detailed tool information for a specific agent.
Response:

Traces

Traces provide observability into agent execution, tool calls, and LLM interactions.

List Traces

List trace events with optional filters.
Query Parameters:
  • job_id (optional) - Filter traces by job ID
  • agent_name (optional) - Filter traces by agent name
  • limit (optional) - Maximum number of traces to return (default: 100)
Response:

Get Grouped Traces

Get traces grouped by job_id, showing complete multi-agent runs together.
Query Parameters:
  • limit (optional) - Maximum number of job groups to return (default: 50)
Response:

Get Trace

Get a single trace event by ID with full payload.
Response:

Metrics

Get Metrics

Get aggregated system metrics.
Response:

Responses

Get Resolved Response

Resolve a task response. If the response was offloaded to storage (MinIO/S3), this endpoint fetches the full payload.
Response (inline):
Response (offloaded):

Container Logs

List Containers

List all Docker containers (project-agnostic).
Response:
Container Types:
  • api - API server containers
  • worker - Agent worker containers
  • infrastructure - Database, Redis, MinIO, etc.
  • other - Other containers

Get Container Logs

Get logs from a specific container.
Query Parameters:
  • tail (optional) - Number of lines to return (default: 100)
  • since (optional) - Only logs since this timestamp (e.g., “5m”, “1h”, or ISO8601)
  • timestamps (optional) - Include timestamps in logs (default: true)
Response:

WebSockets

Prompt Traces

Stream live trace events for a specific prompt execution.
Message Format:
Completion Event:

Batch Traces

Stream live trace events for a batch operation (all job_ids in the batch).
Message Format: Same as prompt traces, but includes traces from all job_ids in the batch, grouped by job_id.

Container Logs

Stream container logs in real-time.
Message Format:

Events

Stream real-time system events (throttled).
Message Format:
Batch Events:

Error Responses

All endpoints may return error responses in the following format:
Common Status Codes:
  • 200 - Success
  • 400 - Bad Request
  • 401 - Unauthorized (invalid or missing API key)
  • 404 - Not Found
  • 500 - Internal Server Error
  • 502 - Bad Gateway (storage fetch failed)
  • 503 - Service Unavailable (Docker SDK not available)

Rate Limiting

Currently, there are no rate limits. For production deployments, consider implementing rate limiting.

Event Types

Trace events use the following event_type values:
  • task_start - Agent task execution begins
  • task_complete - Agent task execution completes
  • tool_call - Tool invocation with parameters and results
  • llm_usage - LLM API call with token usage
  • cache_hit - Cached result used
  • delegation - Task delegation to another agent
  • error - Error occurrence with stack trace
  • task_cancel_requested - Task cancellation requested

Next Steps