Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
refactor(bot): simplify vikingbot installation - merge all bot-* extras into [bot] (#3037)
MaojiaSheng47da6ce129d6
diff --git a/bot/README.md b/bot/README.mdindex 7634f19dc..219bd0dfd 100644--- a/bot/README.md+++ b/bot/README.md@@ -14,12 +14,12 @@ Vikingbot is deeply integrated with OpenViking, providing powerful knowledge man## 📦 Install-**Option 1: Install from PyPI (Simplest)**+### Option 1: Install from PyPI (Simplest)**```bashpip install "openviking[bot]"```-**Option 2: Install from source (for development)**+### Option 2: Install from source (for development)****Prerequisites**@@ -46,38 +46,8 @@ uv venv --python 3.11source .venv/bin/activate # macOS/Linux# .venv\Scripts\activate # Windows-# Install dependencies (minimal)+# Install (all features included)uv pip install -e ".[bot]"--# Or install with optional features-uv pip install -e ".[bot,bot-langfuse,bot-telegram]"-```--### Optional Dependencies--Install only the features you need:--| Feature Group | Install Command | Description |-|---------------|-----------------|-------------|-| **Full** | `uv pip install -e ".[bot-full]"` | All features included |-| **Langfuse** | `uv pip install -e ".[bot-langfuse]"` | LLM observability and tracing |-| **FUSE** | `uv pip install -e ".[bot-fuse]"` | OpenViking filesystem mount |-| **Sandbox** | `uv pip install -e ".[bot-sandbox]"` | Code execution sandbox |-| **OpenCode** | `uv pip install -e ".[bot-opencode]"` | OpenCode AI integration |--#### Channels (chat apps)--| Channel | Install Command |-|---------|-----------------|-| **Telegram** | `uv pip install -e ".[bot-telegram]"` |-| **Feishu/Lark** | `uv pip install -e ".[bot-feishu]"` |-| **DingTalk** | `uv pip install -e ".[bot-dingtalk]"` |-| **Slack** | `uv pip install -e ".[bot-slack]"` |-| **QQ** | `uv pip install -e ".[bot-qq]"` |--Multiple features can be combined:-```bash-uv pip install -e ".[bot,bot-langfuse,bot-telegram]"```## 🚀 Quick Start@@ -467,11 +437,6 @@ Add to `~/.openviking/ov.conf`:For Langfuse Cloud, use `https://cloud.langfuse.com` as the `base_url`.-**Install Langfuse support:**-```bash-uv pip install -e ".[bot-langfuse]"-```-**Restart vikingbot:**```bashvikingbot gatewaydiff --git a/bot/README_CN.md b/bot/README_CN.mdindex adc16922b..e30710216 100644--- a/bot/README_CN.md+++ b/bot/README_CN.md@@ -15,12 +15,12 @@ Vikingbot 深度集成 OpenViking,提供强大的知识管理和记忆检索## 📦 安装-**选项 1:从 PyPI 安装(最简单)**+### 选项 1:从 PyPI 安装(最简单)**```bashpip install "openviking[bot]"```-**选项 2:从源码安装(用于开发)**+### 选项 2:从源码安装(用于开发)****前置要求**@@ -47,38 +47,8 @@ uv venv --python 3.11source .venv/bin/activate # macOS/Linux# .venv\Scripts\activate # Windows-# 安装依赖(最小化)+# 安装(包含所有功能)uv pip install -e ".[bot]"--# 或安装包含可选功能-uv pip install -e ".[bot,bot-langfuse,bot-telegram]"-```--### 可选依赖--只安装你需要的功能:--| 功能组 | 安装命令 | 描述 |-|---------------|-----------------|-------------|-| **完整版** | `uv pip install -e ".[bot-full]"` | 包含所有功能 |-| **Langfuse** | `uv pip install -e ".[bot-langfuse]"` | LLM 可观测性和追踪 |-| **FUSE** | `uv pip install -e ".[bot-fuse]"` | OpenViking 文件系统挂载 |-| **沙箱** | `uv pip install -e ".[bot-sandbox]"` | 代码执行沙箱 |-| **OpenCode** | `uv pip install -e ".[bot-opencode]"` | OpenCode AI 集成 |--#### 聊天渠道--| 渠道 | 安装命令 |-|---------|-----------------|-| **Telegram** | `uv pip install -e ".[bot-telegram]"` |-| **飞书/Lark** | `uv pip install -e ".[bot-feishu]"` |-| **钉钉** | `uv pip install -e ".[bot-dingtalk]"` |-| **Slack** | `uv pip install -e ".[bot-slack]"` |-| **QQ** | `uv pip install -e ".[bot-qq]"` |--可以组合多个功能:-```bash-uv pip install -e ".[bot,bot-langfuse,bot-telegram]"```## 🚀 快速开始@@ -461,11 +431,6 @@ cd deploy/docker对于 Langfuse Cloud,使用 `https://cloud.langfuse.com` 作为 `base_url`。-**安装 Langfuse 支持:**-```bash-uv pip install -e ".[bot-langfuse]"-```-**重启 vikingbot:**```bashvikingbot gatewaydiff --git a/bot/docs/vikingbot-langfuse-local-setup.md b/bot/docs/vikingbot-langfuse-local-setup.mdindex 1b6244373..39513a187 100644--- a/bot/docs/vikingbot-langfuse-local-setup.md+++ b/bot/docs/vikingbot-langfuse-local-setup.md@@ -73,18 +73,12 @@ docker-compose -f bot/deploy/docker/langfuse/docker-compose.yml ps## 5. Install Langfuse Python Support-`vikingbot` only sends Langfuse traces when the optional Langfuse dependency is installed.+Langfuse support is already included by default in the `[bot]` installation.-From the repository root, install it with:+If for some reason it's not installed, you can install it with:```bash-uv pip install -e ".[bot,bot-langfuse]"-```--If your environment already has the main bot dependencies installed, the smaller install also works:--```bash-uv pip install -e ".[bot-langfuse]"+uv pip install langfuse>=3.0.0```---@@ -216,7 +210,7 @@ If you use `docker-compose`, replace the command accordingly.Check the following first:-1. `uv pip install -e ".[bot-langfuse]"` or `uv pip install -e ".[bot,bot-langfuse]"` has been run in the active environment+1. Langfuse is installed in the active environment (`langfuse>=3.0.0` required, already included by default with `[bot]`)2. `bot.langfuse.enabled` is `true` in `~/.openviking/ov.conf`3. `secret_key`, `public_key`, and `base_url` match the local deployment values4. `openviking-server --with-bot` was restarted after the config changediff --git a/bot/vikingbot/channels/dingtalk.py b/bot/vikingbot/channels/dingtalk.pyindex dfb290330..9dc32d0dc 100644--- a/bot/vikingbot/channels/dingtalk.py+++ b/bot/vikingbot/channels/dingtalk.py@@ -112,7 +112,7 @@ class DingTalkChannel(BaseChannel):try:if not DINGTALK_AVAILABLE:logger.exception(- "DingTalk Stream SDK not installed. Install with: uv pip install 'openviking[bot-dingtalk]' (or uv pip install -e \".[bot-dingtalk]\" for local dev)"+ "DingTalk Stream SDK not installed. Install with: uv pip install dingtalk-stream>=0.4.0")returndiff --git a/bot/vikingbot/channels/feishu.py b/bot/vikingbot/channels/feishu.pyindex 02a24ceb6..741381b29 100644--- a/bot/vikingbot/channels/feishu.py+++ b/bot/vikingbot/channels/feishu.py@@ -317,7 +317,7 @@ class FeishuChannel(BaseChannel):"""Start the Feishu bot with WebSocket long connection."""if not FEISHU_AVAILABLE:logger.exception(- "Feishu SDK not installed. Install with: uv pip install 'openviking[bot-feishu]' (or uv pip install -e \".[bot-feishu]\" for local dev)"+ "Feishu SDK not installed. Install with: uv pip install lark-oapi>=1.0.0")returndiff --git a/bot/vikingbot/channels/qq.py b/bot/vikingbot/channels/qq.pyindex 681da028d..527fb931c 100644--- a/bot/vikingbot/channels/qq.py+++ b/bot/vikingbot/channels/qq.py@@ -60,7 +60,7 @@ class QQChannel(BaseChannel):"""Start the QQ bot."""if not QQ_AVAILABLE:logger.exception(- "QQ SDK not installed. Install with: uv pip install 'openviking[bot-qq]' (or uv pip install -e \".[bot-qq]\" for local dev)"+ "QQ SDK not installed. Install with: uv pip install qq-botpy>=1.0.0")returndiff --git a/bot/vikingbot/config/loader.py b/bot/vikingbot/config/loader.pyindex 1cf198877..f4ae8fdf1 100644--- a/bot/vikingbot/config/loader.py+++ b/bot/vikingbot/config/loader.py@@ -444,7 +444,14 @@ def validate_openviking_auth(config: Config) -> None:auth_mode = _ov_server_auth_mode(ov_server)- health = _request_openviking_json(server_url, "/health")+ # Build headers with API key if configured+ # Public gateways like Volcengine VikingDB require X-API-Key on every request+ headers: dict[str, str] = {}+ api_key = getattr(ov_server, "api_key", None)+ if api_key:+ headers["X-API-Key"] = api_key++ health = _request_openviking_json(server_url, "/health", headers=headers)if not health.ok:_server_unavailable_warning(server_url, health)returndiff --git a/bot/vikingbot/integrations/langfuse.py b/bot/vikingbot/integrations/langfuse.pyindex 344689167..1fbe7e0f8 100644--- a/bot/vikingbot/integrations/langfuse.py+++ b/bot/vikingbot/integrations/langfuse.py@@ -41,7 +41,7 @@ class LangfuseClient:if Langfuse is None:logger.warning(- 'Langfuse not installed. Install with: uv pip install openviking[bot-langfuse] (or uv pip install -e ".[bot-langfuse]" for local dev). Configure in ~/.openviking/ov.conf under bot.langfuse'+ 'Langfuse not installed. Install with: uv pip install langfuse>=3.0.0. Configure in ~/.openviking/ov.conf under bot.langfuse')self.enabled = Falsereturndiff --git a/bot/vikingbot/openviking_mount/viking_fuse.py b/bot/vikingbot/openviking_mount/viking_fuse.pyindex 8714af23a..68792da13 100644--- a/bot/vikingbot/openviking_mount/viking_fuse.py+++ b/bot/vikingbot/openviking_mount/viking_fuse.py@@ -477,7 +477,7 @@ else:def mount_fuse(*args, **kwargs):raise ImportError(- "fusepy and libfuse are required. Install with: uv pip install 'openviking[bot-fuse]' (or uv pip install -e \".[bot-fuse]\" for local dev) and install libfuse system package"+ "fusepy and libfuse are required. Install with: uv pip install fusepy>=3.0.1 and install libfuse system package")class FUSEMountManager:diff --git a/bot/vikingbot/sandbox/backends/aiosandbox.py b/bot/vikingbot/sandbox/backends/aiosandbox.pyindex 85d27e01d..525fb4082 100644--- a/bot/vikingbot/sandbox/backends/aiosandbox.py+++ b/bot/vikingbot/sandbox/backends/aiosandbox.py@@ -34,7 +34,7 @@ class AioSandboxBackend(SandboxBackend):logger.info("[AioSandbox] Connected successfully")except ImportError:logger.error(- "agent-sandbox SDK not installed. Install with: uv pip install 'openviking[bot-sandbox]' (or uv pip install -e \".[bot-sandbox]\" for local dev)"+ "agent-sandbox SDK not installed. Install with: uv pip install agent-sandbox>=0.0.23")raiseexcept Exception as e:diff --git a/bot/vikingbot/sandbox/backends/opensandbox.py b/bot/vikingbot/sandbox/backends/opensandbox.pyindex 4ef1d76af..cd54893ba 100644--- a/bot/vikingbot/sandbox/backends/opensandbox.py+++ b/bot/vikingbot/sandbox/backends/opensandbox.py@@ -204,7 +204,7 @@ class OpenSandboxBackend(SandboxBackend):except ImportError:logger.error(- "opensandbox SDK not installed. Install with: uv pip install 'openviking[bot-sandbox]' (or uv pip install -e \".[bot-sandbox]\" for local dev)"+ "opensandbox SDK not installed. Install with: uv pip install opensandbox>=0.1.0 opensandbox-server>=0.1.0")raiseexcept Exception as e:diff --git a/docs/en/guides/01-configuration.md b/docs/en/guides/01-configuration.mdindex 6216b4ec4..72b47a97b 100644--- a/docs/en/guides/01-configuration.md+++ b/docs/en/guides/01-configuration.md@@ -745,7 +745,7 @@ Configuration for Feishu/Lark cloud document parsing. See [Resources](../api/02-| `max_rows_per_sheet` | int | Maximum rows to import per spreadsheet sheet (default: `1000`) || `max_records_per_table` | int | Maximum records to import per bitable table (default: `1000`) |-**Dependency**: `pip install 'openviking[bot-feishu]'`+**Dependency**: Included by default in `openviking[bot]` installation**Lark international**: For Lark URLs (`*.larksuite.com`), set `domain` to `https://open.larksuite.com`.diff --git a/docs/zh/guides/01-configuration.md b/docs/zh/guides/01-configuration.mdindex db299bb09..5836af4da 100644--- a/docs/zh/guides/01-configuration.md+++ b/docs/zh/guides/01-configuration.md@@ -716,7 +716,7 @@ ollama pull guoxuter/ov_intent_analysis_sft:v7_q8| `max_rows_per_sheet` | int | 电子表格每个 sheet 最大导入行数(默认 `1000`) || `max_records_per_table` | int | 多维表格每个表最大导入记录数(默认 `1000`) |-**依赖**:`pip install 'openviking[bot-feishu]'`+**依赖**:已默认包含在 `openviking[bot]` 安装中**Lark 国际版**:对于 Lark URL(`*.larksuite.com`),请将 `domain` 设为 `https://open.larksuite.com`。diff --git a/openviking/parse/accessors/feishu_accessor.py b/openviking/parse/accessors/feishu_accessor.pyindex 16f561c02..749b79b2e 100644--- a/openviking/parse/accessors/feishu_accessor.py+++ b/openviking/parse/accessors/feishu_accessor.py@@ -7,7 +7,7 @@ Fetches Feishu/Lark cloud documents using the lark-oapi SDK.This is the DataAccessor layer extracted from FeishuParser.Note: This accessor requires the `lark-oapi` package.-Install with: pip install 'openviking[bot-feishu]'+Included by default in `openviking[bot]` installation."""import os@@ -319,8 +319,8 @@ class FeishuAccessor(DataAccessor):import lark_oapi as larkexcept ImportError:raise ImportError(- "lark-oapi is required for Feishu document parsing. "- "Install it with: pip install 'openviking[bot-feishu]'"+ "lark-oapi is required for Feishu document parsing. "+ "Install it with: pip install lark-oapi>=1.0.0")config = self._get_config()app_id = config.app_id or os.getenv("FEISHU_APP_ID", "")diff --git a/openviking/parse/parsers/feishu.py b/openviking/parse/parsers/feishu.pyindex 12f1c9176..dfa8ef732 100644--- a/openviking/parse/parsers/feishu.py+++ b/openviking/parse/parsers/feishu.py@@ -221,7 +221,7 @@ class FeishuParser(BaseParser):except ImportError:raise ImportError("lark-oapi is required for Feishu document parsing. "- "Install it with: pip install 'openviking[bot-feishu]'"+ "Install it with: pip install lark-oapi>=1.0.0")config = self._get_config()app_id = config.app_id or os.getenv("FEISHU_APP_ID", "")diff --git a/openviking/resource/feishu_watch_auth.py b/openviking/resource/feishu_watch_auth.pyindex 68d91ee72..071be63c1 100644--- a/openviking/resource/feishu_watch_auth.py+++ b/openviking/resource/feishu_watch_auth.py@@ -140,7 +140,7 @@ class FeishuOAuthClient:except ImportError as exc:raise FeishuTokenRefreshError("lark-oapi is required to refresh Feishu user tokens. "- "Install it with: pip install 'openviking[bot-feishu]'",+ "Install it with: pip install lark-oapi>=1.0.0",permanent=True,) from exc@@ -197,7 +197,7 @@ class FeishuOAuthClient:except ImportError as exc:raise FeishuTokenRefreshError("lark-oapi is required to refresh Feishu user tokens. "- "Install it with: pip install 'openviking[bot-feishu]'",+ "Install it with: pip install lark-oapi>=1.0.0",permanent=True,) from excdiff --git a/openviking_cli/utils/config/ovcli_config.py b/openviking_cli/utils/config/ovcli_config.pyindex bc4c49d8b..52a7f9edb 100644--- a/openviking_cli/utils/config/ovcli_config.py+++ b/openviking_cli/utils/config/ovcli_config.py@@ -34,6 +34,7 @@ class OVCLIConfig(BaseModel):agent_id: Optional[str] = Nonetimeout: float = 60.0profile: bool = False+ echo_command: Optional[bool] = Noneupload: Optional[OVCLIUploadConfig] = Noneextra_headers: Optional[Dict[str, str]] = Nonediff --git a/pyproject.toml b/pyproject.tomlindex c5504b455..12f07a242 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -138,7 +138,7 @@ build = ["wheel","build",]-# vikingbot core dependencies+# vikingbot - all features includedbot = ["pydantic-settings>=2.0.0","websockets>=12.0",@@ -160,23 +160,18 @@ bot = ["gradio>=6.6.0","py-machineid>=1.0.0","mcp>=1.0.0",-]-# vikingbot optional features-bot-langfuse = ["langfuse>=3.0.0"]-bot-telegram = ["python-telegram-bot[socks]>=21.0"]-bot-feishu = ["lark-oapi>=1.0.0"]-bot-dingtalk = ["dingtalk-stream>=0.4.0"]-bot-slack = ["slack-sdk>=3.26.0"]-bot-qq = ["qq-botpy>=1.0.0"]-bot-sandbox = [+ # All optional features included by default+ "langfuse>=3.0.0",+ "python-telegram-bot[socks]>=21.0",+ "lark-oapi>=1.0.0",+ "dingtalk-stream>=0.4.0",+ "slack-sdk>=3.26.0",+ "qq-botpy>=1.0.0","opensandbox>=0.1.0","opensandbox-server>=0.1.0","agent-sandbox>=0.0.23",-]-bot-fuse = ["fusepy>=3.0.1"]-bot-opencode = ["opencode-ai>=0.1.0a0"]-bot-full = [- "openviking[bot,bot-langfuse,bot-telegram,bot-feishu,bot-dingtalk,bot-slack,bot-qq,bot-sandbox,bot-fuse,bot-opencode]",+ "fusepy>=3.0.1",+ "opencode-ai>=0.1.0a0",]benchmark = ["langchain>=1.0.0",