@lakehouse/openclaw-plugin
v0.1.0
Published
Lakehouse42 plugin for OpenClaw - enterprise knowledge at your fingertips
Downloads
8
Maintainers
Readme
@lakehouse/openclaw-plugin
Lakehouse42 plugin for OpenClaw - gives your AI agent access to enterprise knowledge through semantic search, RAG Q&A, and automatic knowledge capture.
Features
- Agent Tools: Search, ask questions, list collections, ingest content
- Auto-Recall: Automatically injects relevant knowledge before the agent processes messages
- Auto-Capture: Captures important information from conversations to the knowledge base
- CLI Commands: Direct interaction with the knowledge base from the command line
- Gateway Methods: Programmatic API for custom integrations
Installation
# In your OpenClaw extensions directory
cd ~/.openclaw/extensions
npm install @lakehouse/openclaw-pluginOr install globally:
npm install -g @lakehouse/openclaw-pluginConfiguration
Add the plugin configuration to your ~/.openclaw/config.json5:
{
"plugins": {
"entries": {
"knowledge-lakehouse": {
"enabled": true,
"config": {
// Required: Your Lakehouse42 API key
"apiKey": "lh_your_api_key_here",
// Optional: API base URL (for self-hosted instances)
"baseUrl": "https://api.lakehouse42.com",
// Optional: Organization ID (uses default if omitted)
"organizationId": "org_xxx",
// Optional: Default collections to search
"defaultCollectionIds": ["col_xxx", "col_yyy"],
// Auto-recall settings
"autoRecall": {
"enabled": true,
"minScore": 0.3, // Minimum relevance score (0-1)
"maxResults": 5 // Max results to inject
},
// Auto-capture settings
"autoCapture": {
"enabled": true,
"collectionId": "col_xxx", // Target collection
"minLength": 20,
"maxLength": 2000,
"triggerPatterns": ["remember this", "important:"],
"excludePatterns": ["password", "secret"]
},
// Search settings
"search": {
"defaultTopK": 10,
"rerankEnabled": true
},
// Ingest settings
"ingest": {
"defaultCollectionId": "col_xxx",
"sourceApp": "openclaw"
}
}
}
}
}
}Agent Tools
The plugin provides these tools to your OpenClaw agent:
knowledge_search
Search the enterprise knowledge base using semantic search.
Agent: I'll search for information about our refund policy.
[Uses knowledge_search with query: "refund policy"]Parameters:
query(required): Search querycollection_ids: Specific collections to searchtop_k: Number of results (default: 10)filters: Metadata filters
knowledge_ask
Ask questions and get AI-generated answers with citations.
Agent: Let me find out what our SLA terms are.
[Uses knowledge_ask with question: "What are our SLA terms?"]Parameters:
question(required): Question to answercollection_ids: Specific collections to searchinclude_citations: Include source citations (default: true)
knowledge_collections
List available knowledge collections.
Agent: I'll check what data sources are available.
[Uses knowledge_collections]knowledge_ingest
Ingest text content into the knowledge base.
Agent: I'll save these meeting notes for future reference.
[Uses knowledge_ingest with content: "...meeting notes..."]Parameters:
content(required): Text content to ingesttitle: Document titlecollection_id: Target collectionmetadata: Additional metadata
knowledge_save
Quick-save important information from conversations.
Agent: I'll save that preference for you.
[Uses knowledge_save with text: "User prefers dark mode"]Parameters:
text(required): Text to saveimportance: low, medium, or hightags: Categorization tags
Auto-Recall
When enabled, the plugin automatically:
- Takes the user's message
- Searches the knowledge base for relevant content
- Injects matching results as context before the agent processes
This runs alongside OpenClaw's built-in memory system, not replacing it. Your agent gets both personal memory (LanceDB) and enterprise knowledge (Lakehouse42).
Example injected context:
<enterprise-knowledge query="refund policy" results="3">
<result rank="1" relevance="92%" source="Customer Policy Guide">
Refunds are processed within 5-7 business days...
</result>
...
</enterprise-knowledge>Auto-Capture
When enabled, the plugin automatically captures important information from conversations:
- Decisions: "We decided to use React for the frontend"
- Preferences: "I prefer the dark theme"
- Facts: "The API rate limit is 1000 requests/minute"
- Instructions: "Always verify email before sending"
Content is filtered by:
- Length (min/max configurable)
- Importance level detection
- Trigger/exclude patterns
- Category detection
CLI Commands
# Search the knowledge base
openclaw lakehouse search "refund policy"
openclaw lakehouse search "deployment process" -n 5 -c col_xxx
# Ask a question
openclaw lakehouse ask "What is our vacation policy?"
openclaw lakehouse ask "How do I deploy to production?" --no-citations
# List collections
openclaw lakehouse collections
# Ingest content
openclaw lakehouse ingest --text "Meeting notes from today..." --collection col_xxx --title "Team Meeting 2024-01-15"
# Check status
openclaw lakehouse statusGateway Methods
For programmatic access from other plugins or custom code:
// Search
const results = await gateway.call("lakehouse.search", {
query: "deployment process",
topK: 5,
});
// Ask question
const answer = await gateway.call("lakehouse.ask", {
question: "What is our SLA?",
includeCitations: true,
});
// Ingest content
const doc = await gateway.call("lakehouse.ingest", {
content: "Important information...",
title: "Meeting Notes",
collectionId: "col_xxx",
});
// List collections
const collections = await gateway.call("lakehouse.collections");How It Works
┌─────────────────────────────────────────────────────────┐
│ OpenClaw │
├─────────────────────────────────────────────────────────┤
│ User Message │
│ │ │
│ ▼ │
│ ┌─────────────────┐ ┌──────────────────────────┐ │
│ │ Auto-Recall │───▶│ Lakehouse42 API │ │
│ │ (before_agent) │◀───│ (search) │ │
│ └────────┬────────┘ └──────────────────────────┘ │
│ │ │
│ ▼ inject context │
│ ┌─────────────────┐ │
│ │ Agent │──▶ Tools: knowledge_search, │
│ │ │ knowledge_ask, etc. │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ ┌──────────────────────────┐ │
│ │ Auto-Capture │───▶│ Lakehouse42 API │ │
│ │ (agent_end) │ │ (ingest) │ │
│ └─────────────────┘ └──────────────────────────┘ │
│ │
│ Response to User │
└─────────────────────────────────────────────────────────┘Getting an API Key
- Sign up at lakehouse42.com
- Create an organization
- Go to Settings → API Keys
- Create a new API key with appropriate permissions
- Copy the
lh_xxxkey to your config
License
MIT
