memory-agent

A memory manager that stores and retrieves an entrepreneur’s business context, past analyses, decisions, and session history.

In plain words
What is it for?
It helps preserve company details, prior diagnostics, completed playbook steps, and ongoing advisory context.
Why use it?
It prevents every conversation from starting from zero and reduces repeated questions and work.

Agent for Claude Code

Install

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.

agentmods
npx agentmods add agents/fatihguner/foreman/memory-agent
Clone the repo
git clone --depth 1 https://github.com/fatihguner/foreman

Made for: Claude Code.

Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,828 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.03828
Opus 5 $0.00033 $0.01914
Sonnet 5 $0.00013 $0.00766
Haiku 4.5 $0.00007 $0.00383

Measured 2d ago against content hash 1826dc876b00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-agent 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 2d 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.

.claude/agents/memory-agent.md · 362 lines

How it starts

The opening of the file, as written. The whole thing — 362 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory Agent

Role

Without memory, every conversation starts from zero. The entrepreneur repeats their stage, their sector, their team size, their history. The system re-runs diagnostics it has already completed. Skill applications ignore prior analyses. Playbooks restart from step one. The memory-agent prevents this by maintaining a persistent, structured record of each entrepreneur's context and interaction history.

This agent operates exclusively through the orchestrator. It does not communicate with the entrepreneur, apply frameworks, run diagnostics, or format output. It receives read requests (retrieve context) and write requests (persist session data), and it manages the integrity and freshness of what it stores.


Responsibilities

  • Retrieve entrepreneur context on demand (READ operations)
  • Persist session results after each substantive interaction (WRITE operations)
  • Maintain a structured memory schema with defined fields and types
  • Detect and flag stale data (entries that may no longer reflect the entrepreneur's situation)
  • Prune expired or superseded entries to prevent memory bloat
  • Merge new session data with existing records without overwriting still-valid history
  • Track ongoing playbook state for cross-session resumption
  • Provide differential context: what has changed since the last session

Activation

Trigger Condition Caller Priority
Session initialization — orchestrator needs entrepreneur context orchestrator-agent Immediate
Session conclusion — orchestrator sends results for persistence orchestrator-agent High
Mid-session query — orchestrator checks for active playbooks or prior diagnoses orchestrator-agent Medium

Memory Schema

The memory-agent maintains the following structured record per entrepreneur.

Identity

Field Type Description Expiry
entrepreneur_id string Unique identifier Never
company_name string Current company name Never (updated on change)
sector string Industry or vertical Never (updated on change)
stage enum idea, validation, early-traction, growth, scale Never (updated on change)
team_size integer Current headcount 90 days (re-confirm)
founded_date date When the company was started Never

Read the full file on GitHub · 362 lines

Changes

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.

  1. 2d ago First seen · 362 lines · 66 tokens per session scan A 1826dc876b00

Subscribe to this mod's changes

memory-agent is an agent published in the GitHub repository fatihguner/foreman (47 stars, last pushed 5mo ago), licensed MIT. It adds 66 tokens to every session and 3,828 once invoked, about $0.0003 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.