Monitoring
List violations
See the rules your agents have broken.
How it works
A violation is one agent breaking one rule. If an agent breaks the same rule in 10 conversations, that is one violation with session_count: 10.
Use group_by to choose how much detail you get:
directive(the default): one row for each rule an agent broke, with how many conversations broke it and when it was first and last seen.pattern: for one violation, groups the conversations that broke the rule in the same way. Needsdeployment_idanddirective_id.session: for one violation, one row per conversation. Needsdeployment_idanddirective_id.
To dig into a row, send its deployment_id, directive_id, binding_text_id and pack_id back with the next group_by.
Request body
application/json
- group_bystringdefault directive
How much detail to return. See above.
directivepatternsession - deployment_idstring
Only this deployment. Required for
patternandsession. - directive_idstring
The rule. Required for
patternandsession. - binding_text_idstring
Only rules from this source. Copy it from a row.
- pack_idstring (uuid)
Only rules from this pack.
- pattern_idstring
With
session: only conversations in this pattern. - severitiesstring[]
With
directive: only these severities.criticalhighmediumlow - sincestringdefault 30d
How far back to look, such as
30m,12h,7d, orallfor everything. - limitinteger
How many rows per page. With
directive, the default is 10 and the most is 200. Withsession, the default is 25 and the most is 100. - cursorstring
The
next_cursorfrom the previous page. - sourcestringdefault PLATFORM
Which conversations to include:
PLATFORMfor ones Ollive collected,APIfor ones you sent.PLATFORMAPI
Every field is optional unless group_by needs it. Send {} for all violations in the last 30 days.
Response
The violations found. An empty list if there are none.
- dataobject[]required
One row per violation, pattern or conversation, depending on
group_by.- deployment_idstring (uuid)required
The deployment that broke the rule.
- directive_idstringrequired
The rule.
- binding_text_idstringrequired
The law, regulation or contract the rule comes from.
- pack_idstringrequired
The rule pack it belongs to.
- pack_namestringrequired
The rule pack’s name.
- titlestringrequired
A short name for the violation.
- descriptionstringrequired
A longer explanation.
- source_kindstringrequired
Where the rule comes from.
regulationframeworkcustom - severitystringrequired
How serious it is.
criticalhighmediumlow - citationsstring[]required
References to the source, such as a section number.
- directive_textstringrequired
The rule, in words.
- violation_textstringrequired
What the agent did wrong.
- session_countintegerrequired
How many conversations broke the rule.
- first_seen_atstring (date-time)
When it first happened.
directiverows only. - last_seen_atstring (date-time)
When it last happened.
directiverows only. - pattern_idstringrequired
The pattern’s ID. Set on
patternandsessionrows. - factsobject[]required
What the conversations in this pattern have in common.
patternrows only.- fieldstringrequired
The fact’s name.
- questionstringrequired
The question Ollive answered.
- answerstringrequired
The answer.
truefalseunknown
- sessionobject
The conversation.
sessionrows only.- session_refstringrequired
Your ID for the conversation.
- occurred_atstring (date-time)
When it happened.
- duration_msinteger
How long it lasted, in milliseconds.
- failed_stepsobject[]required
Where in the conversation the rule was broken.
- rationalestringrequired
Why it broke the rule.
- turn_indicesinteger[]required
The turns involved.
- flagged_turn_indicesinteger[]required
Every turn that was flagged.
- total_countintegerrequired
How many results match, across all pages.
- has_morebooleanrequired
Whether there is another page.
- next_cursorstringrequired
Send this as
cursorto get the next page. Empty on the last page.
Something in the request is wrong. code and param tell you what.
Returns an error, for example with the code invalid_request.
The API key is missing, wrong, revoked or expired.
Returns an error, for example with the code authentication_failed.