- Label sets — structured annotations on agent runs, validated against a JSON schema
- General label sets — structured annotations on agent runs, transcripts, transcript slices, or reading results
- Tags — lightweight string annotations on agent runs
- Comments — free-text notes on agent runs
Label Sets
Create a Label Set
Define a new label set with a JSON schema that all labels must conform to.Parameters
Returns
List Label Sets
Add a Label
Add Multiple Labels
Get Labels
Parameters
If
True, only return labels that fully match the label set schema including
required fields. Default returns all labels.Update a Label
Update an existing label’slabel_value. The server validates the updated value against
the label set schema, but does not enforce top-level required fields for regular labels.
It also verifies that the label belongs to the given label set.
Parameters
New label value. It must conform to the label set’s JSON schema validation rules,
except top-level
required fields are not enforced for regular labels.Returns
Delete Labels
Preview or delete specific labels from a label set. Deletion defaults to a dry run so you can inspect the returned labels before mutating data.Parameters
If
True, return the labels that would be deleted without deleting them.
Pass False to perform the deletion.Returns
DeleteLabelsResult and DeletedLabelPreview are exported from docent.sdk for typing:
DeletedLabelPreview records include:
Errors
ValueError—label_idsis empty or contains duplicatesHTTPError (404)— Collection, label set, or label not found
General Labels
General labels use the same schema validation model as label sets, but they can target several Docent object types instead of only one agent run.Create a General Label Set
List and Fetch General Label Sets
Create a General Label
target.items can contain agent_run, transcript, transcript_slice, or
reading_result targets.
Get a General Label
Update a General Label
Update a general label’slabel_value and optionally replace its metadata. The
server verifies that the label belongs to the supplied general label set.
Parameters
Returns
Delete General Labels
Preview or delete specific general labels from a general label set. Likedelete_labels, this method defaults to a dry run.
Parameters
If
True, return the general labels that would be deleted without deleting
them. Pass False to perform the deletion.Returns
Errors
ValueError—label_idsis empty or contains duplicatesHTTPError (404)— Collection, general label set, or general label not found

