Skip to main content

AI memory layer with autonomous agents. Open-source Mem0 alternative with memory agents, webhooks, and cognitive insights.

Project description

๐Ÿง  Mengram โ€” AI Memory Layer with Autonomous Agents

Open-source memory layer for AI apps. Not just storage โ€” Mengram has autonomous agents that clean, analyze, and find hidden patterns in your knowledge.

PyPI License: MIT Python 3.10+

Website ยท Dashboard ยท API Docs ยท PyPI


Why Mengram?

Mengram Mem0
Memory Storage โœ… โœ…
Semantic Search โœ… โœ…
Knowledge Graph โœ… โœ…
Autonomous Agents โœ… Curator, Connector, Digest โŒ
Team Shared Memory โœ… Invite codes, privacy controls โŒ
AI Reflections โœ… Patterns, insights, behavioral analysis โŒ
Webhooks โœ… โœ…
MCP Server โœ… Claude Desktop, Cursor, Windsurf โŒ
Self-hostable โœ… โœ…
Price Free $19-249/mo

Quick Start (60 seconds)

1. Get API key

Sign up at mengram.io โ€” free, no credit card.

2. Install

pip install mengram-ai

3. Connect to Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mengram": {
      "command": "mengram",
      "args": ["server", "--cloud"],
      "env": {
        "MENGRAM_API_KEY": "your-key-here"
      }
    }
  }
}

Done. Claude now has persistent memory.

Python SDK

from mengram.cloud.client import CloudMemory

m = CloudMemory(api_key="om-...")

# Add memories from conversation
m.add([
    {"role": "user", "content": "I deployed Mengram on Railway with PostgreSQL 15"},
    {"role": "assistant", "content": "Great, noted the deployment setup."}
], user_id="ali")

# Semantic search
results = m.search("deployment setup", user_id="ali")

# Run memory agents
m.run_agents(agent="all", auto_fix=True)

# Get AI insights
insights = m.insights()

# Team memory
team = m.create_team("Backend Team")
m.share_memory("Redis", team_id=team["id"])

# Webhooks
m.create_webhook(url="https://hooks.slack.com/...", name="Slack")

Memory Agents

Three autonomous agents that analyze your memory:

๐Ÿงน Curator โ€” Finds contradictions, stale facts, duplicates. Auto-cleans with auto_fix=True. Reports memory health score.

๐Ÿ”— Connector โ€” Discovers hidden connections, behavioral patterns, skill clusters. Gives strategic suggestions with priorities.

๐Ÿ“ฐ Digest โ€” Weekly summary with headlines, trends, focus areas, and recommendations.

curl -X POST "https://mengram.io/v1/agents/run?agent=all&auto_fix=true" \
  -H "Authorization: Bearer YOUR_KEY"

Team Shared Memory

Share knowledge across your team. Create โ†’ invite โ†’ share:

# Create team โ†’ get invite code
POST /v1/teams {"name": "Backend Team"}

# Colleague joins with code
POST /v1/teams/join {"invite_code": "xK9m2Qw5ab"}

# Share an entity
POST /v1/teams/3/share {"entity": "Redis"}

Search automatically includes shared team knowledge.

Webhooks

m.create_webhook(
    url="https://webhook.site/your-id",
    event_types=["memory_add", "memory_update", "memory_delete"],
    secret="optional-hmac-secret"
)

API Endpoints

Endpoint Description
POST /v1/add Add memories from conversation
POST /v1/search Semantic search
POST /v1/agents/run Run memory agents
GET /v1/insights AI-generated insights
POST /v1/teams Create team
POST /v1/teams/join Join team
POST /v1/webhooks Create webhook
GET /v1/graph Knowledge graph
GET /v1/timeline Temporal search
GET /v1/stats Usage statistics

Full docs: https://mengram.io/docs

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚          Your AI Clients             โ”‚
โ”‚  Claude Desktop ยท Cursor ยท Windsurf  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚ MCP / REST API
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚        Mengram Cloud API             โ”‚
โ”‚  Extraction ยท Re-ranking ยท Search    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚       Memory Agents Layer            โ”‚
โ”‚  ๐Ÿงน Curator ยท ๐Ÿ”— Connector ยท ๐Ÿ“ฐ Digestโ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚       Storage Layer                  โ”‚
โ”‚  PostgreSQL ยท pgvector ยท Teams       โ”‚
โ”‚  Webhooks ยท Reflections ยท Graph      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

License

MIT


Built by Ali Baizhanov

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

mengram_ai-2.3.0.tar.gz (96.8 kB view details)

Uploaded Source

Built Distribution

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

mengram_ai-2.3.0-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file mengram_ai-2.3.0.tar.gz.

File metadata

  • Download URL: mengram_ai-2.3.0.tar.gz
  • Upload date:
  • Size: 96.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for mengram_ai-2.3.0.tar.gz
Algorithm Hash digest
SHA256 fc24a3650ba3c71746f494a74acf03dc3da578fd0d85548cb18289927079e493
MD5 9848298141af3a979e90fb24dbbba4ea
BLAKE2b-256 b49837289489775099f82e5a210fc23f1f52ce0758351ea3fa0601954cf40267

See more details on using hashes here.

File details

Details for the file mengram_ai-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: mengram_ai-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 106.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for mengram_ai-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c54f0e852ca153cf700356082823c084cd59578356f75cec9da6fe30d59760
MD5 d60b5fdd39d4438f3159e31bd48fc363
BLAKE2b-256 2d386cc59e798677879a408f76ab9ced5aeafdc6eca8743f02f88798c6c8935b

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