Create an Agent with Knowledge
knowledge_agent.py
Setup
1
Create virtual environment
2
Install dependencies
3
Export your API key
4
Run the agent
Load Different Content Types
- Files
- URLs
- Text
What’s Happening
- Insert: Content is chunked, embedded with Gemini, and stored in ChromaDB
- Query: The agent receives your question and decides to search the knowledge base using the
search_knowledge_basetool - Response: The agent uses the retrieved content to answer, grounding its response in your data
Next Steps
Agents with Knowledge
Agentic RAG and traditional RAG
Teams with Knowledge
Shared knowledge bases for multi-agent teams
Vector Stores
PgVector, Pinecone, Weaviate, and more
Search & Retrieval
Vector, keyword, and hybrid search