{"id":51454342,"url":"https://github.com/rangzen/mem0-graph","last_synced_at":"2026-07-05T23:30:36.402Z","repository":{"id":358114464,"uuid":"1162483863","full_name":"rangzen/mem0-graph","owner":"rangzen","description":"Visualise mem0 memories as an interactive entity graph extracted with spaCy.","archived":false,"fork":false,"pushed_at":"2026-02-20T10:27:08.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T21:18:57.460Z","etag":null,"topics":["d3","flask","mem0"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rangzen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-20T10:15:38.000Z","updated_at":"2026-02-20T10:27:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rangzen/mem0-graph","commit_stats":null,"previous_names":["rangzen/mem0-graph"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rangzen/mem0-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangzen%2Fmem0-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangzen%2Fmem0-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangzen%2Fmem0-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangzen%2Fmem0-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rangzen","download_url":"https://codeload.github.com/rangzen/mem0-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangzen%2Fmem0-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35172975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d3","flask","mem0"],"created_at":"2026-07-05T23:30:35.841Z","updated_at":"2026-07-05T23:30:36.396Z","avatar_url":"https://github.com/rangzen.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mem0 Graph\n\nInteractive entity graph for [mem0](https://mem0.ai) memories.\n\n![mem0 Entity Graph](./2026-02-20_screenshot.png)\n\nFetches memories from the mem0 API, extracts named entities and relations with spaCy, and renders a force-directed graph in the browser.\n\n## Disclaimer\n\nThis project is an independent community tool and is **not affiliated with, endorsed by, or related to mem0** in any way.\n\n[mem0](https://mem0.ai) is a great product — if you find it useful, consider supporting them with a paid plan.\n\nIf you are looking for graph-native memory solutions, also check out [Zep](https://www.getzep.com) and their open-source [Graphiti](https://www.getzep.com) knowledge graph engine.\n\n## Setup\n\n```bash\ncp .env.example .env\n# Edit .env: set MEM0_API_KEY and (optionally) MEM0_DEFAULT_USER\n\nuv venv --python 3.12\nuv pip install -r requirements.txt\n\n# Install the large spaCy model (recommended — better NER + noun chunk coverage)\nuv pip install \"en-core-web-lg @ https://github.com/explosion/spacy-models/releases/download/en_core_web_lg-3.8.0/en_core_web_lg-3.8.0-py3-none-any.whl\"\n\n# Or the small model if disk space is a concern\n# uv pip install \"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl\"\n```\n\n\u003e Python 3.12 is required — spaCy is not yet compatible with 3.13+.\n\n## Usage\n\n```bash\n# Fetch memories and extract entities → graph.json\nuv run main.py fetch\n\n# Filter to a specific user\nuv run main.py fetch --user pipecat-demo-user\n\n# Serve the graph at http://localhost:8080\nuv run main.py serve\n\n# Custom port\nuv run main.py serve --port 9090\n```\n\nRe-run `fetch` whenever your mem0 memories change, then refresh the browser.\n\n## How it works\n\n1. **Fetch** — pulls entities from `GET /v1/entities/` and memories from `POST /v2/memories/`\n2. **Extract** — three spaCy passes per memory:\n   - NER → named entities (PERSON, ORG, GPE, LOC, PRODUCT, EVENT…)\n   - Noun chunks → concepts not caught by NER (father, car, Cajun fries…)\n   - Adjectival complements → descriptors (sad, happy…)\n   - Dependency parsing → SVO relations between extracted nodes; co-occurrence fallback\n3. **Save** — writes `graph.json`\n4. **Serve** — Flask serves `graph.html` (D3.js force graph) at `/` and data at `/api/graph`\n\n## Node types\n\n| Colour | Label | Example |\n|--------|-------|---------|\n| Purple | Mem0 user / agent | pipecat-demo-user |\n| Green  | Person | Miss Donuts |\n| Red    | Organization | ORG |\n| Amber  | Location / GPE | Paris |\n| Blue   | Product / Event | — |\n| Teal   | Proper noun chunk | Five Guys |\n| Dark blue | Concept (noun chunk) | father, car, nightmare |\n| Light purple | Attribute (adjective) | sad |\n| Grey   | Memory category | health, food |\n\n## Graph interaction\n\n| Action | Effect |\n|--------|--------|\n| Drag node | Pins it in place |\n| Double-click pinned node | Releases it back into the simulation |\n| Scroll / trackpad pinch | Zoom |\n| Drag background | Pan |\n| Hover node or edge | Tooltip with details |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangzen%2Fmem0-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangzen%2Fmem0-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangzen%2Fmem0-graph/lists"}