agent-analytics
GET
https://lucidace.com /v1/projects/{project_id}/agent-analytics/conversations Scope insight:readParameters
project_idstringpathrequiredfromstringquerytostringqueryagentstringqueryoutcomestringquerytopicstringqueryempty = unlabeled
ragebooleanqueryunresolvedbooleanqueryfeedbackstringquerynegative or positivelimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/agent-analytics/conversations"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 newest first
Example
{
"data": [
{
"agent_name": "string",
"agent_version": "string",
"assistant_turns": 0,
"conversation_id": "string",
"cost_usd": 0,
"distinct_id": "string",
"duration_s": 0,
"feedback_down": 0,
"feedback_up": 0,
"last_at": "2024-01-01T00:00:00Z",
"negatives": 0,
"outcome": "string",
"person_id": "string",
"rage": true,
"rating_avg": 0,
"rephrases": 0,
"resolution": "string",
"session_id": "string",
"started_at": "2024-01-01T00:00:00Z",
"topic": "string",
"trace_id": "string",
"unresolved": true,
"use_case": "string",
"user_turns": 0
}
],
"next_cursor": "string"
}Schema
dataobject[]requiredShow child parameters
agent_namestringrequiredagent_versionstringrequiredassistant_turnsintegerrequiredconversation_idstringrequiredcost_usdnumberLLM cost in USD of the conversation's Watchtower trace (sum of its runs), once the
watchtower connector's llm_runs stream has synced them; null otherwise.distinct_idstringrequiredPseudonymised for callers without
pii:read.duration_sintegerrequiredfeedback_downintegerrequiredfeedback_upintegerrequiredlast_atstringrequirednegativesintegerrequiredoutcomestringrequiredThe explicit outcome, else
ended, abandoned (idle 30 min) or active.person_idstringnull for personless events ($process_person_profile: false).ragebooleanrequiredrating_avgnumberrephrasesintegerrequiredresolutionstringsession_idstringstarted_atstringrequiredtopicstringtrace_idstringW3C trace id (
$ai_trace_id): the join key to Watchtower, for the deep link and the cost.unresolvedbooleanrequireduse_casestringuser_turnsintegerrequirednext_cursorstring400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/agent-analytics/conversations/{conversation_id} Scope insight:readParameters
project_idstringpathrequiredconversation_idstringpathrequiredCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/agent-analytics/conversations/{conversation_id}"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 transcript; text is null and text_masked true when not captured or without pii:read
Example
{
"conversation": {
"agent_name": "string",
"agent_version": "string",
"assistant_turns": 0,
"conversation_id": "string",
"cost_usd": 0,
"distinct_id": "string",
"duration_s": 0,
"feedback_down": 0,
"feedback_up": 0,
"last_at": "2024-01-01T00:00:00Z",
"negatives": 0,
"outcome": "string",
"person_id": "string",
"rage": true,
"rating_avg": 0,
"rephrases": 0,
"resolution": "string",
"session_id": "string",
"started_at": "2024-01-01T00:00:00Z",
"topic": "string",
"trace_id": "string",
"unresolved": true,
"use_case": "string",
"user_turns": 0
},
"feedback": [
{
"comment": "string",
"kind": "string",
"message_index": 0,
"timestamp": "2024-01-01T00:00:00Z",
"value": 0
}
],
"messages": [
{
"index": 0,
"rephrase": true,
"role": "string",
"sentiment": 0,
"text": "string",
"text_length": 0,
"text_masked": true,
"timestamp": "2024-01-01T00:00:00Z"
}
],
"replay_session_id": "string",
"watchtower_trace_url": "string"
}Schema
conversationobjectrequiredShow child parameters
agent_namestringrequiredagent_versionstringrequiredassistant_turnsintegerrequiredconversation_idstringrequiredcost_usdnumberLLM cost in USD of the conversation's Watchtower trace (sum of its runs), once the
watchtower connector's llm_runs stream has synced them; null otherwise.distinct_idstringrequiredPseudonymised for callers without
pii:read.duration_sintegerrequiredfeedback_downintegerrequiredfeedback_upintegerrequiredlast_atstringrequirednegativesintegerrequiredoutcomestringrequiredThe explicit outcome, else
ended, abandoned (idle 30 min) or active.person_idstringnull for personless events ($process_person_profile: false).ragebooleanrequiredrating_avgnumberrephrasesintegerrequiredresolutionstringsession_idstringstarted_atstringrequiredtopicstringtrace_idstringW3C trace id (
$ai_trace_id): the join key to Watchtower, for the deep link and the cost.unresolvedbooleanrequireduse_casestringuser_turnsintegerrequiredfeedbackAgentFeedback[]requiredShow child parameters
commentstringnull when not captured or the caller lacks pii:read.kindstringrequiredmessage_indexintegertimestampstringrequiredvaluenumbermessagesAgentMessage[]requiredShow child parameters
indexintegerrequiredrephrasebooleanrequiredA user message within 20 bits of the previous user message's simhash.
rolestringrequiredsentimentintegertextstringnull when not captured or the caller lacks pii:read (text_masked is then true).text_lengthintegerrequiredtext_maskedbooleanrequiredtimestampstringrequiredreplay_session_idstringwatchtower_trace_urlstringWatchtower trace view, only when the project has a Watchtower connector and a trace id.
404
503
GET
https://lucidace.com /v1/projects/{project_id}/agent-analytics/feedback Scope insight:readParameters
project_idstringpathrequiredfromstringquerytostringqueryagentstringquerykindstringquerythumbs, rating or commentlimitintegerquerycursorstringqueryCode samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/agent-analytics/feedback"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 newest first; comments masked like transcript text
Example
{
"data": [
{
"comment": "string",
"kind": "string",
"message_index": 0,
"timestamp": "2024-01-01T00:00:00Z",
"value": 0,
"agent_name": "string",
"conversation_id": "string",
"distinct_id": "string"
}
],
"next_cursor": "string"
}Schema
dataAgentFeedback & object[]requiredShow child parameters
commentstringnull when not captured or the caller lacks pii:read.kindstringrequiredmessage_indexintegertimestampstringrequiredvaluenumberagent_namestringrequiredconversation_idstringrequireddistinct_idstringrequirednext_cursorstring400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/agent-analytics/overview Scope insight:readParameters
project_idstringpathrequiredfromstringquerytostringqueryagentstringqueryagent_name filter
Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/agent-analytics/overview"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200
Example
{
"abandoned_pct": 0,
"active_users": 0,
"adoption_pct": 0,
"agents": [
{
"agent_name": "string",
"agent_version": "string",
"conversations": 0
}
],
"avg_duration_s": 0,
"avg_user_turns": 0,
"by_day": [
{
"conversations": 0,
"day": "string",
"users": 0
}
],
"conversations": 0,
"feedback": {
"comments": 0,
"down": 0,
"rating_avg": 0,
"ratings": 0,
"up": 0
},
"outcomes": [
{
"conversations": 0,
"outcome": "string"
}
],
"person_coverage": 0,
"rage_pct": 0,
"resolved_pct": 0,
"unresolved_pct": 0,
"users": 0
}Schema
abandoned_pctnumberrequiredactive_usersintegerDistinct persons with any event in the range;
null like users.adoption_pctnumbernull like users.agentsAgentCount[]requiredShow child parameters
agent_namestringrequiredagent_versionstringrequiredconversationsintegerrequiredavg_duration_snumberrequiredavg_user_turnsnumberrequiredby_dayDayCount[]requiredShow child parameters
conversationsintegerrequireddaystringrequiredYYYY-MM-DD (UTC).usersintegernull when no conversation that day has a person.conversationsintegerrequiredfeedbackobjectrequiredShow child parameters
commentsintegerrequireddownintegerrequiredrating_avgnumberratingsintegerrequiredupintegerrequiredoutcomesOutcomeCount[]requiredShow child parameters
conversationsintegerrequiredoutcomestringrequiredperson_coveragenumberrequiredShare of conversations whose events have a person profile, 0 to 1.
rage_pctnumberrequiredresolved_pctnumberrequiredunresolved_pctnumberrequiredusersintegerDistinct persons;
null when no conversation has a person profile.400
404
503
GET
https://lucidace.com /v1/projects/{project_id}/agent-analytics/retention Scope insight:readParameters
project_idstringpathrequiredfromstringquerytostringqueryperiodstringqueryday or week (default)periodsintegerquery1 to 26, default 8
lookback_daysintegerquerydays before
from searched for a person's earlier activity (first seen), 1 to 365, default 90Code samples
cURL
curl -X GET "https://lucidace.com/v1/projects/{project_id}/agent-analytics/retention"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 persons first seen in the range, by whether they used an agent in their first period
Example
{
"cohorts": [
{
"retained_pct": [
0
],
"segment": "string",
"size": 0
}
],
"period": "string"
}Schema
cohortsRetentionCohort[]requiredShow child parameters
retained_pctnumber[]requiredShare of the cohort with any event in period 0, 1, ...; period 0 is 100 when size > 0.
null entries when the cohort is empty (for example no event has a person profile).segmentstringrequiredagent_users | non_agent_users.sizeintegerrequiredperiodstringrequiredday | week.400
404
503
Updated