Video Input

Process video as input with Agno agents.

In this example we will create an agent that can understand video input.

video_agent.py
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)])

Usage

Set up your virtual environment

uv venv --python 3.12
source .venv/bin/activate

Install dependencies

uv pip install -U google-genai agno

Export your Google API key

  export 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