Knowledge store and it searches it before answering.
Quick Start
1
Simple Usage
2
With Configuration
Store or Add
Usestore() for raw text and add() for files, directories, or URLs.
kb.add('doc.pdf') chunks the file internally using the chunker block of KnowledgeStoreConfig. Use store() only for text you already have in memory.How Search Works
search() returns an envelope, not a bare array.
results:
Configuration Options
Knowledge takes a Python-parity config object as its first argument.
Knowledge API Reference
Full
KnowledgeStoreConfig optionsCommon Patterns
Scope by user, agent, or run
Every operation isolates memories byuserId, agentId, and runId.
Search from a tool
Manage stored items
Best Practices
Always pass a scope
Always pass a scope
Supply at least one of
userId, agentId, or runId on every store, add, and search call so tenants never read each other’s data.Use add() for files, store() for text
Use add() for files, store() for text
add() reads and chunks files, directories, and URLs. store() takes text you already hold in memory.Read results[i].text
Read results[i].text
search() returns { query, results, totalCount }. Read found.results[i].text, and page with limit.Enable embeddings for semantic search
Enable embeddings for semantic search
Pass
embeddingProvider in the config to rank results by vector similarity instead of keyword overlap.Related
Knowledge Base CLI
CLI knowledge commands
Chunking
Split documents before storing

