Skip to main content

Memory Operations

Store, retrieve, and maintain high-quality memories in Memanto.

Memory Fundamentals

What is a Memory?

A memory in Memanto includes:
  • Content: The core information.
  • Type: Semantic category (fact, preference, decision, etc.).
  • Title (optional): Short label for readability.
  • Confidence (optional): Reliability score from 0 to 1.
  • Metadata (optional): Extra structured context.

Memory Lifecycle

Store -> Index (instant) -> Recall -> Conflict detection -> Resolve

Core Operations

Use these commands for most workflows:
  • Store a memory: memanto remember "..." --type fact
  • Batch store: memanto remember --batch memories.json
  • Recall semantically: memanto recall "..."
  • Answer from context: memanto answer "..."
  • Delete a memory: memanto forget MEMORY_ID
  • Detect contradictions: memanto conflicts
  • Export memory history: memanto memory export

Uploading Files into Memory

When information already exists in documents, upload files instead of manually adding many individual memories.

Supported Formats

.pdf, .docx, .xlsx, .json, .txt, .csv, .md (up to 5 GB per file).

CLI

Activate an agent session, then upload:
memanto agent activate customer-support
memanto upload ./customer-profile.pdf
Recall uploaded knowledge with normal search:
memanto recall "What is the customer's annual revenue?"

REST API

import httpx

with open("customer-profile.pdf", "rb") as f:
    response = httpx.post(
        "http://localhost:8000/api/v2/agents/customer-support/upload-file",
        files={"file": ("customer-profile.pdf", f, "application/pdf")},
        headers={"X-Session-Token": session_token},
    )

result = response.json()
print(f"Status: {result['status']}, File: {result['file_name']}")

Upload vs Remember

Use upload when…Use remember when…
You have existing documentsYou are storing short atomic facts
Content spans many pagesYou want explicit memory typing per item
You ingest structured data filesYou want precise confidence per memory

Extracting from Conversations

If you have raw chat logs, Memanto can automatically parse the conversation and use the underlying LLM to extract durable, structured memories (like facts and preferences) while discarding the noise.

Using the Web UI

The Memanto Web Dashboard features an Extract tab in the Playground:
  1. Paste a JSON array of conversation turns ([{"role": "user", "content": "..."}, ...]).
  2. Click Preview Extraction to review the memory cards Memanto generated. You can modify types, content, and confidence.
  3. Click Save to Database to persist the selected facts.
  4. (Optional) Use Extract & Save to skip the preview and directly persist the memories.

Using the CLI

You can extract and store memories from a local JSON file containing your chat history:
# Preview what would be extracted
memanto remember --from-conversation chat.json --dry-run

# Extract and persist directly
memanto remember --from-conversation chat.json

Using the REST API

Send your conversation payload to the extract endpoint:
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/remember/extract" \
  -H "X-Session-Token: <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {"role": "user", "content": "I prefer 4 spaces for indentation."},
      {"role": "assistant", "content": "Got it."}
    ],
    "dry_run": true
  }'

Recall Patterns

Semantic Recall

memanto recall "What do I know about user preferences?"

Filter by Type

memanto recall "How should I contact this user?" --type preference

Limit Result Volume

memanto recall "customer details" --limit 10

Temporal Recall

Use the temporal recall variants (--as-of, --changed-since, and --recent) to query memory across time. See Temporal Memory Details for complete patterns and examples.

Answering and Conflict Management

Grounded Answers

memanto answer "Based on memory, how should we communicate with this customer?"

Conflict Detection

memanto conflicts
When contradictions are found, resolve them by keeping the new memory, the old one, both, removing both, or replacing them with a manual entry. See List Conflicts and Resolve Conflict for the API contract.

Deleting a Memory

Remove a single memory from the active agent by its ID. Find the ID in the output of memanto recall, then:
memanto forget b7c3cf31-e537-49f1-abc4-c50ac6adeac5
This prompts for confirmation. Add --force to skip it. See the forget command and Delete Memory API for details.
For contradictions, prefer resolving conflicts (keep new/old/both, remove both, or replace) over deleting history. Use forget for one-off removals such as a memory stored by mistake.

Migrating from Other Providers

Already have memories in Mem0, Letta, or Supermemory? Import them into a Memanto agent with memanto migrate:
# Preview the mapping and savings report without writing
memanto migrate mem0 --dry-run

# Import into the active agent
memanto migrate mem0
See the migrate command for providers, options, and output details.

Export and Sync

Export to Markdown

memanto memory export

Export to Custom Path

memanto memory export --output /path/to/memory.md

Sync to MEMORY.md

memanto memory sync

Performance Tips

  1. Use specific memory types instead of defaulting everything to fact.
  2. Batch ingest when importing many items.
  3. Keep recall limits tight for faster, cleaner responses.
  4. Use confidence scoring when information quality varies.

Best Practices

DO

  • Keep memories concise and atomic.
  • Record source context in metadata when useful.
  • Resolve conflicts explicitly when contradictions arise rather than deleting history.

DON’T

  • Store the same fact repeatedly.
  • Mix multiple unrelated facts in one memory.
  • Over-fetch with very high recall limits by default.

Next Steps


Memory operations are the core of Memanto. Keep this flow lean, typed, and conflict-aware for best results.