Sign inSign up

ajeetraina777/sbx-mem0-kits:openai

Machine learning & AI
Manifest digest

sha256:ce89cff0f1d0917c3c818de1487698453e14e48e4db76d871c780947a3904f1a

Last pushed

29 days by ajeetraina777

Type

Sandbox Kit

Manifest digest

sha256:ce89cff0f1d0917c3c818de1487698453e14e48e4db76d871c780947a3904f1a

yaml
schemaVersion: "2"
kind: mixin
name: mem0
version: 1.0.0
displayName: Mem0 (OpenAI)
description: 'Adds the Mem0 memory layer (mem0ai) to an agent, using OpenAI for both the LLM and the embedder. Store the key with: sbx secret set -g openai (the kit holds no key).'
sourceURL: https://github.com/ajeetraina/sbx-mem0-kits
licenses:
    - Apache-2.0
agentInstructions:
    content: |
        ## Mem0 memory layer (OpenAI)

        The mem0ai package is installed and wired to OpenAI for both the LLM and the
        embedder. `openai` is a built-in sbx service: the API key is supplied by the
        sbx proxy from the stored openai secret, so it is not present in the sandbox.
permissions:
    network:
        allow:
            - pypi.org
            - files.pythonhosted.org
            - raw.githubusercontent.com
            - github.com
            - release-assets.githubusercontent.com
            - api.openai.com
environment:
    variables:
        MEM0_TELEMETRY: "false"
        NO_PROXY: localhost,127.0.0.1,host.docker.internal
        OPENAI_API_KEY: placeholder
        OPENAI_BASE_URL: https://api.openai.com/v1
        no_proxy: localhost,127.0.0.1,host.docker.internal
setup:
    install:
        - command: pip install --break-system-packages 'mem0ai[nlp]==2.0.5' click
          user: "1000"
          description: Install Mem0 with NLP extras plus click (openai SDK ships with mem0ai)
        - command: PIP_BREAK_SYSTEM_PACKAGES=1 python3 -m spacy download en_core_web_sm
          user: "1000"
          description: Download spaCy English model
    files:
        - path: /home/agent/.mem0/config.json
          content: |
            {
              "vector_store": {
                "provider": "qdrant",
                "config": {
                  "collection_name": "mem0_openai",
                  "path": "/home/agent/.mem0/qdrant",
                  "on_disk": true,
                  "embedding_model_dims": 1536
                }
              },
              "llm": {
                "provider": "openai",
                "config": {
                  "model": "gpt-4o-mini",
                  "openai_base_url": "https://api.openai.com/v1"
                }
              },
              "embedder": {
                "provider": "openai",
                "config": {
                  "model": "text-embedding-3-small",
                  "openai_base_url": "https://api.openai.com/v1"
                }
              }
            }
          mode: "0644"
          onlyIfMissing: true
          description: Mem0 config using OpenAI; key injected by the sbx proxy from the stored openai secret