History

Interaction log that records email actions for learning. Helps the AI identify patterns and improve over time.

Purpose

History tracks what happened with emails so the AI can learn patterns and make better decisions. It records actions taken, templates used, and whether they worked.

Auto-Populated
History is primarily written by the AI during blitz sessions. You don't need to maintain it manually.

What Gets Logged

  • Email details (UID, sender, subject)
  • Action taken (replied, archived, delegated, etc.)
  • Template used (if any)
  • Response time
  • Whether it was helpful (feedback)

Entry Structure

{
"email_uid": "37801",
"account_id": "work-uuid",
"from": "[email protected]",
"subject": "Question about pricing",
"action_taken": "replied",
"template_used": "pricing-inquiry",
"response_time_mins": 15,
"was_helpful": true,
"notes": "Customer was satisfied with response",
"timestamp": "2026-01-08T14:30:00Z"
}

Field Reference

FieldDescription
email_uidEmail identifier
account_idWhich account this was from
fromSender email address
subjectEmail subject line
action_takenWhat was done (see Action Types)
template_usedTemplate ID if one was used
response_time_minsTime to respond in minutes
was_helpfulUser feedback: null, true, or false
notesAdditional context
timestampWhen action was taken (ISO format)

Action Types

ActionDescription
repliedSent a reply
archivedMoved to archive
moved:folderMoved to specific folder
delegated:emailHanded off to someone
ignoredNo action taken
forwardedForwarded elsewhere

How AI Uses History

  1. Pattern discovery — Identify recurring email types and successful responses
  2. Template effectiveness — Track which templates work well
  3. Response time tracking — Understand urgency patterns
  4. Learning from feedback — Improve based on was_helpful flags

What to Log

The AI should log significant actions, not every archive:

  • Replies to customers or important contacts
  • Actions where a template was used
  • Delegations and handoffs
  • Situations that could inform future behavior
Privacy Note
History contains email metadata. It's stored locally and included in sync exports. Be mindful of what gets logged.

File Location

~/.config/pontius/knowledge/history/history.json