What is a trajectory?
A trajectory on the Agent Platform is designed to capture and execute the full lifecycle of a run — including the agent’s starting configuration, its objective, execution status, and a detailed timeline of events such as actions, thoughts, and messages. Trajectories are key to helping you understand agent behavior. They allow you to monitor agent performance, see what the agent is doing post-run, and retrieve essential insight for analysis and debugging.What you can do with trajectories
You can use the Trajectory API to:Capability | Description |
---|---|
Create a trajectory | Start a new agent run with a specific task or objective. |
List trajectories | Retrieve recent or historical agent runs. |
Get trajectory | Fetch detailed information about a specific run, including its event log. |
Get objectives | Returns the list of uniques objectives the user provided in previous runs. |
Update a trajectory | Modify metadata or configuration for a trajectory post-creation. |
Example
You can use thePOST /api/v1/trajectories/
endpoint to start a new agent run on the Agent Platform. This sets up the configuration for the task the agent should perform — including objective, start URL, and viewport settings.
Field | Description |
---|---|
agent_identifier | The unique ID or slug of the agent you want to run. The agent must be defined beforehand. Please use the GET /api/v1/agents/ endpoint to list available agents. |
task | Describes what the agent should do. The type must be "web" for browser-based tasks. |
is_public | If true , others can retrieve the trajectory data. |
timeout | (Optional) Max execution time in seconds for the agent run. |
agent_run_id | (Optional) Provide a self-defined identifier for the trajectory. Must be a UUID. |