Build knowledge bases with vector storage, embeddings, and content ingestion for retrieval-augmented generation (RAG).Knowledge in Agno is composed of several resources that work together:
agno/knowledge
The central knowledge base resource that connects a vector database with optional embedder and content storage.
Config
Outputs
agno/vectordb/qdrant
Configures a Qdrant vector database for storing embeddings.
Config
Outputs
agno/knowledge/embedder/openai
Configures an OpenAI embedding model for generating vector embeddings.
Config
Outputs
agno/knowledge/content
Represents a content source to ingest into a knowledge base. Supports URLs and inline text.
Config
Outputs
Example
A complete knowledge base setup:Notes
- You must provide exactly one of
urlortext_contentin content resources. - Content supports URLs to PDFs, web pages, documents (DOCX, PPTX), arxiv papers, YouTube transcripts, and Wikipedia articles.
- The
search_type: hybridoption combines vector and keyword search for better results but requires thefastembedpackage. - Content resources are stateful — they insert into and delete from the vector database during lifecycle events.