Skip to main content
Create an agent that retrieves relevant information from a knowledge base before answering.
1

Create the agent

agent_knowledge.py
2

Install dependencies

3

Export your API key

4

Run

The agent retrieves the most relevant documents and uses them to answer accurately.
You can also use path shorthand to load an entire directory:
This auto-configures InMemoryVectorDB + OpenAIEmbedder + RecursiveChunker and loads all supported files from the directory.