List Agent Tasks
Retrieve all task executions in your workspace with comprehensive filtering and pagination options.
Your API key for authentication
Query Parameters
Page number for pagination
Filter tasks by specific agent ID
Filter by task status: “pending”, “running”, “completed”, “failed”
Filter tasks created after this date (ISO 8601 format)
Filter tasks created before this date (ISO 8601 format)
Field to sort by (e.g., “createdAt”, “completedAt”)
Sort order: “asc” or “desc”
Response
Array of task objects
Unique identifier for the task
ID of the agent that was executed
Current status of the task
Input data provided to the agent
Output data from the agent (if completed)
ISO 8601 timestamp of when the task was created
ISO 8601 timestamp of when the task completed (if applicable)
Task execution duration in seconds (if completed)
URL to view the task in the Beam platform
Example Request
curl -X GET "https://api.beamstudio.ai/agent-tasks?status=completed&pageSize=20" \
-H "x-api-key: your-api-key" \
-H "current-workspace-id: your-workspace-id"
Example Response
{
"data": [
{
"id": "task_abc123",
"agentId": "agent_123456",
"agentName": "Customer Support Agent",
"status": "completed",
"input": {
"customerEmail": "customer@example.com",
"issueType": "billing"
},
"output": {
"resolution": "Issue resolved - refund processed",
"ticketId": "TICKET-001"
},
"createdAt": "2024-03-21T10:30:00Z",
"completedAt": "2024-03-21T10:35:00Z",
"duration": 300,
"url": "https://app.beam.ai/tasks/task_abc123"
}
],
"pagination": {
"total": 150,
"pageNum": 1,
"pageSize": 20,
"totalPages": 8
}
}
Task Status Values
- pending: Task has been created but not yet started
- running: Task is currently executing
- completed: Task finished successfully
- failed: Task encountered an error and failed to complete
- cancelled: Task was cancelled by the user