Skip to main content

A knowledge-graph-based memory system for AI agents that enables persistent information storage between conversations

Project description

Memory MCP

A knowledge-graph-based memory system for AI agents that enables persistent information storage between conversations.

Features

  • Persistent memory storage using a knowledge graph structure
  • Entity-relation model for organizing information
  • Tools for adding, searching, and retrieving memories

Tools

The system provides the following MCP tools:

  • load_knowledge_graph(): Retrieves the entire knowledge graph
  • get_knowledge_graph_size(): Returns the current size category of the graph ("small", "medium", or "large")
  • add_entities(entities): Adds new entities to the memory
  • add_relations(relations): Creates relationships between entities
  • add_observations(entity_name, observations): Adds observations to existing entities
  • delete_entities(entity_names): Removes entities from memory
  • delete_relations(relations): Removes relationships
  • search_nodes(query, search_mode): Searches for entities and relations matching a query. Supports three search modes:
    • "exact_phrase": Matches the entire query as a substring
    • "any_token": Matches if any word in the query matches (default)
    • "all_tokens": Matches if all words in the query match
  • open_nodes(names): Retrieves specific entities and their relationships between them

Usage

Run the agent with:

uv run memory_agent.py

The agent will automatically:

  1. Load its memory at the start of conversations
  2. Reference relevant information during interactions
  3. Update its memory with new information when the conversation ends

Exit a conversation by typing q.

Configuration

Set the memory storage location with the MEMORY_FILE_PATH environment variable (defaults to memory.json).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_memory-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_memory-0.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_memory-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_memory-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for iflow_mcp_memory-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b2e1cb4fd341a5fd8bd48c3f1cf5824ad7d43bb88b5c2b7d87a5e57d29adea66
MD5 b563062a4d213811226146f32d3fbe30
BLAKE2b-256 d1cbf86475e277b1aff339d139060b33bb24ae399c38a6030479c058d8ba130f

See more details on using hashes here.

File details

Details for the file iflow_mcp_memory-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iflow_mcp_memory-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2a590396ce977bbf276f79c46f252295edb2550e6b0196d15d4fc3f80e39071
MD5 8d1321fb4c306aa6b9718928d0e133c3
BLAKE2b-256 f05c17c583bb9ff70a8dbdc33bfc404f8e7f7e2dc987d92773f6fadb09e19ffd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page