{"repo": "afx-team/hebb-mind", "files": {"repo_pages/advanced/multi-model.md": {"36ce983c5644adfe06c176912b58b3284753db7b": {"t": 1785674177.2575505, "n": 4564, "h": "81172f0d70629b36", "c": "---\ndescription: \"Configure any LLM provider for AI agent memory consolidation via LiteLLM: OpenAI, Anthropic Claude, Qwen, GLM, Kimi. Local sentence-transformers embeddings, no API cost.\"\n---\n\n# Multi-Model Support\n\nHebb Mind supports multiple LLM providers through [LiteLLM](https://github.com/BerriAI/litellm). This enables memory consolidation with any major language model.\n\n## Supported Providers\n\n| Provider | Model Example | Configuration |\n|----------|--------------|---------------|\n| OpenAI | `openai/gpt-4o-mini` | `llm_api_key` |\n| OpenAI | `openai/gpt-4o` | `llm_api_key` |\n| Anthropic | `anthropic/claude-3-haiku-20240307` | `llm_api_key` |\n| Anthropic | `anthropic/claude-3-5-sonnet-20241022` | `llm_api_key` |\n| Qwen (Alibaba) | `openai/qwen-plus` | `llm_api_key` + `llm_base_url` |\n| GLM (Zhipu) | `openai/glm-4` | `llm_api_key` + `llm_base_url` |\n| Kimi (Moonshot) | `openai/moonshot-v1-8k` | `llm_api_key` + `llm_base_url` |\n\n## Configuration\n\n### OpenAI\n\n```bash\nhebb config set llm_model openai/gpt-4o-mini\nhebb config set llm_api_key sk-your-openai-key\n```\n\n### Anthropic\n\n```bash\nhebb config set llm_model anthropic/claude-3-haiku-20240307\nhebb config set llm_api_key sk-ant-your-anthropic-key\n```\n\n### Qwen (Alibaba Cloud)\n\n```bash\nhebb config set llm_model openai/qwen-plus\nhebb config set llm_api_key sk-your-qwen-key\nhebb config set llm_base_url https://dashscope.aliyuncs.com/compatible-mode/v1\n```\n\n### GLM (Zhipu AI)\n\n```bash\nhebb config set llm_model openai/glm-4\nhebb config set llm_api_key your-zhipu-key\nhebb config set llm_base_url https://open.bigmodel.cn/api/paas/v4\n```\n\n### Kimi (Moonshot AI)\n\n```bash\nhebb config set llm_model openai/moonshot-v1-8k\nhebb config set llm_api_key sk-your-moonshot-key\nhebb config set llm_base_url https://api.moonshot.cn/v1\n```\n\n## How It Works\n\nFor Chinese model providers (Qwen, GLM, Kimi), the `openai/` prefix tells LiteLLM to use the OpenAI-compatible API format. The `llm_base_url` points to the provider's endpoint. This works because these providers implement the OpenAI chat completion API specification.\n\n## Embedding Model\n\nThe embedding model runs **locally** via sentence-transformers. No external API calls are needed for generating embeddings. By default, `hebb setup` selects a **small** model by content language:\n\n- English: `all-MiniLM-L6-v2` (~90 MB)\n- Chinese or multilingual: `intfloat/multilingual-e5-small` (~470 MB)\n\nFor the high-quality tier (1–2 GB), opt in with `hebb setup --profile best`:\n\n- English: `BAAI/bge-large-en-v1.5`\n- Chinese or multilingual: `BAAI/bge-m3`\n\nDownload region is independent from language. Use `hebb setup --language en --region cn` for English content on a China network, or `hebb setup --language zh --region global` for Chinese content on a global network.\n\nTo swap to a different model after first install:\n\n```bash\nhebb config set embedding_model \"paraphrase-multilingual-MiniLM-L12-v2\"\nhebb config set embedding_dim 384\nhebb service restart\nhebb memory reembed # required if the dimension changed\n```\n\n::: tip\nChanging the embedding dimension invalidates all stored vectors — the vector table is auto-reset on next startup. Run `hebb memory reembed` afterwards to repopulate. See [Switch the Embedding Model](../guide/switch-embedding-model.md) for the full walkthrough (CLI, Web Console, and re-embed details).\n:::\n\nThis means:\n\n- Embedding is free -- no API costs\n- Low latency -- no network round-trip\n- Privacy -- your text never leaves the machine for embedding\n- Offline capable -- works without internet after initial download\n\nThe embedding model is separate from the LLM model. You can use any LLM provider while keeping the local embedding model.\n\n## Testing Your Configuration\n\nAfter configuring a model, test the connection:\n\n```bash\ncurl -X POST http://localhost:8321/api/v1/admin/config/test-llm \\\n -H 'Content-Type: application/json' \\\n -d '{\"model\": \"openai/gpt-4o-mini\", \"api_key\": \"sk-...\"}'\n```\n\nThis sends a simple test request to verify that the model, API key, and endpoint are working correctly. Add `\"base_url\": \"https://...\"` for OpenAI-compatible providers (Qwen, GLM, Kimi).\n\n## Choosing a Model\n\nFor memory consolidation, smaller and faster models work well since the task involves classification and summarization rather than creative generation. Recommended starting points:\n\n- **Budget-conscious**: `openai/gpt-4o-mini` or `openai/qwen-plus`\n- **Higher quality**: `openai/gpt-4o` or `anthropic/claude-3-5-sonnet-20241022`\n- **Chinese-language memories**: `openai/qwen-plus` or `openai/glm-4`\n"}}, "README.md": {"36ce983c5644adfe06c176912b58b3284753db7b": {"t": 1785674233.8787296, "n": 15309, "h": "04bc282f80e95fb5", "c": "
\n
A neuroscience-inspired memory framework for AI agents
\nEncode. Consolidate. Activate. Forget.
\nDocumentation · English | 中文
\n\n\n\n\n---\n\nHebb Mind gives AI agents a neuroscience-inspired memory loop — **encode → replay → consolidate → forget**. A `pipx install` and one command stand up a local REST + MCP endpoint: SQLite for storage, sentence-transformers for embedding, NetworkX for the tag graph. **Zero external services** — bring an LLM key only when you want consolidation to do its work.\n\n\n\n
\n
\n
\n
\n
一套受神经科学启发的 AI Agent 记忆框架
\n编码、巩固、激活、遗忘
\n \n\n\n\n\n---\n\nHebb Mind 给 AI Agent 装上一条受神经科学启发的记忆回路 —— **存储 → 激活 → 回放 → 巩固 → 遗忘**。`pipx install` 后一行命令即可在本地拉起 REST + MCP 端点:SQLite 做存储、sentence-transformers 做嵌入、NetworkX 维护标签图谱。**零外部服务**,只有想让巩固阶段\"工作\"时才需要 LLM Key。\n\n与同类相比,**Hebb Mind 是一个二进制、一条生物学意义上的回路。**\n\n\n
\n
\n
\n
${t('system.subtitle')}
\n${t('system.subtitle')}
\n