Video Input (Local File Upload)
Pass a local video file to a Gemini agent with Video(filepath=...).
Code
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,
)
# Get sample videos from https://www.pexels.com/search/videos/sample/
video_path = Path(__file__).parent.joinpath("sample_video.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/activateSet your API key
export GOOGLE_API_KEY=xxxInstall dependencies
uv pip install -U google-genai agnoRun Agent
Save the code above as video_input_local_file_upload.py, then run:
python video_input_local_file_upload.py