Code
cookbook/examples/agents/agno_assist.py
Usage
1
Create a virtual environment
Open the
Terminal and create a python virtual environment.2
Set your API key
3
Install libraries
4
Run Agent
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import asyncio
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.knowledge.embedder.openai import OpenAIEmbedder
from agno.knowledge.knowledge import Knowledge
from agno.models.openai import OpenAIChat
from agno.vectordb.lancedb import LanceDb, SearchType
knowledge = Knowledge(
vector_db=LanceDb(
uri="tmp/lancedb",
table_name="agno_assist_knowledge",
search_type=SearchType.hybrid,
embedder=OpenAIEmbedder(id="text-embedding-3-small"),
),
)
asyncio.run(
knowledge.add_content_async(name="Agno Docs", url="https://docs.agno.com/llms-full.txt")
)
agno_assist = Agent(
name="Agno Assist",
model=OpenAIChat(id="gpt-5-mini"),
description="You help answer questions about the Agno framework.",
instructions="Search your knowledge before answering the question.",
knowledge=knowledge,
db=SqliteDb(session_table="agno_assist_sessions", db_file="tmp/agents.db"),
add_history_to_context=True,
add_datetime_to_context=True,
markdown=True,
)
if __name__ == "__main__":
agno_assist.print_response("What is Agno?")
Create a virtual environment
Terminal and create a python virtual environment.python3 -m venv .venv
source .venv/bin/activate
python3 -m venv .venv
.venv/scripts/activate
Set your API key
export OPENAI_API_KEY=xxx
Install libraries
pip install -U agno openai lancedb
Run Agent
python cookbook/examples/agents/agno_assist.py
python cookbook/examples/agents/agno_assist.py