agent-logbook
The agent-logbook server provides a local SQLite-backed long-term memory system for AI assistants, enabling structured storage, retrieval, and lifecycle management of facts, decisions, tasks, and questions across sessions.
Recall (
recall): Retrieve ranked, relevant memories using a keyword query within a configurable token budget (default 1500 tokens), optionally filtered by memory type.Remember (
remember): Persist a distilled fact, decision, task, question, or note. Automatically detects conflicts for the same type+entity to prevent silent overwrites; supports aforceflag to bypass this.Supersede (
supersede): Replace an outdated memory with an updated version while keeping the full history chain intact — nothing is ever deleted.List Open (
list_open): View all unresolved tasks and questions, optionally filtered by type, to aid planning.Set Status (
set_status): Mark a task or question asdone,dropped, or reopen it withopen.Memory History (
memory_history): Walk the full supersession chain for any memory to see how a fact or decision evolved over time.Memory Stats (
memory_stats): Get health metrics including total/live memory counts, open items, recall frequency, tokens served, and asavings_ratioshowing retrieval efficiency vs. reading the full corpus.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-logbookremember the user prefers dark mode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-logbook
Local SQLite long-term memory for AI assistants, served over MCP. Context window = working memory. This database = long-term memory.
Every decision logged, nothing erased: agent-logbook writes distilled facts and decisions to a plain SQLite file as your assistant works, ranks them by relevance and salience so retrieval stays cheap no matter how old the project gets, and keeps a full supersession chain when something changes — so you can always ask "why did we think that before."
Install
pip install agent-logbookRelated MCP server: MCPMem
Quickstart
cd your-project
agent-logbook-initThat's it — init detects which agentic tool you're using and wires up both
the MCP server registration and the memory-protocol instructions for it.
Works with
Tool | Instructions written to | MCP config written to |
Claude Code |
|
|
Cursor |
|
|
GitHub Copilot |
|
|
init never clobbers an existing config file — it merges in a memory server
entry alongside whatever's already there, and the protocol block is idempotent
(rerun it as many times as you want). If none of these three are detected, it
prints the protocol text and a generic MCP config snippet for you to adapt by
hand — see IMPLEMENTATION_GUIDE.md for the manual
steps and agent-logbook-init --help for --dry-run and --tool to force a
specific one.
Because the underlying intelligence (conflict checks, budgeted retrieval,
supersession) lives in the server, not the prompt, any MCP-compatible client
gets the same guarantees — the three above are just the ones init knows how
to wire up automatically today.
The seven tools, in plain terms
agent-logbook exposes seven MCP tools. Your assistant calls these itself — you never type them — but here's what each one actually does, since the names alone don't tell the whole story:
Tool | In plain terms | Example |
| "What do we already know about this?" Ranked, budget-capped retrieval — it never returns more than a fixed token budget, no matter how much history exists. |
|
| "Write this down." Saves one distilled fact or decision. If a live memory already exists for the same |
|
| "That decision changed — replace it, but keep the history." Nothing is deleted; the old row is marked superseded and linked to the new one. |
|
| "What's still unresolved?" Lists open tasks and questions. |
|
| "Mark this done" (or |
|
| "How did we get here?" Walks a memory's full supersession chain, oldest to newest. |
|
| A health check, plus the savings numbers this whole project is about: how many memories exist, how many recalls have happened, and the |
|
Explore what's stored
agent-logbook-viewer --dir /path/to/projectsGenerates a self-contained HTML report comparing every project's memory
database it finds — savings metrics (recall count, tokens served, savings
ratio) side by side, plus a searchable table of each project's actual stored
memories. Point it at one --db path or a parent folder containing several
projects.
Docs: IMPLEMENTATION_GUIDE.md (architecture + setup) and TESTING_GUIDE.md (test strategy).
Development
pip install -e ".[dev]" && pytestAvailable Tools
7 toolslist_openB
List open tasks and questions (optionally filter by type: 'task' or 'question'). Call when planning what to do next.
| Name | Required | Description | Default |
|---|---|---|---|
| type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It describes the tool's function but does not disclose whether it is read-only, any side effects, or rate limits. The description implies a safe operation but does not state it explicitly.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately conveys purpose and usage context. It is perfectly concise with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the output schema exists, return values are covered. However, the description does not mention that the tool is read-only or that it does not modify state, which would be helpful since no annotations are present. Adequate but could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds meaning by explaining the optional 'type' parameter can filter by 'task' or 'question'. This goes beyond the schema's type definition (anyOf string/null) and default value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists 'open tasks and questions' with optional filtering, which is a specific verb+resource. It does not explicitly distinguish from siblings, but the sibling tools are memory-related, implying this tool is about listing actionable items.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes 'Call when planning what to do next,' providing clear context for use. However, it does not specify when not to use or mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_historyB
Show the full supersession chain for a memory — how a fact/decision evolved over time. Useful for 'why did we think X before?' questions.
| Name | Required | Description | Default |
|---|---|---|---|
| memory_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It describes the read-like behavior but does not explicitly state it is safe, nor disclose any side effects, auth needs, or limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words, front-loaded with the core action. Efficient and to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Output schema exists, so return values need not be described. However, the description lacks usage guidelines and parameter details, making it minimally complete for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the tool description does not explain the memory_id parameter beyond its name. For a single integer parameter, the name is somewhat clear, but additional context like valid range or source would help.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool shows the full supersession chain for a memory, which is a specific verb and resource. It implicitly distinguishes from siblings by focusing on history, but does not explicitly differentiate from tools like memory_stats or recall.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a brief use case ('why did we think X before?') but does not specify when to use this tool versus alternatives, nor any exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_statsA
Counts of total/live memories and open items. Cheap health check. Also reports token-usage metrics: recall_count, avg_tokens_per_recall, total_tokens_served (lifetime tokens returned by recall), live_corpus_tokens (estimated tokens across all live memories), and savings_ratio (live_corpus_tokens / avg_tokens_per_recall — roughly how many recalls it would take to read the whole corpus instead of a budgeted slice; null if no recalls have happened yet).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses the tool's behavior: it returns counts and token-usage metrics, explains each metric (e.g., savings_ratio), and notes it's non-destructive. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: the first covers the main counts and cheapness, the second details token metrics. While clear and front-loaded, the parenthetical 'roughly how many recalls...' could be more concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given zero parameters and the presence of an output schema, the description adequately explains return values. It omits explicit sibling comparisons but the tool's purpose is clear. Minor room for improvement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is 100%. The description adds value by explaining the returned metrics beyond the input schema, which is sufficient for a zero-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool reports counts of total/live memories and open items, and describes it as a cheap health check. This distinguishes it from siblings like recall or remember, which handle specific memory operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'cheap health check' implies lightweight, suitable for quick status. However, there is no explicit guidance on when to use this tool over siblings like list_open or memory_history, nor exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
recallA
Retrieve relevant long-term memories for the current task. Call this at
the START of any task before doing work. Returns ranked memories (facts,
decisions, open tasks/questions) within a token budget, plus a count of
open items. query should be a few keywords describing the task.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| types | No | ||
| budget_tokens | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes return structure (ranked memories, open items count) and query hint. Lacks detail on budget_tokens behavior (e.g., truncation) and error handling. No annotations to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose and usage, no wasted words. Efficient and clear.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers key aspects: what it retrieves, when to use, query hint. Missing explanation of 'types' and specific behavior under token limit. Output schema exists but not detailed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Explains query parameter well ('few keywords'). Mentions token budget generically. Does not describe 'types' parameter or default/behavior of budget_tokens, partially compensating for 0% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the verb (retrieve), resource (long-term memories), and context (current task). Distinguishes from siblings like 'remember' (store) and 'list_open'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Call this at the START of any task before doing work', providing strong when-to-use guidance. Does not mention when not to use or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rememberA
Persist ONE distilled memory after completing a work block. type is one
of: fact, decision, task, question, note. content must be 1-2 sentences,
self-contained, in past/declarative form (a distillation — never a raw
transcript). entity is a short slug for what it concerns (e.g. 'auth',
'db-choice'). If a live memory already exists for the same type+entity,
this returns a CONFLICT without writing — then either supersede(old_id,...)
to update it, ask the user which stands, or retry with force=true to keep
both.
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| force | No | ||
| entity | No | ||
| content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses key behavior: returns CONFLICT without writing if a live memory exists for same type+entity. Also specifies content constraints. With no annotations, this is good coverage, though it doesn't mention other aspects like idempotency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense paragraph that is concise and front-loaded with the core purpose. Some slightly excessive detail could be structured, but overall very efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers input semantics, conflict behavior, and references sibling tools. Since output schema exists, lack of return value explanation is acceptable. Complete for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description fully explains all parameters: type enum values, content format (1-2 sentences, past/declarative), entity as short slug, and force as conflict resolution overwrite.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: persisting one distilled memory after a work block. It specifies the structure of type, content, and entity, and distinguishes itself from siblings like supersede by explaining conflict resolution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says when to use (after completing a work block) and what to do when a conflict occurs (use supersede, ask user, or force). Provides clear alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_statusB
Mark a task/question as 'done' or 'dropped' (or reopen with 'open').
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| memory_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full burden. It only states the status options without explaining side effects, permissions, or reversibility. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no redundant words. Every part contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no annotations), the description is adequate but lacks detail on return value (despite existing output schema) and prerequisites. It meets minimum viability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description adds value by listing valid status values ('done', 'dropped', 'open'). However, it provides no additional meaning for 'memory_id', which remains unclear beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action ('mark as done/dropped/open') and the resource type ('task/question'). It distinguishes the primary function from sibling tools like list_open or memory_history, though it doesn't explicitly contrast with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for changing status to the listed values, but provides no when-to-use or when-not-to-use guidance. No alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
supersedeA
Replace an outdated memory with an updated one. The old memory is kept in the chain for history (never deleted). Use this when a decision or fact has changed.
| Name | Required | Description | Default |
|---|---|---|---|
| old_id | Yes | ||
| new_content | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behaviors. It states the old memory is retained (non-destructive), but does not detail permissions, reversibility, or side effects beyond that. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no redundant information. The key points (replace, keep old, when to use) are front-loaded. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (not shown), the description need not detail returns. The simple replace operation is adequately described for an agent to understand its core behavior, though parameter semantics could be improved.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 2 parameters with 0% description coverage. The description implies 'old_id' identifies an outdated memory and 'new_content' provides updated content, but does not explain how IDs are resolved or the expected format of new_content. Minimal added value beyond schema names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (replace), the resource (memory), and the key behavior (old memory kept for history). It distinguishes from siblings like 'remember' and 'recall' by specifying memory supersedure.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance on when to use: 'when a decision or fact has changed'. It also clarifies that the old memory is never deleted, preventing misuse. No explicit when-not-to-use, but the positive guidance is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.1- First observed
list_open - First observed
memory_history - First observed
memory_stats - First observed
recall - First observed
remember - First observed
set_status - First observed
supersede
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: listing open items, showing memory history, stats, recalling, remembering, setting status, and superseding. No two tools overlap in functionality.
Names are inconsistent: some are verb_noun (list_open, set_status), some are noun_noun (memory_history, memory_stats), and others are single verbs (recall, remember, supersede). No uniform pattern.
Seven tools is an appropriate number for a memory/logbook system. Each tool handles a distinct operation without being too many or too few.
The tool set covers creation, retrieval, update (via supersede and set_status), and history for memories. Missing explicit deletion or a way to list all memories, but these gaps are minor for the intended purpose.
Related MCP Connectors
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
- AmberOAuthcom.ambermem
Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.
Persistent memory for AI agents. Search, store, and recall across sessions.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceProvides persistent local memory functionality for AI assistants, enabling them to store, retrieve, and search contextual information across conversations with SQLite-based full-text search. All data stays private on your machine while dramatically improving context retention and personalized assistance.3-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to store and retrieve memories with semantic search capabilities using vector embeddings. Provides persistent memory storage with SQLite backend for context retention across conversations.50 npm1MIT
- AlicenseAqualityBmaintenanceProvides persistent cross-session memory and full-text search for AI coding assistants, storing project context, decisions, and preferences while enabling searchable access to conversation history via local SQLite.81MIT
- AlicenseNot gradedqualityCmaintenanceGives AI coding agents persistent memory by storing observations, decisions, and learnings in a local SQLite database with vector search, full-text search, and a rules engine.4MIT