Works with: Graphify, with a coding agent connected to the hosted MCP server.
Before you start
- A repository indexed in Graphify.
- A coding agent connected to the hosted MCP server.
- Access to Memory in Graphify, so you can keep a lesson after an agent saves it.
The problem
Git records the patch. It does not record the lesson: what failed in production, the root cause, and the trap to avoid next time. An agent that only reads the code can “simplify” a careful fix and bring the same failure back.What to save
Write one self-contained note that covers:- What broke
- The root cause, tied to a file or function
- The fix
- The trap to avoid
How to save it
The best way is Record an incident in the Advanced view of Memory, so you can set when it happened and link the files it affected. You can also add it more quickly from the Simple view, or ask your agent to save it after you approve the wording.Record an incident in Graphify
Open Memory, choose the repository, and switch to Advanced. Select Record an incident.- Fill in Incident identifier, such as INC-42 or the affected service, and What should the team know? with the lesson from above.
- Set Status to Open, or to Closed if the incident is already resolved.
- Under More options, set Effective time to when the incident happened (it defaults to when you save). Add the files in Related code paths, one repository-relative path per line. Graphify checks these against the code graph. That links the memory to code, so
recallwithpathscan rank it higher.
Ask your agent to call remember
Connected agents can save a fact with the hosted MCP tool remember. Ask the agent only after you have approved the wording.
remember takes text (the lesson, as one self-contained statement) and these optional fields: repository_id (the repository UUID or owner/name), session_id (groups notes from the same run; it defaults to the current MCP session), tags (free-form labels), and occurred_at (the ISO date or date-time the note is about). A tag such as incident is only a free-form label you choose. remember saves a plain note: it doesn’t mark the note as an incident or tie it to a file, so name the file and function in the text itself.
remember means Graphify received it, not that it is published. It waits as a suggestion until someone on your team keeps it, as described in Suggestions and kept memories.
When to recall it
Callrecall with a short question in query that names the file and function, because the wording of the question does most of the work. Optionally pass the repo-relative files you are about to edit in paths, and any function or class names in symbols. Those hints rank memories that are linked to that code higher. They are not a filter. Read what comes back as notes from earlier work, not as instructions.
Ask your agent to recall the lesson:
- Before it edits that file or function
- While it reviews a related pull request
- When a similar failure shows up again
Tell your agent in AGENTS.md
Most agents will not callremember or recall unless their instructions say when. Add a block like this to AGENTS.md or CLAUDE.md in the repository and commit it. Replace acme/web-app with the repository’s name in Graphify.
AGENTS.md
Check that it works
- If the memory is still a suggestion, keep it in Memory.
- In Advanced, open Test what agents can recall.
- Set Recall for to Agents / MCP / Published, unreviewed, and conversation turns (the default).
- Enter a Question that names the file, and select Check recall.
Next steps
Memory
Explore kept facts, suggestions and how agents recall them.
Document the why
Put the reason next to the code so agents do not “fix” it.
Graphify MCP
Connect the agents that save and recall memory.
Try it in Graphify
We build and host the graph for you, and review your pull requests with it. The Free plan (up to 3 repositories) needs no card. Pro and Teams start with a 14-day trial, card required.