The knowledge base is optional. If ChromaDB is not installed or the collection is empty, generation continues normally without it.
Setup
Configure environment variables
Add these two variables to your
.env file:CHROMA_COLLECTION sets the collection name. CHROMA_PERSIST_DIRECTORY controls where ChromaDB stores its data on disk.Adding Content
Use/kbadd to add entries to the knowledge base. You can type content directly, upload a file, or both.
kb_3f9a1c…). Save it if you plan to delete the entry later.
Browsing and Searching
Semantic Search
Search the knowledge base by meaning, not just keywords:List Entries
Removing Content
/kblist.
How Retrieval Works
You do not need to do anything to activate retrieval — it happens automatically on every AI generation call.User sends a message
Any message that triggers an AI response — via a command, the conversation channel, or autonomy mode — starts the retrieval pipeline.
Semantic search runs against the knowledge base
The bot queries ChromaDB with the user’s message as the search text and retrieves the most relevant document chunks (up to 3 by default).
Freesona assembles and injects the context
Freesona injects the retrieved chunks into the system prompt alongside the active persona and the user’s long-term memory facts. The model receives all of this as context before generating a reply.
Commands Summary
| Command | Description | Permission |
|---|---|---|
/kbsearch <query> | Semantic search | Anyone |
/kbadd <title> [content] [attachment] | Add text or a PDF/EPUB/TXT/JSON document | Administrator |
/kblist | List the 15 newest entries | Administrator |
/kbdelete <id> | Delete an entry by ID | Administrator |