Skip to main content

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)
All implementations MUST:
  1. Return SearchResult/SearchResultItem with metadata as dict (never None)
  2. Handle identifier scoping (user_id/agent_id/run_id) appropriately
  3. 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

Knowledge Concept

Knowledge Overview

Knowledge Configuration

Chat with PDF