How to use Source Label query parameters

Add these parameters to your embed code or API request to control which labeled sources the agent draws from.

For setup instructions, refer to 👉 Enable and Use Labels for Your Agent.


The labels parameter

Tells the agent which labeled sources to search. You may use both label names and their IDs.

FormatSyntaxLogic
Simple listlabels="A,B,C"OR - returns any source that has at least one of these labels
Arraylabels='[["A","B"],["C","D"]]'AND/OR - inner brackets OR, outer brackets AND

Array logic: To be included, a source needs at least one matching label from every bracket.

[["A","B"],["C","D"]] = (A or B) AND (C or D)

The labels_exclusive parameter

Controls whether sources with no labels are included in results.

ValueOutcome
trueOnly sources matching your labels
false (default)Sources matching your labels, plus any sources with no label

Limits

LimitValue
Max groups (array format)20
Max labels per group50
Max labels total500

Edge cases

ScenarioBehavior
Invalid labelIgnored - the other labels and conditions still apply.
No labels + labels_exclusive="true"No sources served. The agent will return the I'm sorry response.

Related articles