Agent Diary

{{ date }} · generated {{ generated_at }}
{% if total_conversations == 0 %}
--

No sessions found for {{ date }}

{% else %} {% if conversations|length > 0 and sources_with_sessions|length > 1 %}
{% for src in sources_with_sessions %} {% endfor %}
{% endif %} {% for variant_key in ['all'] + sources_with_sessions %} {% set data = per_source_metrics[variant_key] %} {% if data %}
{% with sentiment=data.sentiment, tone=data.tone, interaction=data.interaction, effectiveness_index=data.effectiveness, tone_max=data.tone_max, total_conversations=data.totals.conversations, total_messages=data.totals.messages, sources_data=data.sources_data %}
Overall Tone
{{ sentiment.dominant_tone }}
compound {{ sentiment.overall_compound }}
Effectiveness
{{ effectiveness_index.score }}%
{{ effectiveness_index.label }}
Conversations
{{ total_conversations|thousands }}
{{ total_messages|thousands }} messages
Interaction
{{ interaction.avg_turns_per_session }}
avg turns per session

Tone Distribution

{% for polarity in ['positive', 'neutral', 'negative'] %} {% set count = sentiment.polarity_distribution[polarity] %} {% set pct = (count / tone_max * 100) | round %}
{{ polarity }}
{{ count|thousands }}
{% endfor %}

Agent Behavior

Apology Rate
{{ (tone.apology_rate * 100)|round }}%
{{ tone.apology_count|thousands }} apologies in {{ tone.total_agent_messages|thousands }} messages
Confidence
{{ "%.2f"|format(tone.confidence_net) }}
{{ tone.confidence_count|thousands }} confident vs {{ tone.uncertainty_count|thousands }} uncertain markers
Helpfulness
{{ (tone.helpfulness_rate * 100)|round }}%
{{ tone.helpfulness_count|thousands }} helpful markers
Self-correction
{{ (tone.self_correction_rate * 100)|round }}%
{{ tone.self_correction_count|thousands }} backtrack markers
Agent Questions
{{ (tone.question_rate * 100)|round }}%
{{ tone.question_count|thousands }} clarification questions asked
Avg Response Length
{{ tone.avg_message_length|thousands }}
chars per agent response

Interaction Quality

Sessions
{{ interaction.total_sessions|thousands }}
{{ interaction.clean_exits|thousands }} clean exits, {{ interaction.dangling_exits|thousands }} dangling
Avg Turns
{{ interaction.avg_turns_per_session }}
user-assistant exchanges per session
Correction Rate
{{ (interaction.correction_ratio * 100)|round }}%
{{ interaction.total_corrections|thousands }} correction messages / {{ interaction.total_turns|thousands }} turns
Clarification Rate
{{ (interaction.clarification_ratio * 100)|round }}%
{{ interaction.total_clarifications|thousands }} clarification questions / {{ interaction.total_turns|thousands }} turns
Re-do Rate
{{ interaction.avg_redos_per_session }}
avg repeated tool calls per session
Exit Quality
{{ (interaction.clean_exit_ratio * 100)|round }}%
clean session end rate

Per-Source Breakdown

{% for src, data in sources_data.items() %} {% endfor %}
Source Sessions Messages Tool Calls Tokens Avg Tone
{{ src }} {{ data.sessions|thousands }} {{ data.messages|thousands }} {{ data.tool_calls|thousands }} {{ data.tokens|thousands }} {% if data.avg_tone is not none %} {{ "%.2f"|format(data.avg_tone) }} {% else %} -- {% endif %}
{% endwith %}
{% endif %} {% endfor %} {% if notable.best or notable.worst %}

Notable Chats

{% if notable.best %}

Most Positive Messages

{% for s in notable.best %}
{{ s.source }} {{ s.compound }}
{{ s.content_preview }}
msg #{{ s.msg_idx }} {% if s.tokens_input or s.tokens_output %}in: {{ s.tokens_input|thousands }} out: {{ s.tokens_output|thousands }}{% endif %}
{% endfor %}
{% endif %} {% if notable.worst %}

Most Negative Messages

{% for s in notable.worst %}
{{ s.source }} {{ s.compound }}
{{ s.content_preview }}
msg #{{ s.msg_idx }} {% if s.tokens_input or s.tokens_output %}in: {{ s.tokens_input|thousands }} out: {{ s.tokens_output|thousands }}{% endif %}
{% endfor %}
{% endif %}
{% endif %}

All Sessions ({{ conversations|length|thousands }})

{% for conv in conversations %} {% set conv_sentiment = (sentiment.per_conversation | selectattr("id", "equalto", conv.id) | list) %} {% set tone_score = conv_sentiment[0].avg_compound if conv_sentiment else 0 %}
{{ conv.source }} {{ conv.id[:20] }}...
{{ "%.2f"|format(tone_score) }}
Model: {{ conv.model or 'unknown' }} {{ conv.message_count|thousands }} msgs {{ conv.tool_call_count|thousands }} tool calls {% if conv.tokens_input or conv.tokens_output %}in: {{ conv.tokens_input|thousands }} out: {{ conv.tokens_output|thousands }}{% else %}{{ conv.total_tokens|thousands }} tokens{% endif %}
{% endfor %}
{% endif %}