Trajectories
A project setting, on by default, that decides whether your sessions are eligible for trajectory datasets. See which sessions are eligible, and turn it off at any time with the project settings.
The Trajectories program is a setting on your Boxline project. It decides whether your project’s sessions are eligible for datasets of agent trajectories: the steps taken in a session’s browser, shell and files, and how they turned out.
In the console, only an owner or an admin of the organization can change it. See Organizations, projects and team members.
What those datasets include, how personal data and secrets are removed first, and who may receive them is set out in the Terms of Service and the Privacy Policy. This page covers the setting itself.
How it works
- It is on by default for every project.
- The first time you use the console, it explains the program and asks you to keep it on or turn it off.
- A session is eligible only if it started while the program was on, and after your project was shown that notice. Until then, no session is eligible.
- Making a choice with the API also counts as having seen the notice.
- You can change it at any time: in Settings in the console, or with the API.
- Every change is recorded: who made it, whether through the console or an API key, and when.
Which sessions are eligible
Every session has trajectoriesEligible. It is set once, when the session starts:
| Value | Meaning |
|---|---|
true | The session started while the program was on, after your project was shown the notice. |
false | The session started while the program was off, or before your project was shown the notice. |
The value never changes after the session starts. Turning the program on does not make earlier sessions eligible. For what turning it off means for sessions that were already eligible, see the Terms of Service.
"trajectoriesEligible": falseimport { Boxline } from "@boxline/sdk";const client = new Boxline(); // reads BOXLINE_API_KEY and BOXLINE_API_URLconst session = await client.sessions.create({ browser: true });console.log(session.data.trajectoriesEligible); // true or false, fixed for this sessionfrom boxline import Boxlinebx = Boxline() # reads BOXLINE_API_KEY and BOXLINE_API_URLwith bx.sessions.create() as session: print(session.trajectories_eligible) # True or False, fixed for this sessionSee the session object for the other fields.
Turn it off or on
In the console, use Settings. From code, it is part of the project settings, so you read and change it with the settings calls:
- GET
/v1/project/settingsreturnstrajectoriesnext to the other settings. - PUT
/v1/project/settingswith{ "trajectories": { "enabled": false } }or{ "trajectories": { "enabled": true } }. The settings you do not send stay as they are.
curl https://api.boxline.dev/v1/project/settings \ -H "x-api-key: $BOXLINE_API_KEY"curl -X PUT https://api.boxline.dev/v1/project/settings \ -H "x-api-key: $BOXLINE_API_KEY" \ -H "content-type: application/json" \ -d '{"trajectories": {"enabled": false}}'import { Boxline } from "@boxline/sdk";const client = new Boxline(); // reads BOXLINE_API_KEY and BOXLINE_API_URLconst { trajectories } = await client.project.settings();console.log(trajectories); // { enabled, noticeSeenAt, decidedBy }await client.project.setSettings({ trajectories: { enabled: false } }); // off for sessions started from now onfrom boxline import Boxlinebx = Boxline() # reads BOXLINE_API_KEY and BOXLINE_API_URLprint(bx.project.settings()["trajectories"]) # {"enabled", "noticeSeenAt", "decidedBy"}bx.project.set_settings(trajectories={"enabled": False}) # off for sessions started from now onBoth calls return the project settings, with the Trajectories setting in trajectories:
{ "…": "…", "trajectories": { "enabled": false, "noticeSeenAt": "2026-09-29T12:00:00.000Z", "decidedBy": null }}| Field | Description |
|---|---|
enabled | Whether the program is on for your project. |
noticeSeenAt | When your project was shown the notice, or first made a choice (ISO time). null means not yet, so no session is eligible. |
decidedBy | The user who last changed it. null when it was changed with an API key, or never changed. |
enabledmust betrueorfalse; anything else is400 invalid_request. You can also sendsource("settings", the default, or"notice") to say where the choice was made.- A change applies to sessions that start after it. Sessions already running keep their
trajectoriesEligible. GET /v1/auth/mealso returns the setting, asproject.trajectories.
Use it safely
- Anyone with an API key for your project, or a console login, can change the setting. Each change is recorded.
- Turn it off for projects that handle sensitive data, such as health, financial or children’s data.
- If a project must never take part, turn it off, then check it when your program starts:
enabledshould befalse.
const { trajectories } = await client.project.settings();if (trajectories.enabled) throw new Error("The Trajectories program must be off for this project");if bx.project.settings()["trajectories"]["enabled"]: raise RuntimeError("The Trajectories program must be off for this project")These docs describe a beta API. Endpoints, fields and SDK methods may change before general availability; breaking changes will be listed in the changelog.