valkyrie run analyze hands a finished run to an AWS Lambda function, the analyzer, that
turns the agent’s outputs into Transluce Docent records and
returns a link to read them. Valkyrie saves the link on the run. The analyzer decides what
to upload, how to summarize it, and which models to use.
Valkyrie invokes the analyzer the same way as a post-run Lambda,
so the same AWS account requirement applies, and a local Tracker can’t run analyses.
Write an analyzer
Each agent writes its outputs in its own shape, so each agent needs its own analyzer. Valkyrie calls it with:-
Read the run’s outputs from
s3://S3_BUCKET/benchmarks/BENCHMARK_ID/, whereS3_BUCKETandBENCHMARK_IDare the payload’ss3_bucketandbenchmark_id. Each task’s folder holds itsagent_output.tar.gzand any output artifacts the contract declared. - Turn each task into a Docent record and upload it. See the Docent documentation for the record format.
-
Return a JSON object with the reading link in
reading_plan_url:
reading_plan_url marks the analysis
DONE with no link, and raising an exception marks it ERROR. The analyzer needs read
access to the run’s folder in the bucket.
Name the analyzer in the contract
Addingest_lambda to the agent’s contract.yaml and upload the agent again:
contract.yaml
valkyrie run analyze reads ingest_lambda from the agent’s current version in your
library, not from the contract the run used. Adding it and uploading again makes earlier runs
of that agent analyzable too.
Analyze a run
RUN_ID with the run’s ID. The run must be FINISHED. The command streams progress and prints the reading link when
the analyzer returns. valkyrie run fetch RUN_ID also shows the link when it exists.
A run that already has a link returns it without calling the analyzer again. After you fix
the analyzer, run it again with --no-cache:
Analysis statuses
valkyrie run fetch RUN_ID shows the run’s analysis status:

