List a session's child sessions
Changed onReturns the caller's sessions spawned under one parent session (Task subagents, mission agents) with their last reported status and the state of the computer each runs on, oldest first. A member of a shared workstream lists the agents under it they are a member of instead. Computer details are only included for computers the caller owns. Artifacts are included only when includeArtifacts=true; what each session is waiting on only when includeAttention=true; token usage and Factory Standard Credits, rolled up with each session's Task subagents, only when includeUsage=true. Archived sessions are left out unless includeArchived=true, which lists them with archivedAt and sets archivedIncluded on the response. For enterprise organizations, usage.tokenCountsScope is byok_only and token counts cover only calls the client reported as made with the organization's own provider keys (BYOK); managed-inference calls, and usage reported before clients tagged BYOK calls, count as zero. Credits always cover every call.
Request
- Base URLhttps://api.factory.ai
- AuthHTTP bearer
Path parameters
The parent session id
Query parameters
Whether to include each child session’s integration artifacts (pull requests, issues, pages).
Whether to include what each child session is waiting on (a permission prompt or a question).
Whether to include each child session’s token usage and Factory Standard Credits, rolled up with its Task subagents.
Whether to include archived child sessions, such as a mission agent whose computer was reclaimed, each with its archivedAt. The response sets archivedIncluded when it does.
Headers
Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.
Response
Response for status 200
Present when the list includes archived child sessions, as includeArchived=true asks for
Changes
- breaking
the
sessions/items/artifacts/items/externalIdresponse property's maxLength was unset from128for the response status - breaking
the
sessions/items/artifacts/items/idresponse property's maxLength was unset from2048for the response status - breaking
the
sessions/items/artifacts/items/titleresponse property's maxLength was unset from500for the response status
1 more change in this revision
- breaking