Delete directory 'research'

This commit is contained in:
2026-08-13 20:49:00 +00:00
parent 8614d23bb4
commit acc5ab1f3c
2 changed files with 0 additions and 174 deletions
-115
View File
@@ -1,115 +0,0 @@
# Email Triage Setup for Hermes
**Project:** Tony_tech / research
**Date:** 2026-06-18
**Status:** In progress
**Owner:** Hermes (autonomous collaborator)
## Goals
- Automate triage of tonyjbala@gmail.com inbox
- Use AI (Hermes) to classify emails into categories
- Move emails to appropriate folders/labels
- Extract action items and integrate with Gitea / workflows
- Run periodically or on-demand via Hermes
## Current State
- Himalaya CLI installed (v1.2.0) in ~/.local/bin
- Config at ~/.config/himalaya/config.toml with gmail account (IMAP/SMTP)
- **Issue:** Authentication failing (invalid/expired app password)
- No Google Workspace OAuth set up yet (alternative path)
## Recommended Architecture
1. **Himalaya** for terminal IMAP operations (list, read, move, flag)
2. **Hermes agent** for intelligent classification (via terminal calls + reasoning)
3. **Gmail labels** as triage folders:
- Action (needs reply or task)
- Waiting (delegated / awaiting response)
- FYI / Read (no action)
- Archive (or use Gmail archive)
- Projects-specific if needed
4. **Integration points**:
- Create Gitea issues in Tony_tech for high-priority action items
- Link to daily briefs or opportunity scans
- Log triage decisions in artifacts
## Setup Steps (Current)
### 1. Fix Credentials (Himalaya)
- Go to https://myaccount.google.com/apppasswords
- Generate new 16-character app password for "Hermes Email" (Mail)
- Update config:
```bash
# Backup first
cp ~/.config/himalaya/config.toml ~/.config/himalaya/config.toml.bak
# Then edit the password line (or tell Hermes the new password securely)
sed -i 's/backend.auth.raw = "OLD_PASSWORD"/backend.auth.raw = "NEW_16CHAR_APP_PASSWORD"/' ~/.config/himalaya/config.toml
```
- Test:
```bash
export PATH="$HOME/.local/bin:$PATH"
himalaya account list
himalaya envelope list --output json --page 1 --page-size 3
```
### 2. Define Triage Categories
Standard labels to create in Gmail (or use himalaya to move):
- Action
- Waiting
- FYI
- Someday
Use Gmail web or:
```bash
himalaya folder create Action
# etc.
```
### 3. Triage Workflow Script
Create a script (e.g. ~/.local/bin/hermes-email-triage) that:
- Fetches unseen emails (`himalaya envelope list --unseen --output json`)
- For each email, extracts from, subject, date, snippet
- Uses Hermes reasoning or simple rules + LLM call to classify
- Moves with `himalaya message move <id> <folder>`
- Optionally creates Gitea issue for Action items via MCP tools
- Logs to ~/.hermes/profiles/leonard/artifacts/email-triage/
Example skeleton (to be implemented):
```bash
#!/bin/bash
export PATH="$HOME/.local/bin:$PATH"
emails=$(himalaya envelope list --unseen --output json)
# parse with jq, then for each: classify, act
```
### 4. Automation
- Cron or Hermes cronjob for periodic triage (e.g. every 30m or on new mail trigger)
- Manual trigger via Telegram: "triage email" or "run email triage"
### 5. Integration with Tony_tech
- All triage logic/docs in this folder
- Action items from email -> Gitea issues in Tony_tech
- Link to other workflows (daily briefs, agent persistence)
## Next Steps
- [ ] User provides new app password or runs update
- [ ] Test list/read/move
- [ ] Create Gmail labels
- [ ] Write initial triage script
- [ ] Test classification on sample emails
- [ ] Schedule via cronjob tool
- [ ] Add Gitea issue creation for actions
- [ ] Document results in Tony_tech
## Security Notes
- App password (not main password)
- Consider moving to OAuth via google-workspace skill for better long-term auth
- Never commit passwords to Gitea
## References
- Himalaya skill docs
- Gmail IMAP labels mapping
- Hermes terminal + execute_code for AI classification
---
*Work placed in Tony_tech as requested.*
-59
View File
@@ -1,59 +0,0 @@
# Headroom Evaluation & Densification Implementation for Hermes
**Source**: X post by @teknium (status 2067292705710031117) + detailed Hermes Agent self-evaluation.
**Date**: 2026-06 (approx from context)
**Status**: Partial integration - densification cherry-picked; CCR rejected.
## TL;DR
Headroom (github.com/chopratejas/headroom) is a token compression proxy claiming 60-95% savings.
For Hermes agent workloads (search_files JSON, multi-turn tool use, persistent context):
- CCR (remove + <<marker>> + retrieve) is **net-negative** (duplication + cache disruption).
- Lossless densification is **useful** (~60% on search_files per original eval).
**Action taken**: Implemented internal lossless densifier for search_files outputs (no external dep).
## Key Implementation
File: `~/.hermes/profiles/leonard/scripts/densify_search_results.py`
```python
def densify_search_results(result: dict) -> str:
# Converts
# {"total_count": N, "matches": [{"path":.., "line":.., "content":..}, ...]}
# to
# total:N
# path|line|content
# ./file.py|10|code here
```
- Lossless (roundtrip parser included).
- Escapes | and newlines.
- Handles truncated, target fields.
## Measured Benefits (tests)
- Small sample (6 matches): ~20% char savings.
- Larger realistic (36 matches, long snippets): ~18% savings.
- Expected higher on pure location searches or many short results (removes repeated JSON keys like "path","line","content" 100+ times).
Rough token impact: 15-30%+ reduction on search_files heavy paths (depends on content length vs structure).
## Why not full Headroom
- CCR causes agents to re-retrieve → pay twice.
- Breaks KV/prompt caching.
- Conflicts with Hermes existing compression/memory.
- Adds bloat/latency for our loop-heavy use.
## Replicable Ideas
- Apply similar densification to other JSON tools (mcp_gitea responses, terminal structured output).
- For search_files specifically: group by file or use minimal schema when context=0.
## Files
- Densifier: `/home/vpsadmin/.hermes/profiles/leonard/scripts/densify_search_results.py`
- Usage: After any `search_files(...)` call, `densify_search_results(result)` before injecting to context.
## Next
- Test in live multi-turn sessions.
- Add to agent tool response post-processing (optional flag).
- Extend to other high-volume tools.
- Monitor real token usage in daily briefs / opportunity scans.
See full evaluation in conversation history for details.