Files
Evan Hu afcb260554 feat: add 6 production-ready plugins
All plugins are stdlib-only Python with no external dependencies.

- auto-summarizer: extractive conversation summary for long context
  compression, persists per-agent summaries to disk
- conversation-logger: JSONL audit logs per agent with ISO 8601
  timestamps, auto-creates log directory tree
- guardrails: safety filter detecting PII (email, phone, SSN, CC),
  prompt injection patterns, and credential exposure via regex
- keyword-memory: extracts entities (emails, URLs, dates, technical
  terms like camelCase/snake_case/dotted identifiers) as memories
- sentiment-tracker: keyword-based sentiment scoring with intensifiers
  and negation handling, only injects context for non-neutral sentiment
- todo-tracker: detects action items via 7 task patterns, tracks
  completion, deduplicates, persists per-agent with 20-item FIFO limit
2026-03-21 02:51:58 +09:00

1.6 KiB

sentiment-tracker

Analyzes user message sentiment using keyword-based scoring and injects emotional context so agents can respond with appropriate tone. No external ML libraries required (stdlib only).

Scoring Method

  • Positive words (~30): great, love, excellent, awesome, helpful, appreciate, etc. (+1 each)
  • Negative words (~30): bad, terrible, frustrated, broken, bug, error, crash, etc. (-1 each)
  • Intensifiers: very, extremely, really, absolutely, totally (multiply next sentiment word by 1.5x)
  • Negators: not, no, never, don't, doesn't, isn't, can't, won't (flip next word's polarity)

The raw score is normalized by message length and clamped to [-1.0, 1.0].

Classification

Score Range Label Action
> 0.3 positive Inject positive context memory
< -0.3 negative Inject frustration-aware memory
-0.3 to 0.3 neutral No memory injected (avoid context clutter)

Hooks

Hook Script Description
ingest hooks/ingest.py Analyzes message sentiment and returns emotional context as a memory fragment

Example Output

Negative sentiment:

{"type": "ingest_result", "memories": [{"content": "[sentiment] User appears frustrated (score: -0.6). Consider acknowledging the issue."}]}

Positive sentiment:

{"type": "ingest_result", "memories": [{"content": "[sentiment] User seems satisfied (score: 0.7). Positive interaction."}]}

Neutral sentiment returns an empty memories list.

Usage

Installed automatically when enabled in agent configuration. No external dependencies required (stdlib only).