KnowledgeStoreProtocol
Defined in the protocols module.AI Agent Protocol defining the interface for knowledge store backends. Implementations include:
- Mem0Adapter (mem0 backend)
- ChromaAdapter (direct chromadb)
- InternalAdapter (built-in storage)
- Return SearchResult/SearchResultItem with metadata as dict (never None)
- Handle identifier scoping (user_id/agent_id/run_id) appropriately
- Provide clear error messages for missing required parameters
Methods
search()
Search for relevant content.
add()
Add content to the knowledge store.
get()
Get a specific item by ID.
get_all()
Get all items, optionally filtered by scope.
update()
Update an existing item.
delete()
Delete an item by ID.
delete_all()
Delete all items matching scope.
Source
View on GitHub
praisonaiagents/knowledge/protocols.py at line 16
