repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | """ |
| #2 | Mnemosyne Cross-Provider Importers |
| #3 | |
| #4 | Import memories from other AI memory providers into Mnemosyne. |
| #5 | |
| #6 | Supported providers: |
| #7 | mem0 — Mem0 (cloud + self-hosted) |
| #8 | letta — Letta (formerly MemGPT) |
| #9 | zep — Zep enterprise memory |
| #10 | cognee — Cognee graph memory |
| #11 | honcho — Honcho entity memory |
| #12 | supermemory — SuperMemory cloud API |
| #13 | hindsight — Hindsight/Hermes memory provider |
| #14 | |
| #15 | CLI usage: |
| #16 | hermes mnemosyne import --from mem0 --api-key sk-xxx |
| #17 | hermes mnemosyne import --file export.json --dry-run |
| #18 | hermes mnemosyne import --list-providers |
| #19 | hermes mnemosyne import --from mem0 --generate-script |
| #20 | |
| #21 | Agentic migration: |
| #22 | hermes mnemosyne import --from zep --agentic |
| #23 | """ |
| #24 | |
| #25 | from .base import BaseImporter, ImporterResult, import_from_file |
| #26 | from .mem0 import Mem0Importer, import_from_mem0 |
| #27 | from .letta import LettaImporter |
| #28 | from .zep import ZepImporter |
| #29 | from .cognee import CogneeImporter |
| #30 | from .honcho import HonchoImporter |
| #31 | from .supermemory import SuperMemoryImporter |
| #32 | from .hindsight import HindsightImporter, import_from_hindsight |
| #33 | from .agentic import ( |
| #34 | AgenticImporter, |
| #35 | generate_migration_script, |
| #36 | generate_agent_instructions, |
| #37 | generate_docs_instructions, |
| #38 | ) |
| #39 | |
| #40 | |
| #41 | # Registry of supported providers |
| #42 | PROVIDERS = { |
| #43 | "mem0": { |
| #44 | "name": "Mem0", |
| #45 | "class": Mem0Importer, |
| #46 | "module": "mem0", |
| #47 | "docs": "https://docs.mem0.ai", |
| #48 | "env_key": "MEM0_API_KEY", |
| #49 | "pypi_package": "mem0ai", |
| #50 | "description": "Memory platform with 24 vector store backends. Supports user/agent/app scoping.", |
| #51 | }, |
| #52 | "letta": { |
| #53 | "name": "Letta (MemGPT)", |
| #54 | "class": LettaImporter, |
| #55 | "module": "letta", |
| #56 | "docs": "https://docs.letta.com", |
| #57 | "env_key": "LETTA_API_KEY", |
| #58 | "pypi_package": "letta-client", |
| #59 | "description": "Agent OS with hierarchical memory blocks. Export via .af AgentFile format.", |
| #60 | }, |
| #61 | "zep": { |
| #62 | "name": "Zep", |
| #63 | "class": ZepImporter, |
| #64 | "module": "zep", |
| #65 | "docs": "https://docs.getzep.com", |
| #66 | "env_key": "ZEP_API_KEY", |
| #67 | "pypi_package": "zep-cloud", |
| #68 | "description": "Enterprise temporal knowledge graph. Session-based with user/thread model.", |
| #69 | }, |
| #70 | "cognee": { |
| #71 | "name": "Cognee", |
| #72 | "class": CogneeImporter, |
| #73 | "module": "cognee", |
| #74 | "docs": "https://docs.cognee.ai", |
| #75 | "env_key": None, |
| #76 | "pypi_package": "cognee", |
| #77 | "description": "Graph-based memory with Kùzu + LanceDB + SQLite. Nodes/edges map to episodic/triples.", |
| #78 | }, |
| #79 | "honcho": { |
| #80 | "name": "Honcho", |
| #81 | "class": HonchoImporter, |
| #82 | "module": "honcho", |
| #83 | "docs": "https://docs.honcho.dev", |
| #84 | "env_key": None, |
| #85 | "pypi_package": "honcho-ai", |
| #86 | "description": "Entity-centric memory by Plastic Labs. Workspace → Peer → Session → Message model.", |
| #87 | }, |
| #88 | "supermemory": { |
| #89 | "name": "SuperMemory", |
| #90 | "class": SuperMemoryImporter, |
| #91 | "module": "supermemory", |
| #92 | "docs": "https://supermemory.ai/docs", |
| #93 | "env_key": "SUPERMEMORY_API_KEY", |
| #94 | "pypi_package": "supermemory", |
| #95 | "description": "Cloud memory API with container tags and document management.", |
| #96 | }, |
| #97 | "hindsight": { |
| #98 | "name": "Hindsight", |
| #99 | "class": HindsightImporter, |
| #100 | "module": "hindsight", |
| #101 | "docs": "https://github.com/vectorize-io/hindsight", |
| #102 | "env_key": None, |
| #103 | "pypi_package": None, |
| #104 | "description": "Hermes memory provider. Imports consolidated memories into episodic storage while preserving timestamps and metadata.", |
| #105 | }, |
| #106 | } |
| #107 | |
| #108 | |
| #109 | def list_providers() -> list: |
| #110 | """Return list of supported provider names.""" |
| #111 | return list(PROVIDERS.keys()) |
| #112 | |
| #113 | |
| #114 | def get_provider_info(name: str) -> dict: |
| #115 | """Get metadata for a supported provider.""" |
| #116 | return PROVIDERS.get(name, {}) |
| #117 | |
| #118 | |
| #119 | def import_from_provider(provider: str, mnemosyne, dry_run: bool = False, |
| #120 | session_id: str = None, channel_id: str = None, |
| #121 | **kwargs) -> ImporterResult: |
| #122 | """Import memories from a supported provider into Mnemosyne. |
| #123 | |
| #124 | Args: |
| #125 | provider: Provider name (e.g., 'mem0', 'letta'). |
| #126 | mnemosyne: Mnemosyne instance to import into. |
| #127 | dry_run: If True, validate and transform but don't write. |
| #128 | session_id: Override session for imported memories. |
| #129 | channel_id: Channel to assign imported memories to. |
| #130 | **kwargs: Provider-specific arguments (api_key, user_id, etc.) |
| #131 | |
| #132 | Returns: |
| #133 | ImporterResult with import statistics. |
| #134 | |
| #135 | Raises: |
| #136 | ValueError: If provider is not supported. |
| #137 | """ |
| #138 | provider_info = PROVIDERS.get(provider) |
| #139 | if not provider_info: |
| #140 | supported = ", ".join(PROVIDERS.keys()) |
| #141 | raise ValueError( |
| #142 | f"Unsupported provider: '{provider}'. Supported: {supported}" |
| #143 | ) |
| #144 | |
| #145 | importer_cls = provider_info["class"] |
| #146 | importer = importer_cls(**kwargs) |
| #147 | return importer.run( |
| #148 | mnemosyne, |
| #149 | dry_run=dry_run, |
| #150 | session_id=session_id, |
| #151 | channel_id=channel_id, |
| #152 | ) |
| #153 | |
| #154 | |
| #155 | def generate_script(provider: str, **kwargs) -> str: |
| #156 | """Generate a migration script for the given provider.""" |
| #157 | provider_info = PROVIDERS.get(provider) |
| #158 | if not provider_info: |
| #159 | supported = ", ".join(PROVIDERS.keys()) |
| #160 | raise ValueError( |
| #161 | f"Unsupported provider: '{provider}'. Supported: {supported}" |
| #162 | ) |
| #163 | return generate_migration_script(provider, **kwargs) |
| #164 |