aip_sdk.list_runs
aip_sdk.list_runs(project_id: str | None = None, status: RunStatus | None = None, page: int = 1, per_page: int = 20, client: APIClient | None = None, *, metric: str | None = None, metric_config_name: str | None = None, metric_config_version: str | None = None, workspace_id: str | None = None, all_workspaces: bool = False) -> list[RunSummary]
List evaluation runs, newest first.
Reads your session's workspace unless you name one, and raises if none is set.
Pass all_workspaces=True to read across every workspace you can access.
Returns a page of run records, optionally filtered by project and status.
Each record is a read-only snapshot; pass its id to aip.get_run()
to attach to the run and read its results.
Parameters
project_idstr | None: Only return runs in this project.statusRunStatus | None: Only return runs in this status — one of"pending","claimed","running","completed","retryable_failed","failed", or"cancelled".pageint: Page number (1-based).per_pageint: Items per page (1-100).clientAPIClient | None: Optional API client. Defaults to the module-level client.metricstr | None: The metric thatmetric_config_name/metric_config_versionare matched against. Has no filtering effect on its own — pass it together with at least one of them.metric_config_namestr | None: Only return runs whose scoring snapshot formetricresolved this metric config name. Requiresmetric.metric_config_versionstr | None: Only return runs whose scoring snapshot formetricresolved this metric config version. Requiresmetric.workspace_idstr | None: Only return runs in this workspace.all_workspacesbool: Read across every workspace you can access.
Returns
list[RunSummary]: A list ofRunSummaryobjects for the requested page.
Raises
InvalidArgumentError: Ifpage/per_pageis out of range, ifmetricis given withoutmetric_config_nameormetric_config_version(it would otherwise silently filter nothing), or if either of those is given withoutmetric.AuthError: If no credentials are configured.APIError: If the listing request fails or returns a malformed response.ForbiddenError: Ifworkspace_idnames a workspace you cannot access.NoWorkspaceSelectedError: No workspace was passed, none is configured for the session, andall_workspaceswas not set.
Examples:
completed = aip.list_runs(status="completed")
for summary in completed:
print(summary.id, summary.pipeline, summary.status)
page_2 = aip.list_runs(project_id="proj_123", page=2, per_page=50)
tuned = aip.list_runs(metric="agent.custom_judge_rubric", metric_config_name="rubric_prompt_a")