training resource in Python SDK v0.2.0+ to turn SDK traces or Braintrust sync evidence into reviewable tasks. The same methods are available on Arga and AsyncArga; await async calls.
Use a full Arga credential for these operations. Upload-only ARGA_TRACE_KEY credentials cannot read collections, generate tasks or approve them.
Generate a draft
Use the collection ID from an upload receipt or the Training URL. The persisted trace ID is returned by evidence upload and is also available on the collection:Inspect the verifier
The examples below share the openarga client, dataset and task. Inspect and save the compiled artifact:
unchanged compares the full selected record set, ignoring record order and recipient/label ordering. It requires consistent normalized fields before and after.
Test normalized snapshots
Capture the state needed by your rules and save a localsnapshots.json containing before and after objects. A collection has this shape:
messages/drafts and Stripe customers/payment_intents/charges/refunds. Use stable, normalized records and task-consistent identities, not arbitrary provider payloads. Every record needs a unique nonempty string id. The downloaded source’s FIELDS lists accepted fields. Stripe amounts are integer minor units.
Declare an empty collection explicitly. Set complete: true only after retrieving the complete relevant scope; omission means unknown. Arga trusts that declaration. The SDK does not automatically capture these before/after snapshots. The example returned by get_grader() is illustrative, not captured runtime evidence.
Test through the API using your current task revision:
Tests accept at most 2 MB of snapshots, 5,000 records per collection and 30 rules. Unsafe takes precedence over error, then fail. Any rule error suppresses the numeric score.
A snapshot verifier does not execute an agent, judge writing quality or detect actions undone between captures. A passing result establishes only that the reviewed predicates hold for the supplied snapshots.

