video_agent.py
Usage
1
Set up your virtual environment
2
Install dependencies
3
Export your Google API key
4
Download the sample video
5
Run Agent
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Process video as input with Agno agents.
from pathlib import Path
from agno.agent import Agent
from agno.media import Video
from agno.models.google import Gemini
agent = Agent(
model=Gemini(id="gemini-3.5-flash"),
markdown=True,
)
# Please download "GreatRedSpot.mp4" using
# wget https://storage.googleapis.com/generativeai-downloads/images/GreatRedSpot.mp4
video_path = Path(__file__).parent.joinpath("GreatRedSpot.mp4")
agent.print_response("Tell me about this video", videos=[Video(filepath=video_path)])
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
Install dependencies
uv pip install -U google-genai agno
Export your Google API key
export GOOGLE_API_KEY="your_google_api_key_here"
$Env:GOOGLE_API_KEY="your_google_api_key_here"
Download the sample video
wget https://storage.googleapis.com/generativeai-downloads/images/GreatRedSpot.mp4
Run Agent
python video_agent.py
Was this page helpful?