Documentation Index
Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
Code
cookbook/agent_concepts/async/data_analyst.py
You are viewing v1 docs. For the latest documentation, visit docs.agno.com
Documentation Index
Fetch the complete documentation index at: https://docs-v1.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
import asyncio
from textwrap import dedent
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.duckdb import DuckDbTools
duckdb_tools = DuckDbTools(
create_tables=False, export_tables=False, summarize_tables=False
)
duckdb_tools.create_table_from_path(
path="https://agno-public.s3.amazonaws.com/demo_data/IMDB-Movie-Data.csv",
table="movies",
)
agent = Agent(
model=OpenAIChat(id="gpt-4o"),
tools=[duckdb_tools],
markdown=True,
show_tool_calls=True,
additional_context=dedent("""\
You have access to the following tables:
- movies: contains information about movies from IMDB.
"""),
)
asyncio.run(
agent.aprint_response("What is the average rating of movies?", stream=False)
)
Was this page helpful?