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 | title: "Configure the OSS Stack" |
| #3 | description: "Wire up Mem0 OSS with your preferred LLM, vector store, embedder, and reranker." |
| #4 | icon: "sliders" |
| #5 | --- |
| #6 | |
| #7 | # Configure Mem0 OSS Components |
| #8 | |
| #9 | <Info> |
| #10 | **Prerequisites** |
| #11 | - Python 3.10+ with `pip` available |
| #12 | - Running vector database (e.g., Qdrant, Postgres + pgvector) or access credentials for a managed store |
| #13 | - API keys for your chosen LLM, embedder, and reranker providers |
| #14 | </Info> |
| #15 | |
| #16 | <Tip> |
| #17 | Start from the <Link href="/open-source/python-quickstart">Python quickstart</Link> if you still need the base CLI and repository. |
| #18 | </Tip> |
| #19 | |
| #20 | ## Install dependencies |
| #21 | |
| #22 | <Tabs> |
| #23 | <Tab title="Python"> |
| #24 | <Steps> |
| #25 | <Step title="Install Mem0 OSS"> |
| #26 | ```bash |
| #27 | pip install mem0ai |
| #28 | ``` |
| #29 | </Step> |
| #30 | <Step title="Add provider SDKs (example: Qdrant + OpenAI)"> |
| #31 | ```bash |
| #32 | pip install qdrant-client openai |
| #33 | ``` |
| #34 | </Step> |
| #35 | </Steps> |
| #36 | </Tab> |
| #37 | <Tab title="Docker Compose"> |
| #38 | <Steps> |
| #39 | <Step title="Clone the repo and copy the compose file"> |
| #40 | ```bash |
| #41 | git clone https://github.com/mem0ai/mem0.git |
| #42 | cd mem0/examples/docker-compose |
| #43 | ``` |
| #44 | </Step> |
| #45 | <Step title="Install dependencies for local overrides"> |
| #46 | ```bash |
| #47 | pip install -r requirements.txt |
| #48 | ``` |
| #49 | </Step> |
| #50 | </Steps> |
| #51 | </Tab> |
| #52 | </Tabs> |
| #53 | |
| #54 | ## Define your configuration |
| #55 | |
| #56 | <Tabs> |
| #57 | <Tab title="Python"> |
| #58 | <Steps> |
| #59 | <Step title="Create a configuration dictionary"> |
| #60 | ```python |
| #61 | from mem0 import Memory |
| #62 | |
| #63 | config = { |
| #64 | "vector_store": { |
| #65 | "provider": "qdrant", |
| #66 | "config": {"host": "localhost", "port": 6333}, |
| #67 | }, |
| #68 | "llm": { |
| #69 | "provider": "openai", |
| #70 | "config": {"model": "gpt-4.1-mini", "temperature": 0.1}, |
| #71 | }, |
| #72 | "embedder": { |
| #73 | "provider": "vertexai", |
| #74 | "config": {"model": "textembedding-gecko@003"}, |
| #75 | }, |
| #76 | "reranker": { |
| #77 | "provider": "cohere", |
| #78 | "config": {"model": "rerank-english-v3.0"}, |
| #79 | }, |
| #80 | } |
| #81 | |
| #82 | memory = Memory.from_config(config) |
| #83 | ``` |
| #84 | </Step> |
| #85 | <Step title="Store secrets as environment variables"> |
| #86 | ```bash |
| #87 | export QDRANT_API_KEY="..." |
| #88 | export OPENAI_API_KEY="..." |
| #89 | export COHERE_API_KEY="..." |
| #90 | ``` |
| #91 | </Step> |
| #92 | </Steps> |
| #93 | </Tab> |
| #94 | <Tab title="config.yaml"> |
| #95 | <Steps> |
| #96 | <Step title="Create a `config.yaml` file"> |
| #97 | ```yaml |
| #98 | vector_store: |
| #99 | provider: qdrant |
| #100 | config: |
| #101 | host: localhost |
| #102 | port: 6333 |
| #103 | |
| #104 | llm: |
| #105 | provider: azure_openai |
| #106 | config: |
| #107 | api_key: ${AZURE_OPENAI_KEY} |
| #108 | deployment_name: gpt-4.1-mini |
| #109 | |
| #110 | embedder: |
| #111 | provider: ollama |
| #112 | config: |
| #113 | model: nomic-embed-text |
| #114 | |
| #115 | reranker: |
| #116 | provider: zero_entropy |
| #117 | config: |
| #118 | api_key: ${ZERO_ENTROPY_KEY} |
| #119 | ``` |
| #120 | </Step> |
| #121 | <Step title="Load the config file at runtime"> |
| #122 | ```python |
| #123 | from mem0 import Memory |
| #124 | |
| #125 | memory = Memory.from_config_file("config.yaml") |
| #126 | ``` |
| #127 | </Step> |
| #128 | </Steps> |
| #129 | </Tab> |
| #130 | </Tabs> |
| #131 | |
| #132 | <Info icon="check"> |
| #133 | Run `memory.add(["Remember my favorite cafe in Tokyo."], user_id="alex")` and then `memory.search("favorite cafe", user_id="alex")`. You should see the Qdrant collection populate and the reranker mark the memory as a top hit. |
| #134 | </Info> |
| #135 | |
| #136 | ## Tune component settings |
| #137 | |
| #138 | <AccordionGroup> |
| #139 | <Accordion title="Vector store collections"> |
| #140 | Name collections explicitly in production (`collection_name`) to isolate tenants and enable per-tenant retention policies. |
| #141 | </Accordion> |
| #142 | <Accordion title="LLM extraction temperature"> |
| #143 | Keep extraction temperatures ≤0.2 so advanced memories stay deterministic. Raise it only when you see missing facts. |
| #144 | </Accordion> |
| #145 | <Accordion title="Reranker depth"> |
| #146 | Limit `top_k` to 10–20 results; sending more adds latency without meaningful gains. |
| #147 | </Accordion> |
| #148 | </AccordionGroup> |
| #149 | |
| #150 | <Warning> |
| #151 | Mixing managed and self-hosted components? Make sure every outbound provider call happens through a secure network path. Managed rerankers often require outbound internet even if your vector store is on-prem. |
| #152 | </Warning> |
| #153 | |
| #154 | ## Quick recovery |
| #155 | |
| #156 | - Qdrant connection errors → confirm port `6333` is exposed and API key (if set) matches. |
| #157 | - Empty search results → verify the embedder model name; a mismatch causes dimension errors. |
| #158 | - `Unknown reranker` → update the SDK (`pip install --upgrade mem0ai`) to load the latest provider registry. |
| #159 | |
| #160 | <CardGroup cols={2}> |
| #161 | <Card |
| #162 | title="Pick Providers" |
| #163 | description="Review the LLM, vector store, embedder, and reranker catalogs." |
| #164 | icon="sitemap" |
| #165 | href="/components/llms/overview" |
| #166 | /> |
| #167 | <Card |
| #168 | title="Deploy with Docker Compose" |
| #169 | description="Follow the end-to-end OSS deployment walkthrough." |
| #170 | icon="server" |
| #171 | href="/cookbooks/companions/local-companion-ollama" |
| #172 | /> |
| #173 | </CardGroup> |
| #174 |