agno-knowledge-rag

Implement retrieval-augmented generation in Agno agents with pluggable vector databases.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/allankltsn/setup_kiro --skill agno-knowledge-rag-allankltsn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agno-knowledge-rag
Source: https://github.com/allankltsn/setup_kiro/tree/main/.kiro/skills/agno-knowledge-rag
Command: npx skills add https://github.com/allankltsn/setup_kiro --skill agno-knowledge-rag-allankltsn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building RAG into an Agno agent requires choosing a vector database, wiring embeddings, and keeping infrastructure concerns out of domain code. This Skill guides you through adding searchable knowledge to an agent with the vector backend selected entirely by environment variables, so the same code runs locally and in production. ## Core Features & Use Cases - Pluggable vector backends: Switch between LanceDB (local, zero-infra), PgVector (Postgres-based), and S3Vectors (AWS-native) via the RAG_VECTOR_DB environment variable without touching domain or application code. - Knowledge construction: Create an Agno Knowledge object with OpenAI embeddings, hybrid search, and document loading from URLs, PDFs, and files. - Local observability and evaluation: Inspect retrieval in AgentOS, Langfuse, and SigNoz, and measure effectiveness with golden sets, recall@k, Ragas, and DeepEval. - Use Case: You are building a support agent that must answer from a product manual. Develop locally with LanceDB, then deploy to production on PgVector by changing only environment variables, and validate retrieval quality with a golden question set. ## Quick Start Ask the AI to add RAG to your Agno agent using LanceDB locally with an environment-variable switch to PgVector for production.

Frequently Asked Questions about agno-knowledge-rag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add RAG to an Agno agent?▼

Create a Knowledge object with a vector database and embedder, then pass it to the Agent with search_knowledge=True. The agent automatically retrieves relevant chunks and injects them into the LLM context on each query.

LanceDB vs PgVector for Agno knowledge bases?▼

LanceDB runs as a local file with zero infrastructure, making it ideal for development and small datasets. PgVector runs on Postgres, supports SQL metadata filtering and joins, and suits production when you already operate Postgres.

Can I switch vector databases without changing agent code?▼

Yes. Set RAG_VECTOR_DB to lancedb, pgvector, or s3vectors and let the composition_root build the matching backend. Domain and application layers stay untouched, following the dependency inversion principle.

Does Agno support AWS S3 Vectors natively?▼

S3 Vectors support in Agno may not exist or be stable depending on your version, and LocalStack does not emulate it reliably. Check the official Agno docs first; if unsupported, fail fast with a clear error and develop locally with LanceDB.

How do I measure RAG retrieval quality locally?▼

Build a golden set of questions with expected chunks, then measure recall@k or hit rate. Tools like Ragas and DeepEval compute faithfulness and context precision, while Langfuse shows which chunks entered the prompt and their token cost.