latestOpenAPI 3.0.32026-08-227451,2751.8 MB

d0fc0114da66

AgentSession

Query agent sessions

Query agent sessions with optional filters

get/agentSession

Query parameters

workspace_idstring required

The ID of the workspace to query sessions for

agent_type'test_authoring' | 'test_creation_planning' | 'test_planning' | 'agent_review' | 'app_summary' | 'test_run_analysis' | 'test_recovery' | 'runtime_recovery_summary_agent' | 'plan_run_analysis' | 'deployment_analysis' | 'workspace_results_analysis' | 'results_auto_analysis' | 'app_modeling' | 'app_modeling_run' | 'file_assertion'

Filter by agent type (deprecated, use agent_types instead)

agent_typesAgentType[]

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).

latest_instance_statusAgentInstanceStatus[]

Filter by latest instance status. Include 'none' to match sessions without any cloud instance.

created_by_idstring

Filter by the user who created the agent session

test_variant_idstring

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).

test_idstring

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).

branch_idstring

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).

agent_session_source'user_web' | 'user_mcp' | 'user_cli' | 'auto_tra' | 'user_tra' | 'unknown'

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.

limitinteger

The limit to use for pagination

cursorstring

The cursor to use for pagination

Response

Query results

cursorstring

Cursor for the next page of results