total-agent-memory
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| memory_recallA | Search ALL memory: decisions, solutions, facts, lessons from ALL past sessions. 6-stage pipeline: FTS5+BM25 → semantic → fuzzy → graph → (optional) CrossEncoder → (optional) MMR. Default: hybrid mode (BM25 + semantic + RRF). Use BEFORE starting any task. v11.0: routes to fast hot path when MEMORY_MODE=fast (default). Use memory_search_fast / memory_explain_search for explicit fast routing. |
| memory_timelineB | Browse session history. sessions_ago=N for 'N sessions ago', session_number=1 for first session, date_from/date_to for date ranges. |
| memory_index_passagesB | Build local passage indexes before evidence searches. Repeat using next_after_id until remaining=0. |
| memory_answerA | Generate and verify a cited answer using the configured reasoning LLM. Evidence carries recording dates; when records about the same subject disagree, the latest one gives the current value and the answer names the value it replaced. First runs negative retrieval: a contradiction-seeking second search; a score >= 0.60 hands both sides to the reader and answers with a caveat (MEMORY_CONTRADICTION_POLICY=abstain refuses instead), 0.30-0.60 answers with a caveat (see |
| memory_saveA | Save knowledge explicitly. Types: decision (MUST include WHY in context), solution, lesson, fact, convention. Saving the same words again (case and punctuation aside) replaces the stored record, so it carries the latest date; any other text, including a changed value, is stored as a new record. v10: a quality gate scores the record before save; below-threshold records are rejected with a |
| memory_updateA | Update existing knowledge. Replaces the record |
| memory_statsA | Memory statistics with health metrics: sessions, knowledge by type/project, retention zones (active/archived/consolidated), stale records, storage size, config. |
| memory_consolidateA | Find and merge duplicate/similar knowledge records. Keeps the longest version, supersedes shorter duplicates. Reduces noise in recall results. |
| memory_exportA | Export all knowledge as JSON for backup or migration. Includes knowledge, sessions, and relations. |
| memory_forgetA | Apply retention policy: archive stale records (>180d, never recalled, low confidence), purge very old archived records (>365d). Keeps memory clean. |
| memory_wiki_generateA | v10 — Render the per-project wiki digest (top decisions, active solutions, conventions, recent changes) as Markdown. Pass |
| memory_reportA | Activity report for a project (or all projects) over a period: today (period=day), this week (week, ISO Monday-Sunday), this month (month), all time (all) or custom since/until dates; offset=-1 gives the previous day/week/month ('last week'). Sections: summary numbers with deltas against the previous equal period, key decisions with their WHY, solutions and fixes, errors with recurring patterns and lessons, open next steps and pitfalls from session summaries, most touched files, entities/technologies, and a day-by-day timeline. Every item carries source IDs (#id -> memory_get). Built deterministically from stored records, no LLM; include_llm_summary=true adds an optional paragraph from the configured LLM. Periods use the local timezone (or tz). save=true writes the Markdown to /reports//-.md. Use it when the user asks what happened, for a status/progress report, a weekly summary or a retrospective. |
| memory_getA | Batched fetch by ID — complement to memory_recall(mode='index'). Returns full content for ONLY the IDs the caller chose after inspecting an index. Typical 3-layer flow: recall(mode='index') → pick IDs → memory_get(ids=[...]). |
| memory_historyB | View version history for a knowledge record. Shows the chain of superseded versions (newest → oldest), enabling time-travel through knowledge evolution. |
| memory_deleteA | Delete a knowledge record. By default a soft delete: the record leaves search results and vectors but stays in the database. hard=true erases it for good, with its earlier versions, derived rows and its text in the raw call log (use for personal data or anything that must not be kept). |
| memory_relateB | Create a typed relation between two knowledge records. Enriches graph expansion in Tier 4 search. Types: causal, solution, context, related, contradicts. |
| memory_search_by_tagA | Search knowledge by tag. Returns all active records with matching tag (partial match). Useful for categorical browsing. |
| memory_extract_sessionA | Get pending session transcripts for knowledge extraction. Previous sessions are auto-captured on exit. Use action='list' to see pending, 'get' to read transcript, then save knowledge via memory_save, then 'complete' to mark as processed. |
| self_error_logA | Log an error/failure for pattern analysis. Call AUTOMATICALLY when: bash command fails, wrong assumption discovered, API returns error, config issue found, loop detected, or any mistake occurs. System detects patterns (3+ same category) and suggests insights. |
| self_insightA | Manage insights from error patterns (ExpeL-style). Actions: add (create, importance=2), upvote (+1), downvote (-1, auto-archive at 0), edit, list, promote (to rule when importance>=5 AND confidence>=0.8). Call 'add' when pattern detected. Call 'upvote' when insight confirmed again. |
| self_rulesB | Manage behavioral rules (SOUL). Rules are promoted insights that shape agent behavior. Actions: list, fire (record relevance), rate (success=true/false), suspend, activate, retire, add_manual. Auto-suspend: success_rate < 0.2 after 10+ fires. |
| self_patternsA | Analyze error patterns and self-improvement stats. Views: error_patterns (frequency, repeating 3+), insight_candidates (ready for promotion), rule_effectiveness (success rates, stale rules), improvement_trend (weekly errors), full_report (all). Call periodically to track improvement. |
| self_reflectA | Save a verbal self-reflection (Reflexion pattern). Call after completing a task or encountering difficulty. NOT for errors (use self_error_log). For meta-observations about strategy, approach effectiveness, process improvements. |
| self_rules_contextA | Get active behavioral rules for current session. Call at SESSION START to load rules. Returns rules filtered by project and scope. v8.0: pass |
| rule_set_phaseA | Attach or remove a phase scope on a rule (v8.0 lazy rule loading). Tag-based: manages 'phase:' on the rule's tags. phase=null clears the phase tag (rule becomes core — applies to every phase). Valid phases: van, plan, creative, build, reflect, archive. |
| memory_observeA | Save a lightweight observation (auto-capture). No dedup, no ChromaDB — fast and cheap. Use for tracking file changes, tool usage, and session activity. Observations auto-cleanup after 30 days. |
| memory_associateA | Associative recall — brain-like spreading activation through knowledge graph. Finds memories through concept resonance, not keyword search. In 'composition' mode, finds minimum set of memories covering all needed concepts. |
| memory_graphB | Query the unified knowledge graph. Returns neighborhood of a node: connected rules, skills, memories, concepts, entities. |
| memory_conceptsC | List or search concepts in the knowledge graph. |
| memory_episode_saveA | Save an episode — narrative of WHAT HAPPENED and HOW. Not just facts, but the journey: what was tried, what failed, what worked. |
| memory_episode_recallB | Find past episodes (experiences). Search by concepts, outcome, project, or impact. |
| memory_skill_getC | Find skills matching a trigger. Skills are learned procedures — HOW to do things. |
| memory_skill_updateA | Record skill usage or refine a skill. Updates success rate and metrics. |
| memory_self_assessB | Self-assessment: how competent am I in given domains? Shows level, confidence, blind spots. |
| memory_context_buildC | Build optimal context for a query. Combines: spreading activation + knowledge graph + episodes + skills + self-model. The 'brain thinking' tool. |
| memory_reflect_nowB | Run reflection (the 'sleep' process). Consolidates knowledge, finds patterns, generates skill proposals, updates self-model. |
| memory_graph_indexA | Reindex CLAUDE.md rules and skills into the knowledge graph. Run after modifying CLAUDE.md or adding new skills. |
| memory_graph_statsA | Knowledge graph statistics: nodes, edges, communities, top concepts, health metrics. |
| kg_add_factB | Record a temporal fact assertion (subject, predicate, object). Supersedes any prior assertion with same (s,p) and different object — full history is preserved. Use for evolving architectural decisions. |
| kg_invalidate_factB | Close a currently-valid fact assertion. History is retained. |
| kg_atB | Point-in-time query: return fact assertions valid at |
| kg_timelineB | Full chronological history of assertions for a subject. |
| workflow_learnB | Record a learned workflow (named sequence of steps) for future reuse. |
| workflow_predictA | Predict outcome (success probability, avg duration) for a workflow by id OR by trigger keyword. Uses Laplace-smoothed success rate. |
| workflow_trackA | Record a workflow execution outcome. Outcome ∈ {success|failure|partial|aborted}. Aggregates update automatically. |
| file_contextA | BEFORE editing a file, call this to surface past errors, lessons, and related rules for that file path. Returns risk_score ∈ [0, 1]. |
| learn_errorC | Structured error capture: file, error, root_cause, fix, pattern. After N (default 3) errors share the same pattern, a prevention rule is auto-synthesized into the rules table. |
| session_initC | At session start: return the most recent unconsumed end-of-session summary with highlights / pitfalls / next_steps. |
| session_endA | End-of-session capture: summary + highlights + pitfalls + next_steps so the next session can resume cleanly. Set auto_compress=true to have the LLM generate the missing summary/next_steps/pitfalls from stored session artifacts (or from an optional |
| ingest_codebaseB | Parse a file or directory into semantic AST chunks (functions, classes, methods) across 8 languages. Returns chunk count + sample. |
| analogizeB | Find past solutions/lessons from OTHER projects whose feature set overlaps with the given problem text (Jaccard similarity). |
| benchmarkA | Run the eval harness: recall_at_k, prevention_rate, latency percentiles. Loads scenarios from evals/scenarios/*.json by default. |
| memory_save_fastA | v11.0: same as memory_save but routes through the fast hot path (skip_quality=True, no LLM, no async-blocking). Use when you want to bypass the v10 quality gate without flipping the env flag. |
| memory_search_fastA | v11.0: like memory_recall but with rerank=False, diverse=False forced. Deterministic fast path — zero LLM, FastEmbed-only. |
| memory_explain_searchA | v11.0: same as memory_search_fast but returns a per-tier breakdown (fts/semantic/graph/fuzzy/hyde with raw scores, the merged RRF list, rerank_applied flag, embedding_space). Use to debug why a record did or didn't surface for a query. |
| memory_warmupA | v11.0: pre-load FastEmbed model and open the vector store, so the first save/search after process start doesn't pay model-load latency. |
| memory_perf_reportA | v11.0: dump in-process telemetry counters (search_total_ms, embed_ms, fts_ms, vector_ms, llm_calls, network_calls) plus persistent embedding_cache stats. Use to verify the fast hot path stays clean. |
| memory_rebuild_ftsA | v11.0: drop and rebuild the SQLite FTS5 virtual table from |
| memory_rebuild_embeddingsA | v11.0: re-encode every record (or every record in a given embedding space) and update the binary + float32 vectors. Idempotent. Pass embedding_space='code' to refresh only code rows after switching the code embedder. Returns {rebuilt: int, skipped: int}. |
| memory_eval_locomoB | v11.0 Phase 8: run the LongMemEval-style recall+prevention scenario suite (loaded from evals/scenarios/) against the live store. Forces MEMORY_MODE=fast by default. Returns {scenarios_total, scenarios_passed, recall_at_5, recall_at_10, latency_ms, mode, llm_calls_during_eval, network_calls_during_eval}. |
| memory_eval_recallC | v11.0 Phase 8: generic recall benchmark on a dataset path or a small built-in fixture. Same payload shape as memory_eval_locomo. |
| memory_eval_temporalC | v11.0 Phase 8: temporal recall using temporal_kg + temporal_filter. Returns {status: 'not_implemented', ...} when modules are missing. |
| memory_eval_entity_consistencyC | v11.0 Phase 8: verifies entity_dedup canonicalization is stable across repeated saves of variant tag spellings. |
| memory_eval_contradictionsB | v11.0 Phase 8: runs contradiction_detector against a labelled fixture. Requires balanced/deep mode (LLM). Returns {status: 'not_implemented', ...} if module is unavailable. |
| memory_eval_long_contextC | v11.0 Phase 8: large-context recall scenario. Saves N records and queries them at the tail. Reuses eval_harness scenarios tagged 'long_context' if present. |
| classify_taskC | v8.0: classify task into L1-L4 complexity + suggested phases. |
| task_createC | v8.0: start a task in |
| phase_transitionC | v8.0: advance a task to the next phase. |
| task_phases_listB | v8.0: list all phases of a task in chronological order. |
| save_intentA | Persist one user prompt into the |
| list_intentsA | List recent user prompts from the intents table, newest first. Filter by project and/or session. Max 500 rows. |
| search_intentsA | Substring search over user prompts (LIKE). Returns newest match first. Useful for 'what did I ask about X' without mining transcripts. |
| save_decisionA | v8.0: save a structured architectural decision (options + criteria matrix + rationale + discarded). Adds |
| memory_recall_iterativeA | v11.0 W1-B: IRCoT-style iterative retrieval. Decomposes the query into sub-questions, retrieves per sub-question, and asks a planner LLM whether more retrieval is needed. Best for multi-hop questions. Returns unified evidence + provenance per iteration. |
| memory_temporal_queryB | v11.0 W1-C: deterministic temporal reasoning — Allen interval relations, duration arithmetic (days/weeks/months/years), and natural-language date normalization (en + ru). Pass op=relation|duration_between|normalize. |
| memory_entity_resolveB | v11.0 W1-F: resolve a mention to its canonical entity within a project+type. Cross-session coreference via name/alias index + embedding cosine. Returns canonical_id, matched_via, and is_new flag. Pronouns return -1. |
| memory_consolidate_statusA | v11.0 W2-G: report the consolidation daemon state — per-project last-run, active locks, recent activity. Use to verify the idle-project worker is making progress without interfering with active work. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 77 tools
Many retrieval tools overlap heavily (memory_recall, memory_search_fast, memory_associate, memory_recall_iterative, memory_context_build, memory_answer, memory_temporal_query) and save variants blur (memory_save vs memory_save_fast vs memory_observe vs memory_episode_save). Descriptions add nuance, but an agent can easily misselect among these clusters.
Nearly all names use snake_case and many carry domain prefixes (memory_, kg_, workflow_, self_), but conventions are mixed: prefix_noun (memory_save), verb_noun (save_intent, classify_task), and bare verb/noun (analogize, benchmark, file_context). Still readable, but not a predictable pattern throughout.
77 tools is far beyond a well-scoped memory server; many are eval, debug, perf, or internal admin utilities that could be consolidated. This creates severe surface bloat and high selection cost.
Core lifecycle is well covered: save/update/delete/recall/history/export/forget/consolidate plus graph, episodes, skills, rules, and sessions. Minor gaps exist (e.g., no explicit import counterpart to export, some tools are eval/admin rather than user-facing memory operations), but core workflows have no dead ends.