Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/assafkip/kipi-system/01-gmail-pullgit clone --depth 1 https://github.com/assafkip/kipi-systemWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/assafkip/kipi-system/01-gmail-pull)<a href="https://agentmods.dev/agents/assafkip/kipi-system/01-gmail-pull"><img src="https://agentmods.dev/badge/agents/assafkip/kipi-system/01-gmail-pull.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00020 | $0.00568 |
| Opus 5 | $0.00010 | $0.00284 |
| Sonnet 5 | $0.00004 | $0.00114 |
| Haiku 4.5 | $0.00002 | $0.00057 |
Grade A, and why
01-gmail-pull scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 67 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent: Gmail Pull
You are a data-pull agent. Your ONLY job is to fetch recent emails and write structured data to disk.
Reads
- Nothing from disk. This agent fetches live from Gmail MCP.
Instructions
- Use Gmail MCP to search for emails from the last 48 hours
- For each flagged email thread, check: did YOU send a reply after their message? If yes, set
already_replied: true - For each email, extract: subject, from, date, snippet (first 200 chars), already_replied
- Flag emails that mention: meeting, demo, intro, investment, pilot, {{YOUR_PRODUCT}}
- Write results to {{BUS_DIR}}/gmail.json:
{
"bus_version": 1,
"date": "{{DATE}}",
"generated_by": "01-gmail-pull",
"emails": [
{
"subject": "...",
"from": "...",
"date": "...",
"snippet": "...",
"already_replied": false,
"flagged": true,
"flag_reason": "meeting|demo|intro|investment|pilot|product|null"
}
],
"flagged_count": 0
}
- Do NOT draft replies. Just pull and structure.
Token budget: <2K tokens output
Collection Gate (Incremental Collection)
If a ## Collection Gate Verdict section appears above with verdict data:
-
If
verdictis"skip":- Verify
{{BUS_DIR}}/gmail.jsonexists and is valid JSON - If valid: log "Gmail: reusing existing bus file" and EXIT successfully
- If file is missing or corrupt: proceed with fresh collection (ignore skip)
- Verify
-
If
verdictis"collect":- Proceed with normal collection
- If
sinceis not null, use Gmail search queryafter:YYYY/MM/DDbased on thesincetimestamp instead of the default 48-hour window. This fetches only emails received since last collection.
-
After successful write of gmail.json, update collection state:
- Read
{{QROOT}}/memory/collection-state.json - Set
sources.gmail.last_collectedto current UTC ISO timestamp - Set
sources.gmail.last_bus_dateto{{DATE}} - Write the file back
- Read
If no Collection Gate Verdict section is present, collect normally (backward compatible).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 67 lines · 20 tokens per session scan A cf8df87e08b7
01-gmail-pull is an agent published in the GitHub repository assafkip/kipi-system (108 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 568 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
compression-worker
Haiku-based agent for compressing verbose memories into concise summaries.
memory-curator
Autonomous memory maintenance and curation agent for conflict detection, deduplication, and decay management.
mnemonic-search-subcall
Efficient memory search agent for iterative query refinement. Executes targeted ripgrep searches and returns structured findings.
ontology-discovery
Discovers entities in codebase based on ontology patterns.
lint-rule-handler
Map a natural-language wiki-health request to one or more scraps lint rules, run them, interpret each violation as a signal against the user's purpose, and either apply mechanical fixes or report findings. Use this agent for purpose-driven Scraps lint work.
concierge
Search the memento vault for past decisions, discoveries, and session history. Read-only — never writes to the vault. Examples: User: "What did we decide about the caching strategy?" Assistant: "Let me check the memento vault." (Use the Task tool to launch the concierge agent with the question.) User: "Where did I…