Skip to main content
Load a PDF, a Wikipedia topic, and a URL into a LightRAG-backed knowledge base and query it with an agent.
agentic_rag_with_lightrag.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Clone Agno

Clone the repository and run the remaining commands from its root:
5

Start LightRAG

Start a LightRAG server at http://localhost:9621 before running the example. Set LIGHTRAG_API_KEY only if the server requires authentication.
6

Run the example

Run the example from the repository root:
Full source: cookbook/07_knowledge/05_integrations/rag/agentic_rag_with_lightrag.py