{"id":49298886,"url":"https://github.com/scitrera/memorylayer","last_synced_at":"2026-04-26T05:06:18.590Z","repository":{"id":337921892,"uuid":"1143749087","full_name":"scitrera/memorylayer","owner":"scitrera","description":"Memory infrastructure for AI agents","archived":false,"fork":false,"pushed_at":"2026-04-03T00:46:40.000Z","size":1268,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T06:52:45.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scitrera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":null,"dco":null,"cla":null}},"created_at":"2026-01-28T00:06:35.000Z","updated_at":"2026-04-02T21:32:02.000Z","dependencies_parsed_at":"2026-02-12T10:18:50.133Z","dependency_job_id":null,"html_url":"https://github.com/scitrera/memorylayer","commit_stats":null,"previous_names":["scitrera/memorylayer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/scitrera/memorylayer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitrera%2Fmemorylayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitrera%2Fmemorylayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitrera%2Fmemorylayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitrera%2Fmemorylayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scitrera","download_url":"https://codeload.github.com/scitrera/memorylayer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitrera%2Fmemorylayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32286280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"online","status_checked_at":"2026-04-26T02:00:05.962Z","response_time":129,"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":[],"created_at":"2026-04-26T05:06:17.914Z","updated_at":"2026-04-26T05:06:18.584Z","avatar_url":"https://github.com/scitrera.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cstrong\u003ememorylayer.ai\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003ePersistent, queryable memory for stateless LLMs.\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://memorylayer.ai\"\u003eWebsite\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://docs.memorylayer.ai\"\u003eDocs\u003c/a\u003e \u0026middot;\n  \u003ca href=\"https://github.com/scitrera/memorylayer\"\u003eGitHub\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nLLMs forget everything between sessions. MemoryLayer fixes that.\n\nStore memories with a single call, recall them with semantic search, and let the knowledge graph surface connections that vector similarity alone can't find. Works with any LLM framework or directly via REST API.\n\n```python\nfrom memorylayer import sync_client\n\nwith sync_client() as memory:\n    memory.remember(\"User prefers dark mode and TypeScript\")\n\n    results = memory.recall(\"What are the user's preferences?\")\n```\n\n## Why MemoryLayer\n\n- **Cognitive memory types** -- episodic, semantic, procedural, and working memory mirror how humans organize knowledge\n- **Knowledge graph** -- 60+ typed relationships across 11 categories enable multi-hop causal queries\n- **Semantic tiering** -- memories are progressively summarized so you retrieve the right detail level without wasting context\n- **Context sandbox** -- process hundreds of memories server-side in a persistent Python sandbox without consuming your context window\n- **Recursive reasoning** -- inspired by [RLM](https://arxiv.org/abs/2512.24601), the server iteratively executes code and LLM queries over memory data\n- **Smart extraction** -- every memory stored automatically extracts facts, builds associations, deduplicates, and categorizes\n- **Adaptive decay** -- memory importance adjusts over time based on usage and feedback\n- **MCP integration** -- first-class Model Context Protocol server for Claude Code, Claude Desktop, Cursor, and other MCP-compatible tools\n\n## Packages\n\n| Package                                                                      | Install | Description                                             |\n|------------------------------------------------------------------------------|---------|---------------------------------------------------------|\n| **[memorylayer-core-python](./memorylayer-core-python)**                     | `pip install memorylayer-server` | FastAPI server with SQLite + sqlite-vec storage         |\n| **[memorylayer-sdk-python](./memorylayer-sdk-python)**                       | `pip install memorylayer-client` | Python client SDK (async/sync)                          |\n| **[memorylayer-sdk-typescript](./memorylayer-sdk-typescript)**               | `npm i @scitrera/memorylayer-sdk` | TypeScript/JavaScript client SDK                        |\n| **[memorylayer-mcp-typescript](./memorylayer-mcp-typescript)**               | `npm i @scitrera/memorylayer-mcp-server` | MCP server -- 21 tools for LLM agents                   |\n| **[memorylayer-sdk-langchain-python](./memorylayer-sdk-langchain-python)**   | `pip install memorylayer-langchain` | LangChain integration                                   |\n| **[memorylayer-sdk-llamaindex-python](./memorylayer-sdk-llamaindex-python)** | `pip install memorylayer-llamaindex` | LlamaIndex integration                                  |\n| **[memorylayer-cc-plugin](./memorylayer-cc-plugin)**                         | see README | Claude Code plugin -- captures memory before compaction |\n| **[memorylayer-explorer](./memorylayer-explorer)**                          | see README | (Work in Progress) WebUI                                |\n\n## Quick Start\n\n### 1. Start the server\n\n```bash\npip install memorylayer-server[local]\nmemorylayer serve\n```\n\nOr with Docker (no setup required):\n\n```bash\ndocker run -d -p 61001:61001 -v memorylayer-data:/data scitrera/memorylayer-server\n```\n\n### 2. Connect a client\n\n**Python:**\n\n```python\nfrom memorylayer import MemoryLayerClient, MemoryType\n\nasync with MemoryLayerClient(base_url=\"http://localhost:61001\") as client:\n    # Store\n    await client.remember(\n        content=\"User prefers Python for backend development\",\n        type=MemoryType.SEMANTIC,\n        importance=0.8,\n        tags=[\"preferences\", \"programming\"]\n    )\n\n    # Recall\n    results = await client.recall(\n        query=\"What programming languages does the user like?\",\n        limit=5\n    )\n```\n\n**TypeScript:**\n\n```typescript\nimport { MemoryLayerClient } from \"@scitrera/memorylayer-sdk\";\n\nconst client = new MemoryLayerClient({\n  baseUrl: \"http://localhost:61001\",\n  workspaceId: \"my-project\"\n});\n\nawait client.remember(\"User prefers TypeScript for new projects\", {\n  type: \"semantic\",\n  importance: 0.8\n});\n```\n\n### 3. Or use with Claude Code (MCP)\n\nAdd `.mcp.json` to your project root:\n\n```json\n{\n  \"mcpServers\": {\n    \"memorylayer\": {\n      \"command\": \"npx\",\n      \"args\": [\"@scitrera/memorylayer-mcp-server\"],\n      \"env\": {\n        \"MEMORYLAYER_URL\": \"http://localhost:61001\"\n      }\n    }\n  }\n}\n```\n\nThe MCP server auto-detects your workspace from the git repo name. Claude gets 21 memory tools -- remember, recall, reflect, associate, graph queries, sessions, and a full context sandbox.\n\nFor the full Claude Code experience, also install the **[MemoryLayer plugin](./memorylayer-cc-plugin)** which adds pre-compaction memory capture, session briefings, and automatic memory triggers:\n\n```bash\n# Add the marketplace (one-time setup)\nclaude plugin marketplace add scitrera/memorylayer\n\n# Install the plugin\nclaude plugin install memorylayer@memorylayer.ai\n```\n\n## Enterprise\n\nMemoryLayer also offers an enterprise edition that builds on the open source core:\n\n- **Scale** -- PostgreSQL + Redis backends, hot/warm/cold data tiering, vector-graph compression\n- **Security** -- RBAC, audit trails, custom ontologies\n- **Multimodal** -- unified handling of text, images, audio, video, and documents\n- **Advanced sandbox** -- state checkpointing, stronger isolation, extended tool libraries\n\nVisit [memorylayer.ai](https://memorylayer.ai) for details.\n\n## License\n\nApache 2.0 -- see [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitrera%2Fmemorylayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscitrera%2Fmemorylayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitrera%2Fmemorylayer/lists"}