Home
Softono
v

volcengine

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
3

Software by volcengine

OpenViking
Open Source

OpenViking

<div align="center"> <a href="https://openviking.ai/" target="_blank"> <picture> <img alt="OpenViking" src="docs/images/ov-logo.png" width="200px" height="auto"> </picture> </a> ### OpenViking: The Context Database for AI Agents English / [中文](README_CN.md) / [日本語](README_JA.md) <a href="https://www.openviking.ai">Website</a> · <a href="https://github.com/volcengine/OpenViking">GitHub</a> · <a href="https://github.com/volcengine/OpenViking/issues">Issues</a> · <a href="./docs">Docs</a> [![](https://img.shields.io/github/v/release/volcengine/OpenViking?color=369eff\&labelColor=black\&logo=github\&style=flat-square)](https://github.com/volcengine/OpenViking/releases) [![](https://img.shields.io/github/stars/volcengine/OpenViking?labelColor\&style=flat-square\&color=ffcb47)](https://github.com/volcengine/OpenViking) [![](https://img.shields.io/github/issues/volcengine/OpenViking?labelColor=black\&style=flat-square\&color=ff80eb)](https://github.com/volcengine/OpenViking/issues) [![](https://img.shields.io/github/contributors/volcengine/OpenViking?color=c4f042\&labelColor=black\&style=flat-square)](https://github.com/volcengine/OpenViking/graphs/contributors) [![](https://img.shields.io/badge/license-AGPLv3-white?labelColor=black\&style=flat-square)](https://github.com/volcengine/OpenViking/blob/main/LICENSE) [![](https://img.shields.io/github/last-commit/volcengine/OpenViking?color=c4f042\&labelColor=black\&style=flat-square)](https://github.com/volcengine/OpenViking/commits/main) 👋 Join our Community 📱 <a href="./docs/en/about/01-about-us.md#lark-group">Lark Group</a> · <a href="./docs/en/about/01-about-us.md#wechat-group">WeChat</a> · <a href="https://discord.com/invite/eHvx8E9XF3">Discord</a> · <a href="https://x.com/openvikingai">X</a> <a href="https://trendshift.io/repositories/19668" target="_blank"><img src="https://trendshift.io/api/badge/repositories/19668" alt="volcengine%2FOpenViking | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </div> *** ✨ **May 2026 Update**: Updated OpenViking benchmark results across User Memory, Agent Memory, and Knowledge Base QA scenarios. → See [Evaluation Highlights](#evaluation-highlights). ## Overview ### Challenges in Agent Development In the AI era, data is abundant, but high-quality context is hard to come by. When building AI Agents, developers often face these challenges: - **Fragmented Context**: Memories are in code, resources are in vector databases, and skills are scattered, making them difficult to manage uniformly. - **Surging Context Demand**: An Agent's long-running tasks produce context at every execution. Simple truncation or compression leads to information loss. - **Poor Retrieval Effectiveness**: Traditional RAG uses flat storage, lacking a global view and making it difficult to understand the full context of information. - **Unobservable Context**: The implicit retrieval chain of traditional RAG is like a black box, making it hard to debug when errors occur. - **Limited Memory Iteration**: Current memory is just a record of user interactions, lacking Agent-related task memory. ### The OpenViking Solution **OpenViking** is an open-source **Context Database** designed specifically for AI Agents. We aim to define a minimalist context interaction paradigm for Agents, allowing developers to completely say goodbye to the hassle of context management. OpenViking abandons the fragmented vector storage model of traditional RAG and innovatively adopts a **"file system paradigm"** to unify the structured organization of memories, resources, and skills needed by Agents. With OpenViking, developers can build an Agent's brain just like managing local files: - **Filesystem Management Paradigm** → **Solves Fragmentation**: Unified context management of memories, resources, and skills based on a filesystem paradigm. - **Tiered Context Loading** → **Reduces Token Consumption**: L0/L1/L2 three-tier structure, loaded on demand, significantly saving costs. - **Directory Recursive Retrieval** → **Improves Retrieval Effect**: Supports native filesystem retrieval methods, combining directory positioning with semantic search to achieve recursive and precise context acquisition. - **Visualized Retrieval Trajectory** → **Observable Context**: Supports visualization of directory retrieval trajectories, allowing users to clearly observe the root cause of issues and guide retrieval logic optimization. - **Automatic Session Management** → **Context Self-Iteration**: Automatically compresses content, resource references, tool calls, etc., in conversations, extracting long-term memory, making the Agent smarter with use. ## Quick Start ### Local Deployment #### Prerequisites Before starting with OpenViking, please ensure your environment meets the following requirements: - **Python Version**: 3.10 or higher - **Rust Toolchain**: Cargo (Required for building RAGFS and CLI components from source) - **C++ Compiler**: GCC 9+ or Clang 11+ (Required for building core extensions) - **Operating System**: Linux, macOS, Windows - **Network Connection**: A stable network connection is required (for downloading dependencies and accessing model services) #### 1. Installation ##### Python Package ```bash pip install openviking --upgrade --force-reinstall ``` ##### Rust CLI (Optional) ```bash npm i -g @openviking/cli ``` Or build from source: ```bash cargo install --git https://github.com/volcengine/OpenViking ov_cli ``` #### 2. Model Preparation OpenViking requires the following model capabilities: - **VLM Model**: For image and content understanding - **Embedding Model**: For vectorization and semantic retrieval ##### Supported VLM Providers OpenViking supports multiple VLM providers: | Provider | Description | Setup | | -------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `volcengine` | Volcengine Doubao Models | [Volcengine Console](https://console.volcengine.com/ark/region:ark+cn-beijing/overview?briefPage=0\&briefType=introduce\&type=new\&utm_content=OpenViking\&utm_medium=devrel\&utm_source=OWO\&utm_term=OpenViking) | | `openai` | OpenAI Official API | [OpenAI Platform](https://platform.openai.com) | | `openai-codex` | Codex VLM | Use `openviking-server init` | | `kimi` | Kimi Code Membership | Use `openviking-server init` | | `glm` | GLM Coding Plan | Use `openviking-server init` | ##### Provider-Specific Notes <details> <summary><b>Volcengine (Doubao)</b></summary> Volcengine supports both model names and endpoint IDs. Using model names is recommended for simplicity: ```json { "vlm": { "provider": "volcengine", "model": "doubao-seed-2-0-pro-260215", "api_key": "your-api-key", "api_base": "https://ark.cn-beijing.volces.com/api/v3" } } ``` You can also use endpoint IDs (found in [Volcengine ARK Console](https://console.volcengine.com/ark/region:ark+cn-beijing/overview?briefPage=0\&briefType=introduce\&type=new\&utm_content=OpenViking\&utm_medium=devrel\&utm_source=OWO\&utm_term=OpenViking): ```json { "vlm": { "provider": "volcengine", "model": "ep-20241220174930-xxxxx", "api_key": "your-api-key", "api_base": "https://ark.cn-beijing.volces.com/api/v3" } } ``` </details> <details> <summary><b>OpenAI</b></summary> Use OpenAI's official API: ```json { "vlm": { "provider": "openai", "model": "gpt-4o", "api_key": "your-api-key", "api_base": "https://api.openai.com/v1" } } ``` You can also use a custom OpenAI-compatible endpoint: ```json { "vlm": { "provider": "openai", "model": "gpt-4o", "api_key": "your-api-key", "api_base": "https://your-custom-endpoint.com/v1" } } ``` </details> <details> <summary><b>OpenAI Codex (OAuth)</b></summary> Use this provider when you want OpenViking to call Codex VLM through your ChatGPT/Codex OAuth session instead of a standard OpenAI API key: ```bash openviking-server init # choose OpenAI Codex when prompted openviking-server doctor ``` ```json { "vlm": { "provider": "openai-codex", "model": "gpt-5.3-codex", "api_base": "https://chatgpt.com/backend-api/codex", "temperature": 0.0, "max_retries": 2 } } ``` > 💡 **Tip**: > > - `openai-codex` does not require `vlm.api_key` when Codex OAuth is available > - OpenViking stores its own Codex auth state at `~/.openviking/codex_auth.json` > - `openviking-server doctor` validates that the current Codex auth is usable </details> <details> <summary><b>Kimi Coding (Subscription)</b></summary> Use this provider when you want OpenViking to call the dedicated Kimi Coding subscription endpoint directly: ```bash openviking-server init # choose Kimi Coding when prompted openviking-server doctor ``` ```json { "vlm": { "provider": "kimi", "model": "kimi-code", "api_key": "your-kimi-subscription-api-key", "api_base": "https://api.kimi.com/coding", "temperature": 0.0, "max_retries": 2 } } ``` > 💡 **Tip**: > > - `kimi` applies the recommended Kimi Coding defaults automatically, including the default Kimi Coding user agent > - `kimi-code` and `kimi-coding` are accepted aliases for the provider name > - `kimi-code` is normalized to Kimi's upstream coding model automatically </details> <details> <summary><b>GLM Coding Plan (Subscription)</b></summary> Use this provider when you want OpenViking to call Z.AI's OpenAI-compatible Coding Plan endpoint directly: ```bash openviking-server init # choose GLM Coding Plan when prompted openviking-server doctor ``` ```json { "vlm": { "provider": "glm", "model": "glm-4.6v", "api_key": "your-zai-api-key", "api_base": "https://api.z.ai/api/coding/paas/v4", "temperature": 0.0, "max_retries": 2 } } ``` > 💡 **Tip**: > > - `glm`, `zhipu`, `zai`, `z-ai`, and `z.ai` all resolve to the same first-class GLM provider > - The default endpoint is the Coding Plan endpoint, not the general Z.AI endpoint > - Use a vision-capable model such as `glm-4.6v` or `glm-5v-turbo` for multimodal parsing </details> #### 3. Environment Configuration ##### Quick Setup for Local Models (Ollama) If you want to run OpenViking with local models via [Ollama](https://ollama.ai), the interactive setup wizard handles everything automatically: ```bash openviking-server init ``` The wizard will: - Detect and install Ollama if needed - Recommend and pull suitable embedding and VLM models for your hardware - Generate a ready-to-use `ov.conf` configuration file To validate your setup at any time: ```bash openviking-server doctor ``` `doctor` checks local prerequisites (config file, Python version, embedding/VLM provider connectivity, disk space) without requiring a running server. > For cloud API providers (Volcengine, OpenAI, Gemini, etc.), continue with the manual configuration below. ##### Server Configuration Template The recommended first-time flow is: ```bash openviking-server init openviking-server doctor ``` If you choose `OpenAI Codex` inside `openviking-server init`, the wizard can import existing Codex auth or start the Codex sign-in flow for you. If you prefer manual configuration, create `~/.openviking/ov.conf`, remove the comments before copy: ```json { "storage": { "workspace": "/home/your-name/openviking_workspace" }, "log": { "level": "INFO", "output": "stdout" // Log output: "stdout" or "file" }, "embedding": { "dense": { "api_base" : "<api-endpoint>", // API endpoint address "api_key" : "<your-api-key>", // Model service API Key "provider" : "<provider-type>", // Provider type: "volcengine" or "openai" (currently supported) "dimension": 1024, // Vector dimension "model" : "<model-name>" // Embedding model name (e.g., doubao-embedding-vision-251215 or text-embedding-3-large) }, "max_concurrent": 10, // Max concurrent embedding requests (default: 10) "text_source": "content_only", // Text file vectorization source: content_only|summary_first|summary_only "max_input_tokens": 4096 // Max estimated raw text tokens sent to embedding }, "vlm": { "api_base" : "<api-endpoint>", // API endpoint address "api_key" : "<your-api-key>", // Model service API Key (optional for openai-codex) "provider" : "<provider-type>", // Provider type (volcengine, openai, openai-codex, kimi, glm, etc.) "model" : "<model-name>", // VLM model name (e.g., doubao-seed-2-0-pro-260215 or gpt-4-vision-preview) "max_concurrent": 64 // Max concurrent LLM calls for semantic processing (default: 64) } } ``` > **Note**: For embedding models, supported providers are `volcengine` (Doubao), `openai`, `azure`, `jina`, `ollama`, `voyage`, `dashscope`, `minimax`, `cohere`, `vikingdb`, `gemini` (requires `pip install "google-genai>=1.0.0"`), `litellm`, and `local`. For VLM models, common providers include `volcengine`, `openai`, `openai-codex`, `kimi`, and `glm`. ##### Server Configuration Examples 👇 Expand to see the configuration example for your model service: <details> <summary><b>Example 1: Using Volcengine (Doubao Models)</b></summary> ```json { "storage": { "workspace": "/home/your-name/openviking_workspace" }, "log": { "level": "INFO", "output": "stdout" // Log output: "stdout" or "file" }, "embedding": { "dense": { "api_base" : "https://ark.cn-beijing.volces.com/api/v3", "api_key" : "your-volcengine-api-key", "provider" : "volcengine", "dimension": 1024, "model" : "doubao-embedding-vision-251215" }, "max_concurrent": 10 }, "vlm": { "api_base" : "https://ark.cn-beijing.volces.com/api/v3", "api_key" : "your-volcengine-api-key", "provider" : "volcengine", "model" : "doubao-seed-2-0-pro-260215", "max_concurrent": 64 } } ``` </details> <details> <summary><b>Example 2: Using OpenAI Models</b></summary> ```json { "storage": { "workspace": "/home/your-name/openviking_workspace" }, "log": { "level": "INFO", "output": "stdout" // Log output: "stdout" or "file" }, "embedding": { "dense": { "api_base" : "https://api.openai.com/v1", "api_key" : "your-openai-api-key", "provider" : "openai", "dimension": 3072, "model" : "text-embedding-3-large" }, "max_concurrent": 10 }, "vlm": { "api_base" : "https://api.openai.com/v1", "api_key" : "your-openai-api-key", "provider" : "openai", "model" : "gpt-4-vision-preview", "max_concurrent": 64 } } ``` </details> <details> <summary><b>Example 3: Using Google Gemini Embedding</b></summary> Install the required package first: ```bash pip install "google-genai>=1.0.0" ``` ```json { "storage": { "workspace": "/home/your-name/openviking_workspace" }, "embedding": { "dense": { "provider": "gemini", "api_key": "your-google-api-key", "model": "gemini-embedding-2-preview", "dimension": 3072 }, "max_concurrent": 10 }, "vlm": { "api_base" : "https://api.openai.com/v1", "api_key" : "your-openai-api-key", "provider" : "openai", "model" : "gpt-4o", "max_concurrent": 64 } } ``` Get your Google API key at <https://aistudio.google.com/apikey> </details> <details> <summary><b>Example 4: Using Volcengine Embedding + Codex VLM</b></summary> Use `openviking-server init` and choose `OpenAI Codex`, then run `openviking-server doctor`. ```json { "storage": { "workspace": "/home/your-name/openviking_workspace" }, "embedding": { "dense": { "api_base" : "https://ark.cn-beijing.volces.com/api/v3", "api_key" : "your-volcengine-api-key", "provider" : "volcengine", "dimension": 1024, "model" : "doubao-embedding-vision-251215" } }, "vlm": { "api_base" : "https://chatgpt.com/backend-api/codex", "provider" : "openai-codex", "model" : "gpt-5.3-codex", "max_concurrent": 64 } } ``` </details> ##### Set Server Configuration Environment Variable After creating the configuration file, set the environment variable to point to it (Linux/macOS): ```bash export OPENVIKING_CONFIG_FILE=~/.openviking/ov.conf # by default ``` On Windows, use one of the following: PowerShell: ```powershell $env:OPENVIKING_CONFIG_FILE = "$HOME/.openviking/ov.conf" ``` Command Prompt (cmd.exe): ```bat set "OPENVIKING_CONFIG_FILE=%USERPROFILE%\.openviking\ov.conf" ``` > 💡 **Tip**: You can also place the configuration file in other locations, just specify the correct path in the environment variable. ##### CLI/Client Configuration Examples You can initialize the configuration of the CLI/client interactively through the `ov config` command. If you have multiple openviking servers, you can also switch to other configurations using the `ov config switch` command. 👇 Expand to see the configuration example for your CLI/Client: <details> <summary><b>Example: ovcli.conf for visiting localhost server</b></summary> ```json { "url": "http://localhost:1933", "timeout": 60.0 } ``` After creating the configuration file, set the environment variable to point to it (Linux/macOS): ```bash export OPENVIKING_CLI_CONFIG_FILE=~/.openviking/ovcli.conf # by default ``` On Windows, use one of the following: PowerShell: ```powershell $env:OPENVIKING_CLI_CONFIG_FILE = "$HOME/.openviking/ovcli.conf" ``` Command Prompt (cmd.exe): ```bat set "OPENVIKING_CLI_CONFIG_FILE=%USERPROFILE%\.openviking\ovcli.conf" ``` </details> #### 4. Run Your First Example > 📝 **Prerequisite**: Ensure you have completed the configuration (ov.conf and ovcli.conf) in the previous step. Now let's run a complete example to experience the core features of OpenViking. ##### Launch Server ```bash openviking-server doctor openviking-server ``` If you configured `provider=openai-codex`, `openviking-server doctor` already validates Codex auth. or you can run in background ```bash nohup openviking-server > /data/log/openviking.log 2>&1 & ``` ##### Run the CLI ```bash ov status ov add-resource https://github.com/volcengine/OpenViking # --wait ov ls viking://resources/ ov tree viking://resources/volcengine -L 2 # wait some time for semantic processing if not --wait ov find "what is openviking" ov grep "openviking" --uri viking://resources/volcengine/OpenViking/docs/zh ``` Congratulations! You have successfully run OpenViking 🎉 ### Commercial Access OpenViking Personal is now officially available. Compared with the open-source edition, the Service version is officially hosted and ready to use, scales far beyond local hardware with VikingDB, and comes with richer integrations plus professional support. It includes a free trial for up to 50 files, and existing open-source users can move over smoothly with our migration tool. ### VikingBot Quick Start VikingBot is an AI agent framework built on top of OpenViking. Here's how to get started: ```bash # Option 1: Install VikingBot from PyPI (recommended for most users) pip install "openviking[bot]" # Option 2: Install VikingBot from source (for development) uv pip install -e ".[bot]" # Start OpenViking server with Bot enabled openviking-server --with-bot # In another terminal, start interactive chat ov chat ``` If you use the official Docker image, `vikingbot` is already bundled in the image and starts by default together with the OpenViking server and console UI. You can disable it at runtime with either `--without-bot` or `-e OPENVIKING_WITH_BOT=0`. *** ## Server Deployment Details For production environments, we recommend running OpenViking as a standalone HTTP service to provide persistent, high-performance context support for your AI Agents. 🚀 **Deploy OpenViking on Cloud**: To ensure optimal storage performance and data security, we recommend deploying on **Volcengine Elastic Compute Service (ECS)** using the **veLinux** operating system. We have prepared a detailed step-by-step guide to get you started quickly. 👉 **[View: Server Deployment & ECS Setup Guide](./docs/en/getting-started/03-quickstart-server.md)** --- ## Evaluation Highlights OpenViking 0.3.22 has been evaluated across three scenarios: long-conversation user memory, agent experience memory, and knowledge-base QA. ### 1. User Memory on LoCoMo On the LoCoMo benchmark, OpenViking improves long-context QA accuracy while reducing both latency and token usage across multiple agent integrations: | Integration | Accuracy | Avg. Query Time | Total Input Tokens | |:-----------:|---------:|----------------:|-------------------:| | OpenClaw + native memory | 24.20% | 95.14s | 392,559,404 | | OpenClaw + OpenViking | **82.08%** | 38.8s | 37,423,456 | | Hermes native memory | 33.38% | 82.4s | 79,228,398 | | Hermes + OpenViking | **82.86%** | **27.9s** | 52,026,755 | | Claude Code auto-memory | 57.21% | 49.1s | 353,306,422 | | Claude Code + OpenViking | **80.32%** | **20.4s** | 129,968,899 | #### 1.1 Key Efficiency Improvements | Agent | Accuracy Improvement | Latency Reduction | Token Reduction | |:-----:|---------------------:|------------------:|----------------:| | OpenClaw | 24.20% → 82.08% (+3.39×) | -59.22% | **-91.0%** | | Hermes | 33.38% → 82.86% (+2.48×) | -66.10% | -34.3% | | Claude Code | 57.21% → 80.32% (+1.40×) | -58.45% | -63.2% | ### 2. Agent Experience Memory on tau2-bench For multi-turn agent tasks on tau2-bench, OpenViking's experience memory improves task success in both retail and airline domains: | Setting | Retail Accuracy | Airline Accuracy | |:-------:|----------------:|-----------------:| | LLM without memory | 70.94% | 54.38% | | LLM + OpenViking experience memory | **77.81%** (+6.87pp) | **66.25%** (+11.87pp) | ### 3. Knowledge Base QA on HotpotQA On multi-hop RAG tasks from HotpotQA, increasing OpenViking retrieval from top-5 to top-20 delivers the highest accuracy in this comparison while keeping retrieval latency low: | Method | Retrieval Pattern | Accuracy | Tokens / QA | Latency / QA | |:------:|:-----------------:|---------:|------------:|-------------:| | Naive RAG | Vector retrieval | 62.50% | 1,290 | **0.11s** | | HippoRAG 2 | Vector + knowledge graph | 61.00% | 726 | 20s | | LightRAG | Vector + knowledge graph | 89.00% | 28,443 | 75s | | LangChain SQL (Agent) | SQL agent | 78.00% | 4,776 | 132s | | OpenViking (top-5) | Vector retrieval | 72.75% | 3,154 | 0.22s | | OpenViking (top-20) | Vector retrieval | **91.00%** | 12,533 | 0.23s | | Nanobot + OpenViking (Agent) | Vector retrieval + Agent | 87.00% | 71,300 | 61.6s | #### 3.1 Single-turn RAG Across 5 Open-source Datasets | Method | Retrieval Pattern | Average Accuracy | Indexing Tokens | Tokens / QA | Retrieval Latency | |:------:|:-----------------:|-----------------:|----------------:|------------:|------------------:| | Naive RAG | Vector retrieval | 53.93% | 2,755,356 | 1,435 | **0.13s** | | PageIndex | Vector + tree structure | 36.75% | 5,609,206 | 710,480 | 84.60s | | HippoRAG 2 | Vector + knowledge graph | 44.50% | 124,963,618 | **637** | 18.83s | | LightRAG | Vector + knowledge graph | **76.00%** | 62,705,469 | 27,035 | 9.19s | | **OpenViking** | **Vector retrieval** | **66.87%** | **8,671,538** | **3,060** | **0.19s** | > Datasets: FinanceBench, NaturalQuestions, ClapNQ, Qasper, and SyllabusQA. OpenViking reaches 66.87% average accuracy with very low retrieval latency (0.19s), while indexing cost is only 13.8% of LightRAG. --- ## Academic Backing OpenViking open-sources a subset of the core capabilities described in the `VikingMem` paper, making the context database and memory management ideas accessible to AI agent developers. > **VikingMem: A Memory Base Management System for Stateful LLM-based Applications** > Jiajie Fu, Junwen Chen, Mengzhao Wang, Aoxiang He, Maojia Sheng, Xiangyu Ke, Yifan Zhu, and Yunjun Gao. > arXiv:2605.29640, 2026. Accepted by VLDB 2026. > > 📄 [Read the paper on arXiv](https://arxiv.org/abs/2605.29640) ## Core Concepts After running the first example, let's dive into the design philosophy of OpenViking. These five core concepts correspond one-to-one with the solutions mentioned earlier, together building a complete context management system: ### 1. Filesystem Management Paradigm → Solves Fragmentation We no longer view context as flat text slices but unify them into an abstract virtual filesystem. Whether it's memories, resources, or capabilities, they are mapped to virtual directories under the `viking://` protocol, each with a unique URI. This paradigm gives Agents unprecedented context manipulation capabilities, enabling them to locate, browse, and manipulate information precisely and deterministically through standard commands like `ls` and `find`, just like a developer. This transforms context management from vague semantic matching into intuitive, traceable "file operations". Learn more: [Viking URI](./docs/en/concepts/04-viking-uri.md) | [Context Types](./docs/en/concepts/02-context-types.md) ``` viking:// ├── resources/ # Resources: project docs, repos, web pages, etc. │ ├── my_project/ │ │ ├── docs/ │ │ │ ├── api/ │ │ │ └── tutorials/ │ │ └── src/ │ └── ... ├── user/ # User: personal preferences, habits, etc. │ └── memories/ │ ├── preferences/ │ │ ├── writing_style │ │ └── coding_habits │ └── ... └── agent/ # Agent: skills, instructions, task memories, etc. ├── skills/ │ ├── search_code │ ├── analyze_data │ └── ... ├── memories/ └── instructions/ ``` ### 2. Tiered Context Loading → Reduces Token Consumption Stuffing massive amounts of context into a prompt all at once is not only expensive but also prone to exceeding model windows and introducing noise. OpenViking automatically processes context into three levels upon writing: - **L0 (Abstract)**: A one-sentence summary for quick retrieval and identification. - **L1 (Overview)**: Contains core information and usage scenarios for Agent decision-making during the planning phase. - **L2 (Details)**: The full original data, for deep reading by the Agent when absolutely necessary. Learn more: [Context Layers](./docs/en/concepts/03-context-layers.md) ``` viking://resources/my_project/ ├── .abstract # L0 Layer: Abstract (~100 tokens) - Quick relevance check ├── .overview # L1 Layer: Overview (~2k tokens) - Understand structure and key points ├── docs/ │ ├── .abstract # Each directory has corresponding L0/L1 layers │ ├── .overview │ ├── api/ │ │ ├── .abstract │ │ ├── .overview │ │ ├── auth.md # L2 Layer: Full content - Load on demand │ │ └── endpoints.md │ └── ... └── src/ └── ... ``` ### 3. Directory Recursive Retrieval → Improves Retrieval Effect Single vector retrieval struggles with complex query intents. OpenViking has designed an innovative **Directory Recursive Retrieval Strategy** that deeply integrates multiple retrieval methods: 1. **Intent Analysis**: Generate multiple retrieval conditions through intent analysis. 2. **Initial Positioning**: Use vector retrieval to quickly locate the high-score directory where the initial slice is located. 3. **Refined Exploration**: Perform a secondary retrieval within that directory and update high-score results to the candidate set. 4. **Recursive Drill-down**: If subdirectories exist, recursively repeat the secondary retrieval steps layer by layer. 5. **Result Aggregation**: Finally, obtain the most relevant context to return. This "lock high-score directory first, then refine content exploration" strategy not only finds the semantically best-matching fragments but also understands the full context where the information resides, thereby improving the globality and accuracy of retrieval. Learn more: [Retrieval Mechanism](./docs/en/concepts/07-retrieval.md) ### 4. Visualized Retrieval Trajectory → Observable Context OpenViking's organization uses a hierarchical virtual filesystem structure. All context is integrated in a unified format, and each entry corresponds to a unique URI (like a `viking://` path), breaking the traditional flat black-box management mode with a clear hierarchy that is easy to understand. The retrieval process adopts a directory recursive strategy. The trajectory of directory browsing and file positioning for each retrieval is fully preserved, allowing users to clearly observe the root cause of problems and guide the optimization of retrieval logic. Learn more: [Retrieval Mechanism](./docs/en/concepts/07-retrieval.md) ### 5. Automatic Session Management → Context Self-Iteration OpenViking has a built-in memory self-iteration loop. At the end of each session, developers can actively trigger the memory extraction mechanism. The system will asynchronously analyze task execution results and user feedback, and automatically update them to the User and Agent memory directories. - **User Memory Update**: Update memories related to user preferences, making Agent responses better fit user needs. - **Agent Experience Accumulation**: Extract core content such as operational tips and tool usage experience from task execution experience, aiding efficient decision-making in subsequent tasks. This allows the Agent to get "smarter with use" through interactions with the world, achieving self-evolution. Learn more: [Session Management](./docs/en/concepts/08-session.md) *** ## Advanced Reading ### Documentation For more details, please visit our [Full Documentation](./docs/en/). ### Community & Team For more details, please see: **[About Us](./docs/en/about/01-about-us.md)** ### Join the Community OpenViking is still in its early stages, and there are many areas for improvement and exploration. We sincerely invite every developer passionate about AI Agent technology: - Light up a precious **Star** for us to give us the motivation to move forward. - Visit our **[Website](https://www.openviking.ai)** to understand the philosophy we convey, and use it in your projects via the **[Documentation](https://www.openviking.ai/docs)**. Feel the change it brings and give us feedback on your truest experience. - Join our community to share your insights, help answer others' questions, and jointly create an open and mutually helpful technical atmosphere: - 📱 **Lark Group**: Scan the QR code to join → [View QR Code](./docs/en/about/01-about-us.md#lark-group) - 💬 **WeChat Group**: Scan the QR code to add assistant → [View QR Code](./docs/en/about/01-about-us.md#wechat-group) - 🎮 **Discord**: [Join Discord Server](https://discord.com/invite/eHvx8E9XF3) - 🐦 **X (Twitter)**:[Follow us](https://x.com/openvikingai) - Become a **Contributor**, whether submitting a bug fix or contributing a new feature, every line of your code will be an important cornerstone of OpenViking's growth. Let's work together to define and build the future of AI Agent context management. The journey has begun, looking forward to your participation! ### Star Trend [![Star History Chart](https://api.star-history.com/svg?repos=volcengine/OpenViking\&type=timeline\&legend=top-left)](https://www.star-history.com/#volcengine/OpenViking\&type=timeline\&legend=top-left) ## Security and privacy This project takes security seriously. For vulnerability reporting and supported versions, see [SECURITY.md](SECURITY.md) ## License The OpenViking project uses different licenses for different components: - **Main Project**: AGPLv3 - see the [LICENSE](./LICENSE) file for details - **crates/ov\_cli**: Apache 2.0 - see the [LICENSE](./crates/LICENSE) for details - **examples**: Apache 2.0 - see the [LICENSE](./examples/LICENSE) for details - **third\_party**: Respective original licenses of third-party projects <!-- Link Definitions -->

AI Agents Vector Databases
25.4K Github Stars
MineContext
Open Source

MineContext

<div align="center"> <picture> <img alt="MineContext" src="src/MineContext-Banner.svg" width="100%" height="auto"> </picture> ### MineContext: Create with Context, Clarity from Chaos An open-source, proactive context-aware AI partner, dedicated to bringing clarity and efficiency to your work, study and creation. [中文](README_zh.md) / English <a href="https://bytedance.larkoffice.com/wiki/Hn6ewRnAwiSro7kkH6Sc1DMFnng">Community Best Practice</a> · <a href="https://github.com/volcengine/MineContext/issues">Report Issues</a> · <a href="https://bytedance.larkoffice.com/share/base/form/shrcnPAjJtlufuhBZGegll41NOh">Feedback</a> [![][release-shield]][release-link] [![][github-stars-shield]][github-stars-link] [![][github-issues-shield]][github-issues-shield-link] [![][github-contributors-shield]][github-contributors-link] [![][license-shield]][license-shield-link] [![][last-commit-shield]][last-commit-shield-link] [![][wechat-shield]][wechat-shield-link] <a href="https://trendshift.io/repositories/15157" target="_blank"><img src="https://trendshift.io/api/badge/repositories/15157" alt="volcengine%2FMineContext | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> 👋 Join our [WeChat / Lark / Red Note Group](https://bytedance.larkoffice.com/wiki/Hg6VwrxnTiXtWUkgHexcFTqrnpg) 🌍 Join our [Discord Group](https://discord.gg/tGj7RQ3nUR) <a href="https://github.com/volcengine/MineContext/releases/download/v0.1.8/MineContext-0.1.8.dmg">🖥️ Download for Mac</a> · <a href="https://github.com/volcengine/MineContext/releases/download/v0.1.8/MineContext-0.1.8-setup.exe">💻 Download for Windows</a> </div> Table of Contents - [👋🏻 What is MineContext](#-what-is-minecontext) - [🚀 Key Features](#-key-features) - [🔏 Privacy Protection](#-privacy-protection) - [Local-First](#local-first) - [Local AI model](#local-ai-model) - [🏁 Quick Start](#-quick-start) - [1. Installation](#1-installation) - [2. Enter Your API Key](#2-enter-your-api-key) - [3. Start Recording](#3-start-recording) - [4. Forget it](#4-forget-it) - [5. Backend Debugging](#5-backend-debugging) - [🎃 Contribution Guide](#-contribution-guide) - [🎨 Frontend Architecture](#-frontend-architecture) - [Core Tech Stack](#core-tech-stack) - [Core Architecture](#core-architecture) - [💻 Frontend Usage](#-frontend-usage) - [Build Backend](#build-backend) - [Install Dependencies](#install-dependencies) - [Development and Debugging](#development-and-debugging) - [Application Packaging](#application-packaging) - [🏗️ Backend Architecture](#️-backend-architecture) - [Core Architecture Components](#core-architecture-components) - [Layer Responsibilities](#layer-responsibilities) - [🚀 Backend Usage](#-backend-usage) - [Installation](#installation) - [Configuration](#configuration) - [Running the Server](#running-the-server) - [💎 The Philosophy Behind the Name](#-the-philosophy-behind-the-name) - [🎯 Target User](#-target-user) - [🔌 Context-Source](#-context-source) - [🆚 Comparison with Familiar Application](#-comparison-with-familiar-application) - [MineContext vs ChatGPT Pulse](#minecontext-vs-chatgpt-pulse) - [MineContext vs Dayflow](#minecontext-vs-dayflow) - [👥 Community](#-community) - [Community and Support](#community-and-support) - [Star History](#star-history) - [📃 License](#-license) <br> > **🔗 Related Project**: Check out **[OpenViking](https://github.com/volcengine/OpenViking)** - An open-source Context Database designed for AI Agents. OpenViking unifies Memories, Resources, and Skills through a "file system paradigm", providing the infrastructure layer for sophisticated context management. <br> # 👋🏻 What is MineContext MineContext is a proactive context-aware AI partner. By utilizing screenshots and content comprehension (with future support for multi-source multimodal information including documents, images, videos, code, and external application data), it can see and understand the user's digital world context. Based on an underlying contextual engineering framework, it actively delivers high-quality information such as insights, daily/weekly summaries, to-do lists, and activity records. ![feature.gif](src/feature.gif) # 🚀 Key Features MineContext focuses on four key features: effortless collection, intelligent resurfacing, proactive delivery, and a context engineering architecture. 1. 📥 Effortless Collection Capable of gathering and processing massive amounts of context. Designed storage management enables extensive collection without adding mental burden. 2. 🚀 Proactive Delivery Delivers key information and insights proactively in daily use. It extracts summarized content from your context—such as daily/weekly summaries, tips, and todos—and pushes them directly to your homepage. 3. 💡 Intelligent Resurfacing Surfaces relevant and useful context intelligently during creation. Ensures assisted creativity without overwhelming you with information. 4. 🎯 Context Engineering Architecture Supports the complete lifecycle of multimodal, multi-source data—from capture, processing, and storage to management, retrieval, and consumption—enabling the generation of six types of intelligent context. # 🔏 Privacy Protection ## Local-First MineContext places a high priority on user privacy. By default, all data is stored locally in the following path to ensure your privacy and security. ``` ~/Library/Application Support/MineContext/Data ``` ## Local AI model In addition, we support custom model services based on the OpenAI API protocol. You can use fully local models in MineContext, ensuring that any data does not leave your local environment. # 🏁 Quick Start ## 1. Installation Click [Github Latest Release](https://github.com/volcengine/MineContext/releases) to Download ![Download APP](src/Download-App.gif) > **Note**: Starting from v0.1.5, MineContext supports Apple notarization, so you no longer need to disable the quarantine attribute. If you're using an older version, please refer to the [previous documentation](https://github.com/volcengine/MineContext/blob/0.1.4/README.md) for instructions. ## 2. Enter Your API Key After the application launches, please follow the prompts to enter your API key. (Note: On the first run, the application needs to install the backend environment, which may take about two minutes). We currently support services from Doubao, OpenAI, and custom models. This includes any **local models** or **third-party model** services that are compatible with the OpenAI API format. We recommend using [LMStudio](https://lmstudio.ai/) to run local models. It provides a simple interface and powerful features to help you quickly deploy and manage them. **Considering both cost and performance, we recommend using the Doubao model.** The Doubao API Key can be generated in the [API Management Interface](https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey). After obtaining the Doubao API Key, you need to activate two models in the [Model Activation Management Interface](https://console.volcengine.com/ark/region:ark+cn-beijing/model): the Visual Language Model and the Embedding Model. - Visual Language Model: Doubao-Seed-1.6-flash ![doubao-vlm-model](src/doubao-vlm-model.png) - Embedding Model: Doubao-embedding-vision ![doubao-emb-model](src/doubao-emb-model.png) The following is the filling process after obtaining the API Key: ![Enter API Key](src/Enter-API-Key.gif) ## 3. Start Recording Enter [Screen Monitor] to enable the system permissions for screen sharing. After completing the setup, you need to restart the application for the changes to take effect. ![Enable-Permissions](src/Enable-Permissions.gif) After restarting the application, please first set your screen sharing area in [Settings], then click [Start Recording] to begin taking screenshots. ![Screen-Settings](src/Screen-Settings.gif) ## 4. Forget it After starting the recording, your context will gradually be collected. It will take some time to generate value. So, forget about it and focus on other tasks with peace of mind. MineContext will generate to-dos, prompts, summaries, and activities for you in the background. Of course, you can also engage in proactive Q&A through [Chat with AI]. ## 5. Backend Debugging MineContext supports backend debugging, which can be accessed at `http://localhost:1733`. 1.View Token Consumption and Usage ![后台调试1](src/backend-web-1.png) 2.Configure Interval for Automated Tasks ![后台调试2](src/backend-web-2.png) 3.Adjust System Prompt for Automated Tasks ![后台调试3](src/backend-web-3.png) # 🎃 Contribution Guide ## 🎨 Frontend Architecture The MineContext frontend is a cross-platform desktop application built with Electron, React, and TypeScript, providing a modular, maintainable, and high-performance foundation for desktop development. ### Core Tech Stack | Technology | Description | | ------------ | ----------------------------------------------------------------------------------------- | | Electron | Allows for the development of cross-platform desktop applications using web technologies. | | React | A component-based UI library for building dynamic user interfaces. | | TypeScript | Provides static type checking to enhance code maintainability. | | Vite | A modern frontend build tool optimized for Electron. | | Tailwind CSS | A utility-first CSS framework for rapid and consistent UI styling. | | pnpm | A fast and efficient package manager suitable for monorepo projects. | ### Core Architecture The project follows a standard Electron architectural design, clearly separating the code for the main process, preload scripts, and renderer process to ensure security and maintainability. ``` frontend/ ├── src/ │ ├── main/ # Electron main process (window management, lifecycle, IPC) │ ├── preload/ # Preload script, securely bridging Node APIs and the renderer process │ └── renderer/ # React frontend interface (renderer process) │ ├── packages/ │ └── shared/ # Common utilities, IPC channels, logging, and constant definitions │ ├── build/ # Build resources (icons, platform configurations) ├── dist/ # Build artifacts generated by electron-builder ├── externals/ # External dependencies (Python scripts, binaries, etc.) ├── resources/ # Static assets (icons, templates, images) └── scripts/ # Development and build helper scripts ``` 1. **Main Process (`src/main/`) is responsible for:** - Managing application windows - Handling lifecycle events (startup, quit, activate) - Establishing secure IPC communication - Integrating with backend services (Python and system APIs) 2. **Preload Script (`src/preload/`) is responsible for:** - Securely exposing Node.js APIs to the renderer process - Handling IPC communication with the main process - Implementing cross-process resource access 3. **Renderer Process (`src/renderer/`) is responsible for:** - Implementing the user interface with React - Managing global state with Jotai and Redux - Utilizing an efficient styling system based on Tailwind CSS - Implementing dynamic loading and performance optimization mechanisms 4. **Build and Packaging are responsible for:** - `electron-vite.config.ts` — Configures the build logic for both the main and renderer processes (aliases, plugins, etc.). - `electron-builder.yml` — Defines packaging and distribution configurations for Windows, macOS, and Linux. ## 💻 Frontend Usage ### Build Backend Before starting frontend development, you need to build the backend first: ```bash uv sync source .venv/bin/activate ./build.sh ``` ### Install Dependencies Due to package version issues, using a domestic PyPI mirror is not currently supported. Please run the following command to ensure you are using the original PyPI source: ```bash pip config unset global.index-url cd frontend pnpm install ``` ### Development and Debugging During local development, it is normal for the screen capture area selection to be slow. Please wait, as this issue does not exist in the packaged application. ```bash pnpm dev ``` ### Application Packaging To build APP for macOS: ```bash pnpm build:mac # Data Path # ~/Library/Application\ Support/MineContext ``` The executable files generated by the packaging process will be stored in the `MineContext/frontend/dist` directory. ## 🏗️ Backend Architecture MineContext adopts a modular, layered architecture design with clear separation of concerns and well-defined responsibilities for each component. ### Core Architecture Components ``` opencontext/ ├── server/ # Web server and API layer ├── managers/ # Business logic managers ├── context_capture/ # Context acquisition modules ├── context_processing/ # Context processing pipeline ├── context_consumption/# Context consumption and generation ├── storage/ # Multi-backend storage layer ├── llm/ # LLM integration layer ├── tools/ # Tool system └── monitoring/ # System monitoring ``` ### Layer Responsibilities 1. **Server Layer** (`server/`) - FastAPI-based RESTful API - WebSocket support for real-time communication - Static file serving and template rendering 2. **Manager Layer** (`managers/`) - `CaptureManager`: Manages all context capture sources - `ProcessorManager`: Coordinates context processing pipeline - `ConsumptionManager`: Handles context consumption and generation - `EventManager`: Event-driven system coordination 3. **Context Capture Layer** (`context_capture/`) - Screenshot monitoring - Document monitoring - Extensible capture interface for future sources 4. **Processing Layer** (`context_processing/`) - Document chunking strategies - Entity extraction and normalization - Context merging and deduplication - Multi-modal content processing (text, images) 5. **Storage Layer** (`storage/`) - Multi-backend support (SQLite, ChromaDB) - Vector storage for similarity search - Unified storage interface 6. **LLM Integration** (`llm/`) - Support for multiple LLM providers (OpenAI, Doubao) - VLM (Vision-Language Model) integration - Embedding generation services ## 🚀 Backend Usage ### Installation We recommend using [uv](https://docs.astral.sh/uv/) for fast and reliable package management: ```bash # Clone repository git clone https://github.com/volcengine/MineContext.git cd MineContext # Install uv (if not already installed) curl -LsSf https://astral.sh/uv/install.sh | sh # Sync dependencies (automatically creates virtual environment) uv sync ``` ### Configuration 1. **Basic Configuration** (`config/config.yaml`): ```yaml server: host: 127.0.0.1 port: 8765 debug: false embedding_model: provider: doubao # options: openai, doubao api_key: your-api-key model: doubao-embedding-vision-250615 vlm_model: provider: doubao # options: openai, doubao api_key: your-api-key model: doubao-seed-1-6-flash-250828 capture: enabled: true screenshot: enabled: true # enable screenshot capture capture_interval: 5 # capture interval in seconds ``` 2. **Prompt Templates** (`config/prompts_*.yaml`): - `prompts_en.yaml`: English prompt templates - `prompts_zh.yaml`: Chinese prompt templates ### Running the Server ```bash # Start with default configuration uv run opencontext start # Start with custom config uv run opencontext start --config /path/to/config.yaml # Start with custom port (useful for avoiding conflicts) uv run opencontext start --port 1733 ``` **Available Options:** - `--config`: Path to configuration file - `--host`: Host address (default: from config or `localhost`) - `--port`: Port number (default: from config or `1733`) **Priority**: Command-line arguments > Config file > Default values Alternatively, you can activate the virtual environment manually: ```bash source .venv/bin/activate # On Windows: .venv\Scripts\activate pip install -e . opencontext start --port 1733 ``` # 💎 The Philosophy Behind the Name The naming of MineContext also reflects the team's ingenuity. It signifies both "my context" and "mining context." It draws inspiration from the core philosophy of Minecraft—openness, creativity, and exploration. If vast amounts of context are like scattered "blocks," then MineContext provides a "world" where you can freely build, combine, and create. Users can reimagine and create new content based on the collected massive context and generate high-quality information. # 🎯 Target User | Target User Category | Specific Roles/Identities | Core Needs/Pain Points | | -------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------- | | Knowledge Workers | Researchers, Analysts | Navigating vast amounts of information, improving information processing and analysis efficiency | | Content Creators | Writers, Bloggers | Craving endless inspiration, optimizing content creation workflows | | Lifelong Learners | Students, Researchers | Building systematic knowledge systems, efficiently managing and connecting learning materials | | Project Managers | Product Managers, Project Managers | Integrating multi-source information and data, ensuring project alignment and decision-making efficiency | # 🔌 Context-Source We will prioritize the expansion of Context Sources according to the following plan, and we warmly welcome everyone to actively contribute code to our efforts. - P0: Digital life and public information loop (PC screen capture and link upload) - P1: Personal text context loop (file upload, file tracking) - P2: AI and common office context loop (MCP, meeting notes) - P3: High-quality information acquisition loop (DeepResearch and RSS) - P4: Personal deep context loop (WeChat, QQ chat data acquisition, mobile screenshots) - P5: Physical world context loop (smart wearable synchronization, smart glasses synchronization) | Context Capture Capability | Context Source | Priority | Completion Status | | :--------------------------- | :---------------------------------------- | :------- | :---------------- | | Screen Screenshot | User PC Information | P0 | ✅ | | Note Editing | Application Internal Creation Information | P0 | ✅ | | Link Upload | Internet Information | P0 | | | File Upload | Structured Documents | P1 | | | File Upload | Unstructured Documents | P1 | | | File Upload | Images | P1 | | | File Upload | Audio | P4 | | | File Upload | Video | P4 | | | File Upload | Code | P4 | | | Browser Extension | AI Conversation Records | P2 | | | Browser Extension | Refined Internet Information | P5 | | | Meeting Records | Meeting Information | P2 | | | RSS | Consultation Information | P3 | | | Deep Research | High-Quality Research Analysis | P3 | | | Application MCP/API | Payment Records | P4 | | | Application MCP/API | Research Papers | P3 | | | Application MCP/API | News | P4 | | | Application MCP/API | Emails | P4 | | | Application MCP/API | Notion | P2 | | | Application MCP/API | Obsidian | P2 | | | Application MCP/API | Slack | P4 | | | Application MCP/API | Jira | P4 | | | Application MCP/API | Figma | P2 | | | Application MCP/API | Linear | P4 | | | Application MCP/API | Todoist | P4 | | | Memory Bank Migration Import | User Memory | P4 | | | WeChat Data Capture | WeChat Chat History | P4 | | | QQ Data Capture | QQ Chat History | P4 | | | Mobile Screenshot Monitor | User Mobile End Information | P4 | | | Smart Glasses Data Sync | Physical World Interaction Records | P5 | | | Smart Bracelet Data Sync | Physiological Data | P5 | | # 🆚 Comparison with Familiar Application ## MineContext vs ChatGPT Pulse - 🖥️ Comprehensive Digital Context: MineContext captures your entire digital workflow by reading from screen screenshots, providing a rich, visual context of your daily activities and applications. ChatGPT Pulse, in contrast, is limited to the context of a single text-based conversation. - 🔒 Local-First Data & Privacy: Your data is processed and stored entirely on your local device, ensuring complete privacy and security without relying on cloud servers. ChatGPT Pulse requires data to be sent to and stored on OpenAI's servers. - 🚀 Proactive & Diverse Insights: MineContext delivers a wider variety of intelligent, auto-generated content—including daily summaries, actionable todos, and activity reports—not just simple tips. ChatGPT Pulse primarily offers reactive assistance within the chat interface. - 🔧 Open Source & Customizable: As an open-source project, MineContext allows developers to freely inspect, modify, and build upon the codebase for complete customization. ChatGPT Pulse is a closed, proprietary product with no option for modification. - 💰 Cost-Effective API Usage: MineContext avoids the need for a costly $200/month Pro subscription by allowing you to use your own API key, giving you full control over your spending. ChatGPT Pulse's advanced features are locked behind its expensive premium tier. ## MineContext vs Dayflow - 💡 Richer, Proactive Insights: MineContext delivers a more diverse range of automated, intelligent content—including concise summaries, actionable todos, and contextual tips—going beyond basic activity tracking. DayFlow primarily focuses on logging user activity. - 🧠 Context-Aware Q&A & Creation: MineContext enables you to ask questions and generate new content based on your captured context, unlocking wider application scenarios like content drafting and project planning. DayFlow is limited to passive activity recording and review. - ✨ Superior Activity Generation & Experience: MineContext produces activity records with greater clarity and detail, featuring a more intuitive and interactive dashboard for a seamless user experience. DayFlow's activity logs are more basic with limited interactivity. <br> # 👥 Community ## Community and Support - [GitHub Issues](https://github.com/volcengine/MineContext/issues): Errors and issues encountered while using MineContext. - [Email Support](mailto:[email protected]): Feedback and questions about using MineContext. - <a href="https://bytedance.larkoffice.com/wiki/Hg6VwrxnTiXtWUkgHexcFTqrnpg">WeChat Group</a>: Discuss SwanLab usage and share the latest AI technologies. # Star History [![Star History Chart](https://api.star-history.com/svg?repos=volcengine/MineContext&type=Timeline)](https://www.star-history.com/#volcengine/MineContext&Timeline) # 📃 License This repository is licensed under the Apache 2.0 License. <!-- link --> [release-shield]: https://img.shields.io/github/v/release/volcengine/MineContext?color=369eff&labelColor=black&logo=github&style=flat-square [release-link]: https://github.com/volcengine/MineContext/releases [license-shield]: https://img.shields.io/badge/license-apache%202.0-white?labelColor=black&style=flat-square [license-shield-link]: https://github.com/volcengine/MineContext/blob/main/LICENSE [last-commit-shield]: https://img.shields.io/github/last-commit/volcengine/MineContext?color=c4f042&labelColor=black&style=flat-square [last-commit-shield-link]: https://github.com/volcengine/MineContext/commits/main [wechat-shield]: https://img.shields.io/badge/WeChat-微信-4cb55e?labelColor=black&style=flat-square [wechat-shield-link]: https://bytedance.larkoffice.com/wiki/Hg6VwrxnTiXtWUkgHexcFTqrnpg [github-stars-shield]: https://img.shields.io/github/stars/volcengine/MineContext?labelColor&style=flat-square&color=ffcb47 [github-stars-link]: https://github.com/volcengine/MineContext [github-issues-shield]: https://img.shields.io/github/issues/volcengine/MineContext?labelColor=black&style=flat-square&color=ff80eb [github-issues-shield-link]: https://github.com/volcengine/MineContext/issues [github-contributors-shield]: https://img.shields.io/github/contributors/volcengine/MineContext?color=c4f042&labelColor=black&style=flat-square [github-contributors-link]: https://github.com/volcengine/MineContext/graphs/contributors

AI Agents Vector Databases
5.4K Github Stars
SearchCLI
Open Source

SearchCLI

<p align="center"> <img src="docs/assets/searchcli-logo.svg" alt="SearchCLI logo" width="560" /> </p> # SearchCLI English | [简体中文](README.zh_CN.md) | [日本語](README.ja_JP.md) | [Deutsch](README.de_DE.md) | [한국어](README.ko_KR.md) | [Français](README.fr_FR.md) | [Русский](README.ru_RU.md) | [Italiano](README.it_IT.md) | [Español](README.es_ES.md) Connect stable, tunable search, recommendation, and conversational retrieval to your agent system or business system. [Quick Start](#quick-start-human-users) · [AI Agent Setup](#quick-start-ai-agents) · [Full Agent Guide](docs/agent-quick-start.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) SearchCLI is the open CLI for AI Search on Volcengine. If your agent system or business system needs stable, tunable information distribution services, SearchCLI gives you a practical path to integrate production-grade search, recommendation, and conversational retrieval into real workflows. With SearchCLI and its installable `Viking skills`, external agents can onboard data, build and validate search and recommendation flows, run conversational retrieval, tune strategy configuration, inspect bad cases, and iterate on retrieval quality in a stable, reviewable way. ## What SearchCLI Is - The command-line integration surface for AI Search on Volcengine. - A stable path for external systems to access search, recommendation, and conversational retrieval capabilities. - An agent-friendly workflow layer built around installable skills and automation-safe command output. - A reviewable execution model with dry-runs, confirmation gates, and read-after-write verification. ## Who It Is For - Developers integrating AI-powered information distribution into business systems. - Teams building agent systems that need stable, configurable search, recommendation, and retrieval workflows. - Operators and solution teams who need a reviewable way to onboard data, configure applications, and verify runtime behavior before production use. ## What It Enables - Item and catalog search on top of structured business data. - Recommendation flows connected to application scenes and user behavior. - Conversational retrieval experiences grounded in application search. - Agent workflows that can onboard data, configure applications, and validate runtime behavior with explicit review steps. ## Core Capabilities - `vs item profile | plan | apply` for structured item onboarding. - `vs app`, `vs dataset`, and `vs data` for application and dataset management. - `vs search run`, `vs recommend run`, and `vs chat run` for runtime verification. - `vs search tune query-generate | plan | run | report` for first-version automated text-similarity evaluation and tuning. - Installable `Viking skills` so external agents can use the same workflows. ## Requirements - Node.js 20 or newer - `git` - Volcengine AK/SK with access to AI Search ## Quick Start (Human Users) ### 1. Install ```bash git clone [email protected]:volcengine/SearchCLI.git vs cd vs bash ./scripts/install.sh ``` ### 2. Authenticate If the current shell already has `VIKING_AK` and `VIKING_SK`: ```bash vs auth import-env vs auth status --json vs doctor --json ``` Otherwise, run interactive login in a real terminal: ```bash vs auth login ``` If you will use search tuning query generation or LLM relevance judging, configure an OpenAI-compatible LLM API without placing the API key in plain config: ```bash vs llm login vs llm status --json vs search tune llm-check --live --json ``` If the current shell already has `VIKING_LLM_BASE_URL`, `VIKING_LLM_API_KEY`, and `VIKING_LLM_MODEL`, use `vs llm import-env` instead. The API key is stored in the local secure credential store; base URL and model are stored as non-secret config. ### 3. Run the First Onboarding Flow If the user wants a new app plus bind-time config review and runtime verification, use the `dataset+app` path: ```bash vs item profile --file ./items.json --pretty vs item plan --file ./items.json --goal "Build item search" vs item apply --plan-dir ./.viking/item-plans/<plan> --dry-run vs item apply --plan-dir ./.viking/item-plans/<plan> --confirm-review --wait-ready --run-trials ``` If you only need dataset provisioning, use the `dataset-only` path, generate a dataset-only plan with `--skip-app`, and stop after dataset create + ingest: ```bash vs item profile --file ./items.json --pretty vs item plan --file ./items.json --goal "Build item search" --skip-app vs dataset create --data @dataset-create.json vs dataset ingest --dataset-id <dataset-id> --fields @<normalized-items-artifact> ``` Prefer `dataset-create.json` when the plan emitted it so dataset creation keeps `Schema` and `DataFieldConfig` together. The `--name <dataset-name> --type item --schema @schema.json` form remains the manual schema-only fallback when a full create payload is unavailable or unsuitable. `--skip-app` is also accepted by `vs item provision` and `vs item apply` as an execution-time guard rail when you need to enforce the dataset-only boundary from an existing plan. If you need a video dataset, do not rely on the default type. Always pass `--type video` explicitly: For `dataset+app`: ```bash vs item profile --file ./videos.jsonl --type video --pretty vs item plan --file ./videos.jsonl --type video --goal "Build video search" vs item apply --plan-dir ./.viking/item-plans/<plan> --dry-run vs item apply --plan-dir ./.viking/item-plans/<plan> --confirm-review --wait-ready --run-trials ``` For `dataset-only`: ```bash vs item profile --file ./videos.jsonl --type video --pretty vs item plan --file ./videos.jsonl --type video --goal "Build video search" --skip-app vs dataset create --data @dataset-create.json vs dataset ingest --dataset-id <dataset-id> --fields @<normalized-items-artifact> ``` For video dataset-only provisioning, prefer `dataset-create.json` so the create request includes `DataFieldConfig`; `--schema @schema.json` alone can fail with `MissingParameter.DefaultFieldStrategy`. ## Quick Start (AI Agents) If an external agent needs to operate AI Search through this repository: ### 1. Install SearchCLI ```bash git clone [email protected]:volcengine/SearchCLI.git vs cd vs bash ./scripts/install.sh ``` ### 2. Install Viking skills ```bash npx skills add "[email protected]:volcengine/SearchCLI.git" -y -g ``` The default public skill bundle is: - `vs-shared` - `vs-item-onboarding` - `vs-search` - `vs-search-tuning` - `vs-chat` - `vs-recommend` ### 3. Authenticate If the current shell already has `VIKING_AK` and `VIKING_SK`, prefer: ```bash vs auth import-env ``` Otherwise: ```bash vs auth login ``` ### 4. Verify ```bash vs --help vs auth status --json vs llm status --json vs doctor --json vs skill list ``` ## Public Command Groups - `vs auth` - `vs llm` - `vs doctor` - `vs skill` - `vs item` - `vs app` - `vs dataset` - `vs data` - `vs search` - `vs chat` - `vs recommend` ## Documentation - [Agent Quick Start](docs/agent-quick-start.md) - [Contributing](CONTRIBUTING.md) - [Security](SECURITY.md) ## Maintainer Workflow If you are maintaining the open-source repository itself, the local skill tooling is: ```bash vs skill list vs skill init viking-demo-skill vs skill validate vs skill install all ``` Build and run repository checks: ```bash npm install npm run validate:skills npm run build npm run test:acceptance:dist ``` ## Contribution Please check [Contributing](CONTRIBUTING.md) for more details. External contributors must complete the Contributor License Agreement (CLA) before a pull request can be accepted. ## Code of Conduct Please check [Code of Conduct](CODE_OF_CONDUCT.md) for more details. ## Security and privacy This project takes security seriously. For vulnerability reporting and supported versions, see [SECURITY.md](SECURITY.md) ## License This project is licensed under the [Apache-2.0 License](LICENSE).

Knowledge Bases & RAG Terminal & CLI Tools
419 Github Stars