search_brain
Benchmarked against: Anthropic — Web fetch tool MCP Tool: Available on both Cloud UB and Local UBI servers Cost: Free (internal search)
search_brain is the primary knowledge retrieval tool — a hybrid search combining semantic vectors and keyword matching to find relevant entries in Universal Brain.
Usage
search_brain(query="LangGraph checkpoint API", limit=10)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query (supports Chinese and English) |
limit | number | 10 | Maximum results to return |
Response
Returns a JSON array of matching entries, ranked by combined relevance score:
[
{
"entry_id": "ub-abc123",
"title": "LangGraph Checkpoint Architecture",
"category": "knowledge",
"score": 0.87,
"snippet": "..."
}
]
How it works
Hybrid search combines two strategies:
| Strategy | Technology | Strength |
|---|---|---|
| Semantic | Gemini embedding-001 (768d vectors) | Finds conceptually related content |
| Keyword | SQLite FTS5 full-text search | Finds exact term matches |
Results from both strategies are merged, deduplicated, and ranked by combined score.
Best practices
- Search UB first — before any external search or decision
- Use English queries — embedding model works best with English
- Be specific —
"LangGraph checkpoint sqlite"beats"checkpoint" - Check before ingesting — avoid duplicates by searching first
Related tools
| Tool | Purpose |
|---|---|
intel_search | External web search + auto-ingest |
search_by_category | Browse by category |
get_entry | Fetch single entry by ID |
get_recent | Latest ingested entries |