d0fc0114da66
Query agent sessions
Query agent sessions with optional filters
Query parameters
The ID of the workspace to query sessions for
Filter by agent type (deprecated, use agent_types instead)
Filter by multiple agent types. If both agent_type and agent_types are null, defaults to public agent types based on feature flags (test_recovery if TEST_RECOVERY_AGENT is enabled, test_authoring if CLOUD_TEST_GEN is enabled, runtime_recovery_summary_agent if generative AI is enabled for the workspace).
Filter by latest instance status. Include 'none' to match sessions without any cloud instance.
Filter by the user who created the agent session
Deprecated; use test_id, which accepts the same full variant id for an exact-version match. Filters by the exact test variant ID stored on the session's startup_params (test authoring sessions only).
Filter test authoring sessions by test id. A bare invariant id (e.g. "abc123") matches sessions for any version of the test; a full variant id including the version (e.g. "abc123:2") matches only that version. Matches against startup_params.test_variant_id, which is stored as "<invariant_id>:<version>". Combine with other filters (AND semantics).
Filter test authoring sessions by the mabl branch they operate on, matching startup_params.branch_id exactly. The branch a session edits on is recorded at session creation, so this returns only the sessions that authored changes on that branch (not every session for the branch's tests). Combine with other filters (AND semantics).
Origin of an agent session — who or what initiated it. user_web, user_mcp, user_cli distinguish the human-driven entry point. auto_tra marks sessions automatically started by the Test Recovery Agent (runtime recovery). user_tra marks edits the user explicitly accepted from a TRA suggestion. unknown is used when no source was provided.
Filter by the source attribution stored on the session's startup_params. Use this together with test_variant_id to dedup auto-triggered edit sessions.
The limit to use for pagination
The cursor to use for pagination
Response
Query results