Generated banner for memanto
Generated logo for memanto

memanto

Agent plugin

First committed by het0814

Published in moorcheh-ai/memanto. Publisher page

2,363 GitHub stars

What it is

Memory that AI Agents Love!
— the description by het0814

AutoGineer overview, from the brain’s own files

Memanto acts as a chief of staff for your AI agents, moving beyond simple storage to actively manage the lifecycle of agentic knowledge. Unlike passive vector stores, Memanto observes interaction streams to extract durable facts, decisions, and preferences. It handles the complex tasks of consolidating duplicate information, resolving contradictions between agents, and enforcing retention policies to prevent memory bloat. By providing a unified, portable estate that works across different frameworks and vendors, Memanto ensures that your agents remain consistent and informed without requiring manual intervention or complex application-level logic.

How it works

Memory model: Vector store

AutoGineer overview, from the brain’s own files

Memanto runs as a companion agent alongside your existing AI fleet. It uses a vector-store-based memory model to store knowledge, which it organizes into namespaces for different agents. It observes agent traffic to extract and categorize information, merges duplicates, and reconciles conflicting data points. Users can define retention policies in YAML files to automate the expiration of stale memories. The system provides a CLI for manual interaction, a REST API for integration, and supports exporting the entire memory estate into the Open Knowledge Format (OKF) for portability.

Folders
FolderRoleFiles
.githubagent-config7
assetsattachments11
docsdocs10
examplesexamples640
scriptsscripts1
teststests62
i18nfolder3
integrationsfolder105
memantofolder103
sdksfolder41

Requirements

Runtimes: Python >=3.10,<4

API keys (by name): MOORCHEH_API_KEY

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 4 hooks (claude-code), 3 scripts. Review examples/claudecode-skills-memanto/lifecycle-hooks/install.py, integrations/hermes-agents/hermes_memanto/install.py, memanto/cli/connect/assets/hooks/hooks.json, pyproject.toml before opening the folder in Claude Code. No step below turns a hook on for you.

    • examples/claudecode-skills-memanto/lifecycle-hooks/install.py: python examples/claudecode-skills-memanto/lifecycle-hooks/install.py
    • integrations/hermes-agents/hermes_memanto/install.py: python integrations/hermes-agents/hermes_memanto/install.py
    • memanto/cli/connect/assets/hooks/hooks.json: ${SYS_EXECUTABLE}
    • memanto/cli/connect/assets/hooks/hooks.json: ${SYS_EXECUTABLE}
    • memanto/cli/connect/assets/hooks/hooks.json: ${SYS_EXECUTABLE}
    • memanto/cli/connect/assets/hooks/hooks.json: ${SYS_EXECUTABLE}
    • pyproject.toml: hatch build hook vcs (hatch_build.py)
  2. Not scanned by AutoGineerIts dependencies are installed by pip or uv when you run it and were not scanned by AutoGineer (14 declared). https://pypi.org/project/memanto/
  3. First committed by het0814. Published in moorcheh-ai/memanto. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Automating memory curation across multiple agent frameworks
  • Resolving conflicting information between different agents
  • Enforcing data retention and expiration policies
  • Exporting agent memory to portable Markdown files
  • Bootstrapping agents with relevant context before they act
“memanto remember "Auth migrated to JWT — session cookies deprecated" --type decision”
The agent captures this decision as a durable memory, making it available for other agents in the fleet to recall later.
“memanto recall "how does auth work"”
The agent retrieves the relevant, consolidated knowledge about the authentication system, grounded in previous decisions.
“memanto policy apply-preset balanced”
Applies a predefined retention policy to automatically manage memory expiration and keep the knowledge base sharp.
“memanto memory export --okf”
Generates a portable, human-readable Markdown bundle of the entire memory estate for backup or migration.

Documentation by het0814

<p align="center"> <a href="https://www.memanto.ai/"> <img alt="Memanto" src="https://github.com/moorcheh-ai/memanto/raw/main/assets/memanto-logo.svg" width="440"> </a> </p>

<p align="center"> Memanto is a <strong>Memory Agent</strong>; a companion agent that manages the memories of your other agents:<br> what to keep, what conflicts, what expires, and who needs to know. </p>

<p align="center"> <a href="https://github.com/moorcheh-ai/memanto"><img alt="GitHub stars" src="https://img.shields.io/github/stars/moorcheh-ai/memanto?style=social"></a> <a href="https://pepy.tech/projects/memanto"><img alt="Downloads" src="https://static.pepy.tech/personalized-badge/memanto?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads"></a> <a href="https://arxiv.org/abs/2604.22085"><img alt="arXiv" src="https://img.shields.io/badge/arXiv-2604.22085-b31b1b.svg"></a> <a href="https://pypi.org/project/memanto/"><img alt="PyPI" src="https://img.shields.io/pypi/v/memanto.svg?color=%2334D058"></a> <a href="https://mcptoplist.com/server/io.github.moorcheh-ai%2Fmemanto"><img alt="MCP Toplist" src="https://mcptoplist.com/badge/io.github.moorcheh-ai%2Fmemanto.svg"></a> <a href="https://opensource.org/licenses/MIT"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-yellow.svg"></a> </p>

<p align="center"> <sub><a href="README.md">English</a> · <a href="i18n/README_es.md">Español</a> · <a href="i18n/README_zh-CN.md">简体中文</a> · <a href="i18n/README_ja.md">日本語</a></sub> </p>

pip install memanto
npm install @moorcheh-ai/memanto
go get github.com/moorcheh-ai/memanto/sdks/go

<!-- ============================================================ DEMO GIF — highest-impact missing asset. assets/demo.gif VHS tape provided separately. Under 15s, under 3MB. ============================================================ -->

<!-- <p align="center"> <img alt="Memanto in 15 seconds" src="https://github.com/moorcheh-ai/memanto/raw/main/assets/demo.gif" width="900"> </p> -->


Every platform will store your agents' memory. None of them will manage it. Managing it across platforms is against their interest. That is the job of a Memory Agent.

Persistence is solved. Claude, Bedrock, Cursor, and every vector store will happily keep what your agents write. None of them will tell you that two of your agents now believe opposite things about your auth service, that a preference from March has quietly outranked a decision from last week, or that the agent you spun up this morning is about to redo work another one finished and reverted.

Storage is a filing cabinet. Memanto is the chief of staff; it decides what goes in, watches the access, resolves what contradicts, discards what's stale, and briefs each agent before it acts.


It's an agent, not an API

Memanto isn't a library you call. It's a second agent that runs beside your fleet and does six things on its own judgment. Each one is a real behavior with a command behind it, nothing here is a roadmap item.

What Memanto doesRun it
Observes & extractsWatches the interaction streams of the agents it serves and pulls durable knowledge out of ephemeral traffic — decisions, preferences, facts, failures — instead of archiving transcripts wholesale.memanto remember --from-conversation
ConsolidatesMerges extracted memories into one canonical estate. Duplicates collapse, fragments join, repeated observations strengthen confidence instead of multiplying rows.memanto schedule enable
ReconcilesWhen new knowledge contradicts old, Memanto supersedes rather than appends — preserving what was believed and when. "What's true now" and "what did we believe then" stay different questions.memanto conflicts
ForgetsDecay, expiry, and deliberate deletion are policies it executes, not cleanup you remember to do. An estate that only grows becomes noise; managed forgetting is what keeps recall sharp at month twelve.memanto forget
BriefsBefore an agent acts, Memanto hands it the minimal relevant slice of the estate. Your agents don't query anything — they get briefed by a colleague.memanto agent bootstrap
Moves knowledgeThrough the Open Knowledge Format, the estate crosses frameworks and vendors — so a fleet spanning Claude Code, Cursor, and your own stack shares one memory instead of five silos.memanto memory export --okf

And it does this while you're asleep. memanto schedule enable and the loop runs daily: new memories curated, duplicates merged across agents, contradictions flagged for your review. You come back to a fleet that knows more than it did yesterday, without having sorted anything yourself.


60 seconds to a managed fleet

pip install memanto
memanto                            # "On-Prem" (Docker, no account) or "Cloud" (free key)
memanto connect claude-code        # also: cursor, codex, windsurf, cline, goose, copilot…

Your agents now share one managed estate. No code changes, no wrapper, no rewrite of your agent loop.

# backend-agent learns something on Monday
memanto remember "Auth migrated to JWT — session cookies deprecated" --type decision

# review-agent, which never saw that session, knows it on Friday
memanto recall "how does auth work"
memanto answer  "why did we drop session cookies?"     # grounded, no extra API key

# what did the fleet believe last Tuesday? what changed since the release?
memanto recall "deployment policy" --as-of 2026-08-05
memanto recall "deployment policy" --changed-since v2.1

macOS, Linux, Windows. memanto ui opens a local dashboard over the whole estate — browse it, search it, audit it.


Own your agentic memory

This is the part that matters in two years, and it's the part every platform-native memory feature is designed to prevent.

Your estate is a file. memanto memory export --okf gives you the Open Knowledge Format — plain Markdown, readable, diffable, committable, greppable. Not a proprietary dump you can technically request. The actual working format.

It moves. memanto migrate imports from Mem0, Letta, Supermemory, Zep, Hindsight, or any OKF bundle. The same command works in reverse. OKF is an open interchange format any framework or vendor can implement — including ours' competitors, deliberately.

It runs on your machine. Local Docker + Ollama, no account, no API key, nothing leaves your infrastructure. Or free cloud, or your own hosting. memanto config backend switches between them in one command, and the estate comes with you.

MIT. No open-core tier waiting to gate the useful half. No feature flags, no seat limits, no rug pull.

There is no lock-in because there is nothing to lock.


Security & sovereignty

<!-- ============================================================ TODO — Majid: fill from your hardening work. Structure is right; the specifics are yours. Items marked ⟨…⟩ need input. Anything you can't substantiate today, delete rather than soften. ============================================================ -->

Nothing leaves your machine in on-prem mode. Docker + Ollama, no account, no outbound calls. The full loop — extraction, consolidation, reconciliation, briefing — runs locally.

Scoped by default. Each agent gets its own namespace. Your production-ops agent doesn't read your scratch experiments; you provision exactly what each one should know and nothing more.

Every belief is traceable. Confidence score, source, provenance, and timestamp. When an agent acts on something, you can walk back to where that belief entered the fleet and when — which is the difference between an auditable estate and a black box.

Forgetting is a decision you make, not a side effect. A memory is active or expired — nothing else. It becomes expired only because a policy you wrote says so, and it carries the date and the rule name that did it. Expired memories still recall, clearly labelled, and memanto memory restore puts one back. Deleting is a separate, explicit act.


Memory that expires on your terms

Every memory is active until a policy retires it. Expiry is stamped, auditable, and reversible — the content survives, and the memory keeps showing up in recall marked [EXPIRED] with the reason it aged out.

memanto policy list-preset          # conservative / balanced / aggressive
memanto policy apply-preset balanced  # shows it in full, then asks
memanto policy apply --dry-run      # exactly what would expire, per rule
memanto policy apply                # shows the policy + matches, then confirms

Policies live in ~/.memanto/policies/<agent>.yaml and have two halves — a per-type retention table for broad strokes, and named rules for everything sharper. The first matching rule wins, so a rule can also pin a memory that the table would otherwise expire:

retention:
  context: 7d
  event: 30d
  preference: never          # durable user truths don't age out
rules:
  - name: pinned
    match: {tags: [pinned]}
    expire_after: never      # an explicit pin beats the table
  - name: low-confidence-guesses
    match: {provenance: [inferred], confidence_below: 0.5}
    expire_after: 14d
purge_expired_after: never   # optional hard delete, off by default

Recall shows both states side by side; narrow with --active or --expired. Point-in-time recall is unaffected — --as-of still reconstructs what was true then, including memories that have expired since.

memanto memory expire mem-123       # retire one by hand
memanto memory restore mem-123      # and put it back

The nightly job (memanto schedule enable) runs the sweep for you. An agent with no policy set never expires anything.


Unlike memory storage

Memory storageMemanto
What it isA database with an SDK — write, embed, retrieveAn agent with judgment over your fleet's memory
Core behaviorPersistCurate, reconcile, consolidate, forget, brief
Who decides what's keptYou, in application codeMemanto, on policy you set once
When two agents disagreeLast write wins, silentlyBoth versioned, surfaced for review
ForgettingA DELETE you remember to runA first-class policy that runs on schedule
ScopeOne app, one stack, one vendor's wallsA fleet, across stacks and vendors
Your dataExportable in theoryThe working format is portable Markdown

Storage substrates sit beneath Memanto — vector stores, filesystems, and platform-native memory features are all backends it manages. Their commoditization is good for you: it makes the substrate free and leaves the management to something that's actually good at it.


<p align="center"> <strong>⭐ Star the repo if Memanto is managing your fleet's memory</strong><br> <sub>It's the signal that tells us to keep building this in the open, under MIT, with nothing held back.</sub> </p>


Developer experience

One pip install. No vector store to provision, no embedding pipeline, no reranker, no schema migration, no backend to babysit. The retrieval engine ships in the box.

Works with what you already run. memanto connect claude-code — same for Cursor, Codex, Windsurf, Cline, Continue, Goose, Copilot, and more. One command each.

Searchable the moment it's written. No extraction pass at write time, no graph to rebuild, no indexing queue. remember returns and every agent in the fleet can already recall it.

Typed, not soup. 13 memory categories — instruction, fact, decision, goal, preference, relationship, and more — so recall is filterable instead of one undifferentiated blob.

A dashboard, not a log file. memanto ui for the whole estate. memanto daily-summary for a readable digest of what changed across your agents. memanto status for registered agents, sessions, and health.


<details> <summary><strong>Full CLI reference</strong></summary>

<br>

CapabilityCommandsWhat it does
System statusmemanto statusEnvironment, configuration, server health, active session, registered agents.
Local REST API + web UImemanto serve, memanto uiRun the REST API locally and open an interactive browser UI.
Agent lifecyclememanto agent ...Create/list/delete agents, activate sessions, run agent bootstrap.
Memory capture at scalememanto rememberSingle memories, batch JSON, or --from-conversation to extract from chat logs.
Editing & deletionmemanto edit, memanto forgetUpdate fields on a memory, or permanently delete a bad one.
File ingestionmemanto uploadBring .pdf, .docx, .xlsx, .json, .txt, .csv, .md into an agent's namespace.
Advanced recallmemanto recallStandard search plus temporal queries (--as-of, --changed-since) with filters.
Grounded answersmemanto answerGenerate answers from retrieved memory context.
Daily intelligencememanto daily-summary, memanto conflictsSummaries, contradiction detection, interactive resolution.
Sessions & automationmemanto session ..., memanto schedule ...Inspect sessions, enable scheduled daily runs.
Estate export & syncmemanto memory export, memanto memory syncExport structured Markdown, sync MEMORY.md into projects. --okf for a portable OKF bundle.
Import & migrationmemanto migrateImport from Mem0, Letta, Supermemory, Zep, Hindsight, or an OKF bundle.
Configurationmemanto config showAPI key status, active agent/session, server settings, schedule time.
Fleet integrationmemanto connect ...Claude Code, Codex, Cursor, Windsurf, Antigravity, Gemini CLI, Cline, Continue, OpenCode, Goose, Roo, GitHub Copilot, Augment.

Memory types: instruction, fact, decision, goal, commitment, preference, relationship, context, event, learning, observation, artifact, error

memanto remember "User prefers concise answers" --type preference
memanto recall "user communication style" --type preference

Complete reference: CLI User Guide

</details>

<details> <summary><strong>Install options — fully local vs. free cloud</strong></summary>

<br>

Fully local. No account, no API key, nothing leaves your machine:

pip install memanto
memanto           # choose "On-Prem" — guides through Docker + Ollama setup

Requires Docker.

Free cloud. No card, ~60 seconds:

pip install memanto
memanto           # choose "Cloud" — paste your free API key

Free key at console.moorcheh.ai/api-keys — 100K free operations.

Switch any time: memanto config backend

</details>

<details> <summary><strong>Architecture</strong></summary>

<br>

Recall is powered by an information-theoretic semantic engine that ships in the box — as a local Docker container or as a free cloud service. The memanto CLI manages either for you. Storage substrates beneath it are pluggable; Memanto is the agent above them.

<p align="center"> <img alt="Architecture" src="https://github.com/moorcheh-ai/memanto/raw/main/assets/Architecture-diagram.png" width="900"> </p>

On-prem:

<p align="center"> <img alt="On-prem architecture" src="https://github.com/moorcheh-ai/memanto/raw/main/assets/On-prem-architecture-diagram.png" width="900"> </p>

</details>

<details> <summary><strong>SDKs & REST API</strong></summary>

<br>

Python — the memanto package ships an in-process client; no server to start:

from memanto import Memanto

memanto = Memanto(agent_id="my-agent")   # creates the agent on first use
memanto.remember("Alex prefers oat milk.", type="preference")
memanto.recall("what does Alex drink?")
memanto.answer("Does Alex drink dairy?")

Reference: docs.memanto.ai/sdk/python.

TypeScript / Node.js — @moorcheh-ai/memanto boots a local Memanto server via uvx and exposes an ergonomic client (remember / recall / answer).

Go — github.com/moorcheh-ai/memanto/sdks/go connects to a running Memanto server or starts one via uvx.

REST API — start with memanto serve. Endpoint reference at docs.memanto.ai/api and http://localhost:8000/docs while running.

</details>


Watch it work


Research

Memanto: Typed Semantic Memory with Information-Theoretic Retrieval for Long-Horizon Agents

On public recall benchmarks we report 89.8% on LongMemEval and 87.1% on LoCoMo. <!-- TODO: state reader model, judge model, and subset here — you should be the one in this space whose conditions are legible. --> Datasets and harness are open at huggingface.co/moorcheh — run them yourself.

A caveat we'd rather say out loud: cross-project scores on these benchmarks are not comparable. Reader model, judge model, judge prompt, and retrieval budget each move results by several points, and no two published runs share a configuration. Treat every number in this category — including ours — as directional. What a Memory Agent should eventually be measured on isn't recall at all, but estate quality over time: contradiction rate, staleness, and precision at month six.

@misc{abtahi2026memantotypedsemanticmemory,
      title={Memanto: Typed Semantic Memory with Information-Theoretic Retrieval for Long-Horizon Agents},
      author={Seyed Moein Abtahi and Rasa Rahnema and Hetkumar Patel and Neel Patel and Majid Fekri and Tara Khani},
      year={2026},
      eprint={2604.22085},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2604.22085},
}

Community

<p align="center"> <a href="https://memanto.ai/discord"><img src="https://img.shields.io/badge/Join-Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a> <a href="https://www.reddit.com/r/Memanto/"><img src="https://img.shields.io/badge/Join-Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white" alt="Reddit"></a> <a href="https://docs.memanto.ai"><img src="https://img.shields.io/badge/Docs-memanto.ai-000000?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Docs"></a> </p>

<p align="center"> <a href="https://trendshift.io/repositories/27378"><img src="https://trendshift.io/api/badge/repositories/27378" alt="Trendshift" width="220"></a> <!-- <a href="https://mcptoplist.com/server/glama%2Fmoorcheh-ai%2Fmemanto"><img src="https://mcptoplist.com/badge/glama%2Fmoorcheh-ai%2Fmemanto.svg" alt="MCP Top List" width="220"></a> --> <a href="https://deepwiki.com/moorcheh-ai/memanto"><img alt="DeepWiki" src="https://deepwiki.com/badge.svg"></a> </p>

Questions: [e-mail address on the upstream page](mailto:e-mail address on the upstream page) · @moorcheh_ai


<p align="center"> <strong>MIT License</strong> </p>

docs/CLI_USER_GUIDE.md

MEMANTO CLI User Guide

Status: Production Ready Last Updated: December 2025


Table of Contents

  1. Introduction

  2. Installation

  3. Quick Start

  4. Command Reference

  5. Workflows

  6. Configuration

  7. Troubleshooting

  8. Examples


Introduction

MEMANTO CLI provides a command-line interface for interacting with MEMANTO (Memory that AI Agents Love!). It enables you to:

  • Create and manage AI agents

  • Store and retrieve agent memories

  • Upload documents and files into an agent's memory namespace

  • Perform semantic search across memories

  • Ask questions using RAG (Retrieval-Augmented Generation)

  • Manage agent sessions

The CLI uses the MEMANTO API with session-based authentication and provides a beautiful terminal UI powered by Rich.


Installation

Prerequisites
  • Python 3.10 or higher

  • MEMANTO REST API server (optional, only if using HTTP endpoints)

  • Moorcheh API key (required for cloud connectivity)

Install Dependencies
cd memanto
pip install -e .

This installs:

  • typer (CLI framework)

  • rich (terminal UI)

  • httpx (HTTP client)

  • cryptography (secure key storage)

  • pyyaml (configuration)

  • All other MEMANTO dependencies

Verify Installation
python -m cli.main --help

You should see the main help screen with all available commands.


Quick Start

1. Initialize the CLI
memanto

This will:

  • Prompt for your Moorcheh API key

  • Securely encrypt and store the key

  • Test connection to the MEMANTO server

  • Create configuration file at ~/.memanto/config.yaml

Interactive Example:

╭──────────────────────────────────────────╮
│ MEMANTO CLI Initialization                 │
│ Setting up your MEMANTO configuration...   │
╰──────────────────────────────────────────╯

Enter your Moorcheh API key: ********

Testing connection to MEMANTO server...
✓ Connection successful!
Server version: 0.1.0

Configuration saved to: /home/user/.memanto/config.yaml

Next steps:
  1. Create and activate an agent: memanto agent create my-agent
  2. Start storing memories: memanto remember 'your memory here'
2. Create and Activate an Agent
memanto agent create my-agent --pattern tool

This creates the agent and starts a session immediately (default: 6 hours). You don't need to run agent activate manually after creation.

3. Store a Memory
memanto remember "Implemented authentication using JWT tokens" \
  --type decision \
  --tags "authentication,security" \
  --confidence 0.9
4. Search Memories
memanto recall "authentication" --limit 5
5. Ask a Question
memanto answer "How did we implement authentication?"

Command Reference

Global Commands
Use base command for Initialization
memanto [OPTIONS]

Options:

  • --version - Show installed MEMANTO version and exit

Example:

memanto

Agent Commands
agent create - Create and Activate New Agent
memanto agent create AGENT_ID [OPTIONS]

Arguments:

  • AGENT_ID - Unique identifier for the agent

Options:

  • --pattern TEXT - Agent pattern: project, support, or tool (default: tool)

  • --description TEXT - Optional description

Behavior:

  1. Creates the agent namespace in Moorcheh.

  2. Automatically activates a session for the new agent (default: 6 hours).

  3. Saves the session token to your local configuration.

Examples:

# Create and activate a tool-using agent
python -m cli.main agent create code-assistant --pattern tool

# Create and activate a support agent with description
memanto agent create researcher \
  --pattern support \
  --description "Agent for customer support and ticket triage"
agent list - List All Agents
memanto agent list

Output:

┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Agent ID        ┃ Pattern ┃ Description             ┃ Status   ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ code-assistant  │ tool    │ Code assistant          │ 🟢 Active│
│ researcher      │ support │ Support assistant       │          │
└─────────────────┴─────────┴────────────────────────┴──────────┘
agent activate - Activate Agent
memanto agent activate AGENT_ID [OPTIONS]

Arguments:

  • AGENT_ID - ID of agent to activate

Options:

  • --duration-hours INT - Session duration in hours (default: 6)

Examples:

# Activate with default 6-hour session
python -m cli.main agent activate code-assistant

# Activate with 8-hour session
memanto agent activate code-assistant --duration-hours 8
agent deactivate - Deactivate Current Agent
memanto agent deactivate

Clears the active session pointer in local CLI configuration.

Note: This local CLI action and API session termination are different layers. To explicitly end a server-side API session, call POST /api/v2/agents/{agent_id}/deactivate.

agent delete - Delete Agent
memanto agent delete AGENT_ID [OPTIONS]

Arguments:

  • AGENT_ID - ID of the agent to delete

Options:

  • --force, -f - Skip confirmation prompt (default: false)

  • --delete-memories / --keep-memories - Purge or keep the cloud memories without being asked

Behavior:

  1. Shows a red confirmation warning (skipped with --force)

  2. Asks whether to keep cloud memories — free storage accessible at console.moorcheh.ai/namespaces (skipped with --delete-memories / --keep-memories)

  3. If the agent has an active session, it is cleared automatically

  4. If cloud purge was chosen, deletes the Moorcheh namespace first; if that fails, the agent is left intact so the command can be rerun

  5. Deletes the local agent metadata with a loading spinner

Note: Choosing to keep cloud memories means your agent's memories remain safely stored in Moorcheh and can be accessed or re-linked at any time.

Examples:

# Delete with interactive prompts
memanto agent delete my-agent

# Force delete, skip confirmation (still asks about cloud memories)
memanto agent delete my-agent --force

# Fully non-interactive, purging cloud memories too
memanto agent delete my-agent --force --delete-memories

Memory Commands
remember - Store Memory
memanto remember CONTENT [OPTIONS]

Arguments:

  • CONTENT - Memory content to store

Options:

  • --type, -t TEXT - Memory type: fact, decision, instruction, commitment, event (default: fact)

  • --title TEXT - Memory title (defaults to truncated content)

  • --confidence, -c FLOAT - Confidence score 0.0-1.0 (default: 0.8)

  • --tags TEXT - Comma-separated tags

  • --source, -s TEXT - Who wrote the memory / calling AI tool slug (e.g. cursor, copilot, claude-code, user)

Examples:

# Store a simple fact
python -m cli.main remember "User prefers dark mode"

# Store a decision with metadata
python -m cli.main remember "Switched to PostgreSQL for better JSON support" \
  --type decision \
  --title "Database Migration Decision" \
  --confidence 0.95 \
  --tags "database,architecture,postgresql"

# Store a commitment
python -m cli.main remember "Must complete security audit by end of month" \
  --type commitment \
  --tags "security,deadline"

Output:

✓ Memory stored successfully!
Memory ID: mem_abc123xyz
Type: decision | Confidence: 0.95
upload - Upload a File to Memory
memanto upload FILE_PATH

Arguments:

  • FILE_PATH - Path to the file to upload

Supported formats: .pdf, .docx, .xlsx, .json, .txt, .csv, .md

The file is processed by Moorcheh — its content is chunked and embedded, making it instantly searchable via memanto recall. When you recall memories, file-sourced results are labelled · file upload · summary or · file upload · chunk in the panel title so you can distinguish them from manually stored memories.

Examples:

# Upload a PDF document
memanto upload report.pdf

# Upload a markdown file
memanto upload SECURITY.md

Output:

OK File uploaded successfully!
File: SECURITY.md
Size: 0.01 MB
Namespace: agent:my-agent
Completed in 3.21s

recall - Search Memories
memanto recall QUERY [OPTIONS]

Arguments:

  • QUERY - Search query (semantic search)

Options:

  • --limit, -n INT - Maximum results (default: recall_limit from config, factory default 10)

  • --type, -t TEXT - Filter by memory type

  • --min-confidence FLOAT - Minimum confidence score

  • --tags TEXT - Filter by tags (comma-separated)

  • --source, -s TEXT - Slug of the AI tool making this call (e.g. cursor, copilot, claude-code)

Examples:

# Basic search
python -m cli.main recall "authentication"

# Search with filters
python -m cli.main recall "security" \
  --type decision \
  --min-confidence 0.8 \
  --limit 5

# Search by tags
python -m cli.main recall "architecture" \
  --tags "database,backend" \
  --limit 20

Output:

Found 3 memories:

╭─ Memory 1 ──────────────────────────────────────────╮
│ Database Migration Decision                         │
│                                                      │
│ Switched to PostgreSQL for better JSON support      │
│ and advanced indexing capabilities...               │
│                                                      │
│ Type: decision | Confidence: 0.95 | Score: 0.927    │
│ Created: 2025-12-27T14:30:00Z                       │
╰─────────────────────────────────────────────────────╯

╭─ Memory 2 ──────────────────────────────────────────╮
│ ...                                                  │
╰─────────────────────────────────────────────────────╯
answer - RAG Question Answering
memanto answer QUESTION [OPTIONS]

Arguments:

  • QUESTION - Question to ask

Options:

  • --limit, -n INT - Number of context memories to use (default: answer_limit from config, factory default 5)

  • --source, -s TEXT - Slug of the AI tool making this call (e.g. cursor, copilot, claude-code)

Examples:

# Ask about project decisions
memanto answer "Why did we choose PostgreSQL?"

# Ask with more context
memanto answer "What security measures have we implemented?" --limit 10

Output:

╭─ RAG Response ──────────────────────────────────────╮
│ Question: Why did we choose PostgreSQL?             │
│                                                      │
│ Answer:                                              │
│ We chose PostgreSQL because it provides better      │
│ JSON support and advanced indexing capabilities     │
│ compared to our previous database solution...       │
╰─────────────────────────────────────────────────────╯

Used 3 memories as context:
  1. Database Migration Decision (score: 0.927)
  2. Backend Architecture Review (score: 0.854)
  3. Performance Optimization Notes (score: 0.781)

Memory Lifecycle Commands

Every memory is active or expired. Expiring is reversible and preserves the content; deleting (memanto forget) is permanent.

memory expire - Retire a Memory
memanto memory expire mem-123
memanto memory expire mem-123 --reason superseded-by-rewrite

The memory stays recallable, labelled [EXPIRED], and records when it expired and why. --reason is stamped as expired_by (default manual).

memory restore - Reactivate a Memory
memanto memory restore mem-123

Clears the expiry stamp and returns the memory to active.

Filtering recall by state

By default recall returns active and expired memories together, each labelled.

memanto recall "deploy process"            # both, labelled
memanto recall "deploy process" --active   # active only
memanto recall "deploy process" --expired  # expired only

--as-of is unaffected by these flags: point-in-time recall always reconstructs what was active at that date, including memories that have expired since.


Policy Commands

Policies decide what expires. Nothing expires until a sweep runs — either memanto policy apply or the nightly memanto schedule job.

policy list-preset / policy apply-preset - Start From a Bundle
memanto policy list-preset        # list conservative / balanced / aggressive
memanto policy apply-preset balanced   # shows the preset in full, then asks
policy show - Inspect the Current Policy
memanto policy show
memanto policy show --agent my-agent
policy apply - Run the Sweep
memanto policy apply --dry-run    # what would expire, then stop
memanto policy apply              # same preview, then asks to confirm
memanto policy apply --yes        # skip the confirmation

apply always shows the policy in force and every matching memory before asking, so --dry-run is only needed when you want to stop at the preview.

policy purge - Hard Delete Long-Expired Memories
memanto policy purge --dry-run
memanto policy purge

Destructive and irreversible. Disabled unless the policy sets purge_expired_after.

Policy file format

Stored at ~/.memanto/policies/<agent-id>.yaml:

version: 1
retention:                 # broad strokes, per memory type
  context: 7d
  event: 30d
  preference: never
rules:                     # sharper; first match wins over the table
  - name: pinned
    match: {tags: [pinned]}
    expire_after: never    # pins a memory the table would expire
  - name: low-confidence-imports
    match:
      provenance: [imported]
      confidence_below: 0.5
    expire_after: 7d
purge_expired_after: never

Durations are 30m, 12h, 7d, 2w, 3mo, 1y, or never (a month is 30 days). In the Web UI's Expiry Policy page the purge window is a number plus a unit — Days (1–365), Months (1–12), Years (1–10), or Never. A value set here or by CLI that the pair can't express (12h, say) is shown as-is and left untouched until you pick a different unit. Match conditions (type, tags, source, provenance, confidence_below) are ANDed; an empty match matches everything. Age is measured from updated_at, falling back to created_at — editing a memory resets its expiry clock.


Session Commands
session info - Show Session Info
memanto session info

Output:

┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Property       ┃ Value                          ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Agent ID       │ code-assistant                 │
│ Session Token  │ eyJhbGciOiJIUzI1NiI...         │
└────────────────┴────────────────────────────────┘
Configuration Commands
config show - Display Configuration
memanto config show

Output:

┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Setting          ┃ Value                        ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Config File      │ /home/user/.memanto/config.yaml│
│ Server URL       │ localhost:8000               │
│ API Key          │ ***configured***             │
│ Active Agent     │ code-assistant               │
│ Session Active   │ yes                          │
│ Interactive Mode │ True                         │
│ Smart Parse      │ True                         │
└──────────────────┴──────────────────────────────┘

Workflows

Daily Development Workflow
# Morning: Activate your agent
memanto agent activate dev-assistant

# Throughout the day: Store important decisions and facts
memanto remember "Fixed authentication bug in login endpoint" \
  --type decision \
  --tags "bugfix,authentication"

memanto remember "User requested dark mode feature" \
  --type instruction \
  --tags "feature-request,ui"

# Review day's work
memanto recall "today" --limit 20

# End of day: Deactivate
memanto agent deactivate
Project Knowledge Base
# Store architecture decisions
memanto remember "Using microservices architecture with API gateway" \
  --type decision \
  --title "Architecture Pattern" \
  --tags "architecture,microservices" \
  --confidence 1.0

# Store team guidelines
memanto remember "All PRs require 2 approvals before merge" \
  --type instruction \
  --tags "process,code-review"

# Query the knowledge base
memanto answer "What are our code review requirements?"
Research Assistant
# Create and auto-activate support agent
memanto agent create support-assistant --pattern support

# Store research findings
memanto remember "Paper XYZ shows 30% improvement in model accuracy" \
  --type fact \
  --tags "research,ml,paper-xyz" \
  --confidence 0.9

# Search research by topic
memanto recall "model accuracy improvements" --limit 10

# Synthesize findings
memanto answer "What papers discuss model accuracy improvements?"

Configuration

Configuration File Location
  • Linux/Mac: ~/.memanto/config.yaml

  • Windows: C:\Users\<username>\.memanto\config.yaml

Configuration Structure
version: "2.0"

server:
  url: "localhost"
  port: 8000
  auto_start: false

moorcheh:
  api_key_encrypted: "gAAAAABf..."  # Fernet encrypted

session:
  default_duration_hours: 6
  auto_extend: true

cli:
  interactive_mode: true
  smart_parse: true
  color_output: true
  compact_view: false

# Answer configuration (all optional — defaults shown)
answer:
  model: "anthropic.claude-sonnet-4-6"  # LLM used for answer
  temperature: 0.7        # LLM temperature (0.0–1.0)
  answer_limit: 5         # context memories passed to LLM for `answer`
  threshold: 0.15         # similarity floor applied only when kiosk_mode is true
  kiosk_mode: false       # set true to filter low-relevance results using threshold

# Recall configuration
recall:
  limit: 10               # top-N results returned by `recall`

active_agent_id: "code-assistant"
active_session_token: "eyJhbGciOiJIUzI1NiI..."
Security
  • API keys are encrypted using Fernet (symmetric encryption)

  • Encryption key stored in ~/.memanto/.key with 0600 permissions

  • Session tokens stored in config but require valid API key

  • Never commit config files to version control


Troubleshooting

"MEMANTO not configured" Error

Problem: Running commands before setup

Solution:

memanto
"No active agent" Error

Problem: Trying to use memory commands without active session

Solution:

# List available agents
memanto agent list

# Activate one
memanto agent activate <agent-id>
Connection Failed

Problem: Cannot reach Moorcheh/MEMANTO services.

Check:

  1. Network: Do you have internet access? (CLI talks directly to Moorcheh Cloud).

  2. API Key: Is your key valid?

    memanto config show
  3. Reconfigure:

    # Re-run setup and enter your new key when prompted
    memanto
API Key Issues

Problem: Invalid or expired API key

Solution:

# Get new API key from Moorcheh dashboard
# Reconfigure by running setup again
memanto
Session Expired

Problem: Session token expired

Solution:

# Reactivate the agent
memanto agent activate <agent-id>

Examples

Complete Project Setup
# 1. Setup
memanto

# 2. Create and auto-activate project-specific agent
memanto agent create project-alpha --pattern tool \
  --description "Agent for Project Alpha development"

# 3. (Optional) Reactivate or change duration
memanto agent activate project-alpha --duration-hours 8

# 4. Store initial context
memanto remember "Project uses Python 3.11, FastAPI, PostgreSQL" \
  --type fact \
  --title "Tech Stack" \
  --tags "project-setup,stack"

memanto remember "API versioning using /api/v2/ prefix" \
  --type decision \
  --tags "api,architecture"

# 5. Work session...
memanto remember "Implemented user authentication with JWT" \
  --type decision \
  --tags "auth,security"

# 6. Review progress
memanto recall "authentication security" --limit 5

# 7. Get context for next task
memanto answer "What have we implemented for security so far?"
Multi-Agent Workflow
# Development agent
memanto agent create dev --pattern tool
memanto agent activate dev
memanto remember "Implemented feature X" --type fact

# Switch to support agent (auto-activates)
memanto agent deactivate
memanto agent create support --pattern support
memanto remember "Found paper on optimization technique Y" --type fact

# Switch back
memanto agent deactivate
memanto agent activate dev
Bulk Knowledge Import
#!/bin/bash
# import-knowledge.sh

AGENT_ID="knowledge-base"

# Activate agent
memanto agent activate $AGENT_ID

# Import facts from file
while IFS='|' read -r title content tags; do
  memanto remember "$content" \
    --title "$title" \
    --type fact \
    --tags "$tags" \
    --confidence 1.0
done < knowledge.txt

echo "Import complete!"

Advanced Usage

Scripting with MEMANTO CLI
#!/usr/bin/env python3
import subprocess
import json

def memanto_cli(*args):
    """Helper to call MEMANTO CLI"""
    cmd = ["memanto"] + list(args)
    result = subprocess.run(cmd, capture_output=True, text=True)
    return result.stdout

# Store multiple memories
memories = [
    ("Decision A", "fact", "tag1,tag2"),
    ("Decision B", "decision", "tag2,tag3"),
]

for title, mem_type, tags in memories:
    memanto_cli("remember", title, "--type", mem_type, "--tags", tags)

# Search and process
results = memanto_cli("recall", "decision", "--limit", 10)
print(results)

Next Steps

  1. Integration: Use MEMANTO CLI in your development workflow

  2. Automation: Create scripts for common tasks

  3. Team Adoption: Share configuration patterns with team

  4. Monitoring: Track memory growth and query patterns

For more information:


Last Updated: December 2025

512 files · 493 not served here

Advantages

  • Provides active management of agent memory, including conflict resolution and automated forgetting, rather than just passive storage. evidence: README.md
  • Ensures memory portability through the Open Knowledge Format, preventing vendor lock-in. evidence: README.md
  • Supports local-first operation with Docker and Ollama, ensuring data sovereignty. evidence: README.md

Limitations

  • Requires Docker for the fully local on-premise deployment mode. evidence: README.md
  • Policy management requires creating and maintaining YAML configuration files for each agent. evidence: README.md

Security

Risk level: Low risk

This brain runs

Git hooks (3)

  • .pre-commit-config.yaml: uv run ruff check .
  • .pre-commit-config.yaml: uv run ruff format --check .
  • .pre-commit-config.yaml: uv run mypy .

Install scripts (2)

  • examples/claudecode-skills-memanto/lifecycle-hooks/install.py: python examples/claudecode-skills-memanto/lifecycle-hooks/install.py
  • integrations/hermes-agents/hermes_memanto/install.py: python integrations/hermes-agents/hermes_memanto/install.py

Agent instructions that run or fetch something (3)

  • examples/claudecode-skills-memanto/lifecycle-hooks/skills/memanto-companion/SKILL.md: Run:
  • examples/claudecode-skills-memanto/lifecycle-hooks/skills/memanto-companion/SKILL.md: If they ask "what do you remember about testing / TDD?" or want to preview what would be injected before a skill, run:
  • examples/claudecode-skills-memanto/lifecycle-hooks/skills/memanto-companion/SKILL.md: The hooks already inject context automatically — only run `recall` manually when the user explicitly wants to inspect or preview it.

Hooks (4)

  • memanto/cli/connect/assets/hooks/hooks.json (SessionStart): ${SYS_EXECUTABLE}
  • memanto/cli/connect/assets/hooks/hooks.json (PreCompact): ${SYS_EXECUTABLE}
  • memanto/cli/connect/assets/hooks/hooks.json (PostToolUse): ${SYS_EXECUTABLE}
  • memanto/cli/connect/assets/hooks/hooks.json (PostToolUse): ${SYS_EXECUTABLE}

Package scripts (1)

  • pyproject.toml (build-hook): hatch build hook vcs (hatch_build.py)
  • Low risk: scripts-present (examples/claudecode-skills-memanto/lifecycle-hooks/install.py)
  • Low risk: scripts-present (integrations/hermes-agents/hermes_memanto/install.py)

Attribution and licence

First committed by
GitHub avatar of het0814het0814
Declared authors
  • Majid Fekri (declared in pyproject.toml)
Publisher
Moorcheh.ai (Community)
Source
moorcheh-ai/memanto · commit 3ab4f67
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
het0814, Xenogents, kircoders, HARSHAVARDHAN-RAJU5, Adam13y

AutoGineer is not affiliated with or endorsed by het0814 or Moorcheh.ai.

Install from source

493 of its files are not served here, so there is no ZIP. moorcheh-ai/memanto at 3ab4f67