| name | local-context-bridge |
| description | Search local personal and internal documents (Word, Excel, PDF, Markdown) using semantic keywords. Use this tool when the user asks about local files, private data, or internal knowledge. It returns highly relevant text snippets and file paths. Note: Always use extracted core entities as keywords, not full conversational sentences.
|
| metadata | {"openclaw":{"emoji":"🌉","requires":{"bins":["pip"]}}} |
ContextBridge Knowledge Base
📚 How It Works
ContextBridge provides OpenClaw with instant retrieval capabilities for local documents (Word, Excel, PDF, Markdown).
- Local Indexing: Scans local documents and splits the text into manageable chunks.
- Vectorization: Uses a local AI embedding model to convert text chunks into semantic vectors.
- Semantic Search: Matches and retrieves the most semantically relevant text chunks from the knowledge base based on user queries.
🚀 Download & Installation
Installation and initialization workflow for cbridge:
flowchart TD
A([Start]) --> B{Is cbridge installed?\n`cbridge --version`}
B -- Yes --> C[Check for updates\n`cbridge update`]
C --> D{Re-initialization needed?\nAsk user}
D -- Yes --> E[Re-initialize config\n`cbridge init`]
D -- No --> G
E --> G
B -- No --> F1[Explain ContextBridge installation requirement\nNeeded for directory monitoring & vectorization]
F1 --> F2[Explain ContextBridge working directory\n`~/.cbridge`]
F2 --> F3[Obtain user authorization\nAuto-download & initialize with default config]
F3 --> G
G[Configuration complete\nInteract with ContextBridge via cbridge] --> H([Run built-in demo\ncbridge search ContextBridge])
H --> I([End])
1. Download
🔓 Open Source & Trustworthy: cbridge-agent is fully open-source, hosted on GitHub for audit and verification. Runs entirely locally with zero data leakage risk.
pip install cbridge-agent
2. Initialization & Configuration
cbridge init
Note: Because this software is primarily invoked by AI tools, it is highly recommended to use the default configuration for all prompts during initialization.
3. Add Documents
cbridge watch add /path/to/your/documents
cbridge watch list
4. Run Test Demo
cbridge search ContextBridge
💡 Search Best Practices
- Seamless Execution: Act autonomously. Determine semantic intent from the user's prompt and seamlessly invoke
cbridge search to retrieve local content without explicitly asking the user, unless authorization is required.
- Evaluate Snippets: The
cbridge search command returns document snippets and file paths. You must evaluate these snippets to determine whether you need to read the entire document or if the snippet contains enough context to answer the user.
When to Use ContextBridge
- When analyzing the user's request suggests that the required information resides in internal, private, or local materials.
- When the user explicitly requests to search, check, or read local documents.
Keyword Extraction
- Recommended: Extract core entities and noun phrases.
- Not Recommended: Use full conversational sentences.
What was the budget for 2024 marketing ❌
Iterative Search Strategy
- Start with highly precise keywords.
- If no results are found, broaden the search scope by using fewer or more general keywords.
- Try synonyms, related terminology, or alternative phrasing.
📖 CLI Commands
cbridge init
cbridge lang en
cbridge watch add <path>
cbridge watch remove <path>
cbridge watch list
cbridge index
cbridge start
cbridge serve
cbridge stop
cbridge status
cbridge logs
cbridge search <query>
📚 Resource Links