Initial commit: Hermes Agent Skills collection
This commit is contained in:
+53
@@ -0,0 +1,53 @@
|
||||
# Amazon Email Classification Patterns
|
||||
|
||||
Patterns for distinguishing Amazon invoice emails from order confirmations and delivery notifications.
|
||||
|
||||
## Key Distinctions
|
||||
|
||||
### Invoice (Rechnung)
|
||||
- **Sender:** `no-reply@amazon.de` (Amazon forwards Marketplace invoices)
|
||||
- **Subject:** `[Wichtig] Rechnung für Ihre Bestellung`
|
||||
- **Body keywords:** `Rechnungsnummer`, `Rechnungsdatum`, `Zahlbetrag`, `Umsatzsteuer`, `USt-IdNr`, `Rechnungsempfänger`
|
||||
- **Note:** Always check the `From` address — Amazon Marketplace sellers (Hugendubel, etc.) send invoices via Amazon's forwarding system. The actual seller name appears in the body.
|
||||
|
||||
### Order Confirmation (Bestellbestätigung)
|
||||
- **Sender:** `bestellbestaetigung@amazon.de`
|
||||
- **Subject:** `Bestellt: „[Artikelname]..."`
|
||||
- **Body keywords:** `Bestellnr.`, `Vielen Dank für deine Bestellung`, `Summe` (but NOT `Rechnungsnummer`)
|
||||
- **Note:** This is NOT an invoice. The invoice arrives separately after delivery.
|
||||
|
||||
### Shipment Notification (versendet/in Zustellung)
|
||||
- **Sender:** `order-update@amazon.de`
|
||||
- **Subject:** Contains `versendet` or `In Zustellung`
|
||||
- **Body keywords:** `In Zustellung`, `Versendet`
|
||||
- **Action:** Skip — not an invoice or order confirmation
|
||||
|
||||
### Delivery Confirmation (Zugestellt/Geliefert)
|
||||
- **Sender:** `order-update@amazon.de`
|
||||
- **Subject:** `Zugestellt: „[Artikelname]..."` or `Geliefert: „[Artikelname]..."`
|
||||
- **Body keywords:** `zugestellt`, `Die Sendung wurde im Garten hinterlegt`
|
||||
- **Action:** Skip — delivery notification, not an invoice
|
||||
|
||||
### DHL Delivery Notification
|
||||
- **Sender:** `noreply@dhl.de`
|
||||
- **Subject:** Contains `Sendung liegt am gewünschten Ablageort` or similar
|
||||
- **Action:** Skip — courier notification, not an invoice
|
||||
|
||||
## Quick Decision Tree
|
||||
|
||||
```
|
||||
From bestellbestaetigung@amazon.de → Bestellbestätigung
|
||||
From no-reply@amazon.de + "Rechnung" in subject → Invoice (read body for seller)
|
||||
From order-update@amazon.de → Check subject:
|
||||
"Zugestellt" / "Geliefert" → Delivery → skip
|
||||
"versendet" / "In Zustellung" → Shipment → skip
|
||||
From noreply@dhl.de → Delivery notification → skip
|
||||
From any other seller directly → Check body for "Rechnungsnummer" → Invoice
|
||||
```
|
||||
|
||||
## Session Examples
|
||||
|
||||
| ID | Sender | Subject | Type | Target |
|
||||
|----|--------|---------|------|--------|
|
||||
| 48474 | no-reply@amazon.de (Hugendubel) | [Wichtig] Rechnung für Ihre Bestellung | Rechnung | Rechnungen_2026_05 |
|
||||
| 48502 | bestellbestaetigung@amazon.de | Bestellt: „Kulturen Komplex..." | Bestellbestätigung | Bestellungen_2026_05 |
|
||||
@@ -0,0 +1,62 @@
|
||||
# Cron Job Model Fix (Post-Update)
|
||||
|
||||
**Session:** 2026-05-08 | **Impact:** All cron jobs with `model: null` break after Hermes Agent update
|
||||
|
||||
## Problem
|
||||
|
||||
After a Hermes Agent update, cron jobs with `model: null` fail immediately:
|
||||
|
||||
```
|
||||
Error code: 400 - {'message': 'model should be in provider/model format'}
|
||||
```
|
||||
|
||||
The new codepath strictly validates the `model` field — it no longer auto-resolves from config.
|
||||
|
||||
## Fix Pattern
|
||||
|
||||
### Step 1: Identify affected jobs
|
||||
```bash
|
||||
hermes cron list
|
||||
```
|
||||
Look for jobs where `model: null`.
|
||||
|
||||
### Step 2: Apply explicit model
|
||||
```bash
|
||||
hermes cron update <job-id> --model '{"model": "<provider>/<model>"}'
|
||||
```
|
||||
|
||||
Example for this setup:
|
||||
```bash
|
||||
hermes cron update <job-id> --model '{"model": "custom/llama/model.gguf"}'
|
||||
```
|
||||
|
||||
### Step 3: Verify
|
||||
```bash
|
||||
hermes cron list --name <job-name>
|
||||
```
|
||||
Confirm `model` is now `custom/llama/model.gguf`.
|
||||
|
||||
### Step 4: Restart gateway (if running)
|
||||
```bash
|
||||
systemctl --user restart hermes-gateway
|
||||
```
|
||||
The gateway process caches job definitions in memory. Restart ensures it loads updated models.
|
||||
|
||||
## Prevention
|
||||
|
||||
When creating new cron jobs, **always** specify the model explicitly:
|
||||
```bash
|
||||
hermes cron create --name "..." --model '{"model": "custom/llama/model.gguf"}' --prompt "..."
|
||||
```
|
||||
|
||||
Or for script-only jobs (no LLM needed), set `--no-agent`:
|
||||
```bash
|
||||
hermes cron create --name "..." --script "..." --no-agent
|
||||
```
|
||||
|
||||
## Session-Specifics (2026-05-08)
|
||||
|
||||
Three jobs were affected by the update to v0.13.0 (commit 474d1e812):
|
||||
- `SRE Network Reconnaissance` (4733a436d99a) → fixed
|
||||
- `Rechnungen-Organizer` (f773f8c23230) → fixed
|
||||
- `memory-sync-daily` (ce496a8d1062) → deleted and recreated as `no_agent: true` script-only
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
# learning.json Format
|
||||
|
||||
The learning file at `~/.hermes/email-organizer/learning.json` accumulates email classification rules across cron runs.
|
||||
|
||||
## Structure
|
||||
|
||||
```json
|
||||
{
|
||||
"corrections": [],
|
||||
"patterns": {
|
||||
"rechnung": {
|
||||
"<pattern_name>": {
|
||||
"sender": "exact@sender.com",
|
||||
"sender_pattern": "@appleid.com",
|
||||
"subject_keywords": ["keyword1", "keyword2"],
|
||||
"content_keywords": ["rechnung", "rechnungsnummer"],
|
||||
"folder": "Rechnungen_YYYY_MM",
|
||||
"source": "Vendor name",
|
||||
"notes": "Description and context"
|
||||
}
|
||||
},
|
||||
"bestellbestaetigung": {
|
||||
"<pattern_name>": { ... }
|
||||
},
|
||||
"ignorieren": {
|
||||
"<pattern_name>": { ... }
|
||||
}
|
||||
},
|
||||
"structured_ignore_patterns": [],
|
||||
"last_scan": "2026-06-10 09:13",
|
||||
"total_processed": 554,
|
||||
"total_moved": 20
|
||||
}
|
||||
```
|
||||
|
||||
## Pattern Fields
|
||||
|
||||
| Field | Required | Description |
|
||||
|-------|----------|-------------|
|
||||
| `sender` | Conditional | Exact email address (use with `sender_pattern` only) |
|
||||
| `sender_pattern` | Conditional | Email domain pattern with `@` prefix (e.g., `@appleid.com`) |
|
||||
| `subject_keywords` | Yes | Keywords matched case-insensitively in subject |
|
||||
| `content_keywords` | Conditional | Keywords matched in email body |
|
||||
| `folder` | Conditional | Override target folder (defaults based on category) |
|
||||
| `source` | Yes | Human-readable vendor/source name |
|
||||
| `notes` | Yes | Context: what type of email, whether it's an invoice or order, any caveats |
|
||||
|
||||
## Decision Criteria
|
||||
|
||||
### Invoice (Rechnung)
|
||||
Contains a **factored charge**: Rechnungsnummer, Gesamtbetrag, Steuern, Fälligkeitsdatum, Lastschrift.
|
||||
|
||||
### Order Confirmation (Bestellbestätigung)
|
||||
Contains an **order number and items** but NO invoice details. Invoice arrives separately.
|
||||
|
||||
### Ignore
|
||||
- Delivery notifications ("zugestellt", "versendet")
|
||||
- Newsletters, marketing emails
|
||||
- Social media notifications
|
||||
- Job alerts
|
||||
- Technical reports (solar, DMARC)
|
||||
|
||||
## Update Workflow
|
||||
|
||||
When a new pattern emerges during a scan:
|
||||
1. Add entry under the correct category in `patterns`
|
||||
2. Include `source` with vendor name
|
||||
3. Include `notes` with distinguishing characteristics
|
||||
4. Increment `total_processed` and `total_moved`
|
||||
5. Update `last_scan` timestamp
|
||||
Reference in New Issue
Block a user