Skip to main content
GET
/
agent-tasks
/
latest-executions
Get Latest Task Executions
curl --request GET \
  --url https://api.beamstudio.ai/agent-tasks/latest-executions \
  --header 'Authorization: Bearer <token>' \
  --header 'current-workspace-id: <current-workspace-id>'
{
  "tasks": [],
  "sampleTasks": [
    {
      "agentId": "123e4567-e89b-12d3-a456-426614174000",
      "customId": "welcome-email-template",
      "taskObjective": "Send a personalized welcome email to new users",
      "taskQuery": "Send a welcome email to {{user_email}} with their account details",
      "status": "active",
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "totalCount": 100
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

current-workspace-id
string
required

Query Parameters

agentId
string
required

The unique identifier of the agent to retrieve executions for

Example:

"123e4567-e89b-12d3-a456-426614174000"

pageNum
number
default:1

Page number for pagination

Required range: x >= 1
Example:

1

pageSize
number
default:5

Number of executions to return per page

Required range: x >= 1
Example:

5

includedStatuses
string
default:completed

Comma-separated list of task statuses to include in the results

Example:

"completed,failed"

searchQuery
string

Search query to filter executions by task name, objective, or summary

Example:

"email campaign"

Response

200 - application/json

Latest executions retrieved successfully

tasks
object[]
required

Array of recent agent task executions

Example:
[]
sampleTasks
object[]
required

Array of sample or template tasks available for this agent

totalCount
number
required

The total number of executions across all pages

Example:

100