Skip to main content
Access these methods through client.runs.

client.runs.start

Start a run from an uploaded agent name or complete contract, in the project whose handle is project.
Signature
Parameters
required · str | AgentContractRequest
required · str
optional · str | None · default:
optional · int · default:
optional · int | None · default:
optional · Sequence[str] | None · default:
optional · str | None · default:
optional · str | None · default:
optional · str | None · default:
optional · str | None · default:
optional · str | None · default:
optional · str | None · default:
optional · Mapping[str, str] | None · default:
optional · Mapping[str, str] | None · default:
optional · Mapping[str, str] | None · default:
optional · bool · default:
optional · str | None · default:
Returns StartBenchmarkResponse For examples, see the Python SDK guide.

client.runs.fetch

Fetch the latest state of a run.
Signature
Parameters
required · UUID
Returns FetchBenchmarkResponse For examples, see the Python SDK guide.

client.runs.filter_options

Discover valid run-filter values from this organization’s run history.
Signature
Returns FilterOptionsResponse For examples, see the Python SDK guide.

client.runs.list

List runs using typed filters and pagination.
Signature
Parameters
optional · FetchBenchmarksRequest | None · default:
Returns FetchBenchmarksResponse For examples, see the Python SDK guide.

client.runs.iter

Iterate matching runs using cursor pagination, starting at the supplied cursor. Use list() for explicit offset pagination. Filters and page size are preserved.
Signature
Parameters
optional · FetchBenchmarksRequest | None · default:
Returns AsyncIterator[BenchmarkTableRow] For examples, see the Python SDK guide.

client.runs.stream

Yield the run’s state as it changes until the run completes or the server disconnects. Raises ValkyrieStreamError if the server sends an error event; use events() to see how the stream ended.
Signature
Parameters
required · UUID
Returns AsyncIterator[FetchBenchmarkResponse] For examples, see the Python SDK guide.

client.runs.events

Yield each update, then the complete, error or disconnect event that ends the stream. If the body ends without one of those, iteration stops after the last update.
Signature
Parameters
required · UUID
Returns AsyncIterator[RunStreamEvent] For examples, see the Python SDK guide.

client.runs.results

Fetch final results or upload them and return S3 links.
Overload 1
Overload 2
Overload 3
Parameters
required · UUID
optional · Sequence[str] | None · default:
optional · bool · default:
Returns The selected overload determines the return type. For examples, see the Python SDK guide.

client.runs.preview

Archive the current S3 results, replace them with a fresh snapshot, and run the optional callback.
Signature
Parameters
required · UUID
optional · Sequence[str] | None · default:
Returns S3UploadResultsResponse For examples, see the Python SDK guide.

client.runs.metadata

Fetch the stored launch metadata for a run.
Signature
Parameters
required · UUID
Returns FetchBenchmarkMetadataResponse For examples, see the Python SDK guide.

client.runs.results_exist

Check whether the canonical result file already exists in S3.
Signature
Parameters
required · UUID
Returns ResultsExistResponse For examples, see the Python SDK guide.

client.runs.analyze

Yield typed progress events while analyzing a finished run, ending with done. A cached result arrives as a single done event. Raises ValkyrieStreamError when the analyzer reports an error.
Signature
Parameters
required · UUID
optional · bool · default:
optional · str | None · default:
Returns AsyncIterator[AnalyzeEvent] For examples, see the Python SDK guide.

client.runs.stream_outputs

Yield chunks from the tar archive containing run outputs.
Signature
Parameters
required · UUID
optional · Sequence[str] | None · default:
Returns AsyncIterator[bytes] For examples, see the Python SDK guide.

client.runs.download_outputs

Download run outputs into a new directory and unpack nested task tarballs. Existing directories are refused. Extraction accepts only regular files and directories. Positive limits bound the downloaded archive, expanded bytes, and total member count.
Signature
Parameters
required · UUID
required · str | Path
optional · Sequence[str] | None · default:
optional · int · default:
optional · int · default:
optional · int · default:
Returns Path For examples, see the Python SDK guide.

client.runs.update_concurrency

Change an active run’s concurrency limit. Existing tasks continue running.
Signature
Parameters
required · UUID
required · int
Returns UpdateBenchmarkConcurrencyResponse For examples, see the Python SDK guide.

client.runs.retag

Put a run in the project whose handle is project, in any run state. Earlier project links are kept.
Signature
Parameters
required · UUID
required · str
Returns ProjectResponse For examples, see the Python SDK guide.

client.runs.shed

Lower an active run’s concurrency and force stop the newest tasks above the new limit.
Signature
Parameters
required · UUID
required · int
optional · bool · default:
Returns ShedBenchmarkResponse For examples, see the Python SDK guide.

client.runs.stop

Stop a run or selected tasks.
Signature
Parameters
required · UUID
optional · bool · default:
optional · Sequence[str] | None · default:
Returns StopBenchmarkResponse For examples, see the Python SDK guide.

client.runs.resume

Resume unfinished work for a run; lambda_function replaces its post-run Lambda.
Signature
Parameters
required · UUID
optional · int | None · default:
optional · Sequence[str] | None · default:
optional · Mapping[str, str] | None · default:
optional · Mapping[str, str] | None · default:
optional · bool · default:
optional · bool · default:
optional · str | None · default:
optional · str | None · default:
Returns RetryOrResumeBenchmarkResponse For examples, see the Python SDK guide.

client.runs.retry

Retry failed or selected work for a run; lambda_function replaces its post-run Lambda.
Signature
Parameters
required · UUID
optional · int | None · default:
optional · Sequence[str] | None · default:
optional · Mapping[str, str] | None · default:
optional · Mapping[str, str] | None · default:
optional · bool · default:
optional · bool · default:
optional · str | None · default:
optional · str | None · default:
Returns RetryOrResumeBenchmarkResponse For examples, see the Python SDK guide.