How agents use it
How an agent uses the cortex in a session: the briefing hook, the MCP tools it calls to search and save, the save reminder, and the usage log.
On this page
An agent connected to Memorinth gets three things: hooks that run at moments in a session, MCP tools it calls as it works, and skills that teach it how. Here’s a session from start to end.
1. The session starts: the briefing
The agent’s session-start hook runs memorinth hook session-start, which hands the agent a briefing before you type anything. It holds:
- the current facts;
- the accepted decisions;
- the most recent memories;
- the facts due for a recheck;
- the tags in use, so the agent reuses them.
An agent without the hook gets the same briefing by calling wake_up first.
2. It works: searching
When the agent reaches something it doesn’t know, it calls search_memory. Search covers the whole cortex, your notes included, and ranks by meaning as well as keywords. Current facts and accepted decisions rank higher; retired and superseded ones are hidden unless the agent asks for history.
The query can narrow by tag, type, status and folder, such as caching type:decision status:accepted. Searching covers the language.
To read a note in full, the agent calls get_note, which also returns the notes it links to and the notes that link to it.
3. It learns something: saving
| When | It calls |
|---|---|
| It learned something worth keeping | write_memory |
| A log grows | append_to_note |
| You settled a question | record_decision |
| It found a stable fact | add_fact, with a source |
| A due fact needs checking | revalidate_fact |
What it writes goes into memory/, decisions/ or facts/, never into your own notes, and says which agent wrote it.
4. It stops: the reminder
In Claude Code, a stop hook checks the session: if the agent changed files and saved nothing to the cortex, it asks it to consider saving before it finishes. Anything worth keeping gets saved; if nothing is, the agent just finishes.
You can also save on demand with the /memorinth-save skill.
The usage log
Every tool call is logged with when, which agent and which tool, never what was asked or written. memorinth usage turns it into a report, and the app shows the same on its Dashboard.
The full list of tools and what they take is in MCP tools.
Updated