Judgment Labs Logo

judgment traces

Search, inspect, tag, and re-evaluate traces in a project.

The Judgment CLI is deprecated and no longer under active development. This reference is retained for existing users. See the CLI deprecation notice for supported alternatives.

Search, inspect, tag, and re-evaluate traces in a project.

Commands

CommandDescription
traces add-tagsAdd tags to a trace.
traces behaviorsList behaviors observed on a trace.
traces evaluateRe-evaluate traces.
traces getGet a trace by ID.
traces searchSearch traces.
traces spanGet span details.
traces spansList a trace’s spans.
traces tagsList a trace’s tags.

traces add-tags

Add tags to a trace.

Attach one or more string tags to an existing trace. Tags are additive — existing tags are preserved.

judgment traces add-tags [OPTIONS] [[[ORG_ID] PROJECT_ID] TRACE_ID...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID] TRACE_IDno

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
--tagstextyesString tags to attach to the trace. Tags are additive — existing tags on the trace are preserved.
-o, --outputyaml, jsonnoOutput format.

traces behaviors

List behaviors observed on a trace.

judgment traces behaviors [OPTIONS] [[[ORG_ID] PROJECT_ID] TRACE_ID...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID] TRACE_IDno

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
-o, --outputyaml, jsonnoOutput format.

traces evaluate

Re-evaluate traces.

Queue traces for re-evaluation by the project’s judges. Pass trace_ids to re-evaluate specific traces, or evaluate_all: true to re-evaluate every trace in the project.

judgment traces evaluate [OPTIONS] [[[ORG_ID] PROJECT_ID]...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID]no

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
--evaluate-allbooleannoWhen true, re-evaluate every trace in the project. Mutually exclusive with trace_ids.
--trace-idstextnoTrace UUIDs to re-evaluate. Mutually exclusive with evaluate_all.
--specific-judge-namestextnoRestrict evaluation to judges with these names. Omit to run every applicable judge.
-o, --outputyaml, jsonnoOutput format.

traces get

Get a trace by ID.

judgment traces get [OPTIONS] [[[ORG_ID] PROJECT_ID] TRACE_ID...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID] TRACE_IDno

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
-o, --outputyaml, jsonnoOutput format.

Search traces.

Filter, sort, time-bound, and paginate traces in a project. See each body field for the exact JSON shape it expects.

judgment traces search [OPTIONS] [[[ORG_ID] PROJECT_ID]...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID]no

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
--filterstextnoFilter expressions, ANDed together. Each item is {"field":<field>,"op":<op>,"value":<value>}. Allowed ops depend on the field's type. Op groups: - STRING_OPS = = | != | contains | does_not_contain | exists | is_absent - NUMERIC_OPS = = | != | < | <= | > | >= - ARRAY_ANY = any (matches when the row's array overlaps the supplied values) String fields (op in STRING_OPS, value is a string): span_name, customer_id, customer_user_id, session_id, error, dataset_id. Numeric fields (op in NUMERIC_OPS, value is a number): duration (nanoseconds), llm_cost (USD). Array fields (op = any, value is an array): tags (strings), rules_invoked (rule names from this project, strings), behaviors (behavior UUIDs). Special: - full_text_search: op = contains, value is a string searched across span attribute text. - span_attributes_roots: matches a single span attribute key/value: {"field":"span_attributes_roots","key":"<attribute-name>","op":<STRING_OPS>,"value":"<string>"}
--sort-bytextno{"field":<sort_field>,"direction":"asc"|"desc"} where sort_field is one of: created_at, span_name, duration, llm_cost. Default when omitted: {"field":"created_at","direction":"desc"}. Any sort other than created_at desc requires time_range.start_time and a window between start_time and end_time of at most 7 days; use created_at desc sorting for broader ranges.
--time-rangetextno{"start_time":<iso8601-string>|null,"end_time":<iso8601-string>|null}. Either bound may be null to leave that side open. Invalid timestamps return 400. For any sort other than created_at desc, start_time is required and the window between start_time and end_time must be at most 7 days.
--paginationtextyes{"limit":<int 1-200>,"cursorSortValue":<string>|null,"cursorItemId":<string>|null}. First page: pass null for both cursor fields. Each response returns nextCursor:{sort_value,trace_id} (or null when hasMore=false); copy those into cursorSortValue and cursorItemId for the next page.
-o, --outputtable, yaml, jsonnoOutput format.

traces span

Get span details.

Fetch full details (inputs/outputs/attributes) for up to 20 specific spans across one or more traces.

judgment traces span [OPTIONS] [[[ORG_ID] PROJECT_ID]...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID]no

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
--spanstextyesUp to 20 trace/span ID pairs to fetch span details for in a single request.
-o, --outputyaml, jsonnoOutput format.

traces spans

List a trace’s spans.

judgment traces spans [OPTIONS] [[[ORG_ID] PROJECT_ID] TRACE_ID...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID] TRACE_IDno

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
-o, --outputyaml, jsonnoOutput format.

traces tags

List a trace’s tags.

judgment traces tags [OPTIONS] [[[ORG_ID] PROJECT_ID] TRACE_ID...]

Arguments

NameRequired
[[ORG_ID] PROJECT_ID] TRACE_IDno

Options

FlagTypeRequiredDescription
--organization-id, --org-idtextnoOrganization ID. Defaults to JUDGMENT_ORG_ID or saved context.
--organization, --orgtextnoOrganization name to resolve.
--project-idtextnoProject ID. Defaults to JUDGMENT_PROJECT_ID or saved context.
--projecttextnoProject name to resolve.
-o, --outputyaml, jsonnoOutput format.