Files
PraisonAI/examples/python/agents/video-agent.py
T
2026-01-30 17:41:19 +00:00

35 lines
997 B
Python

from praisonaiagents import Agent, Task, Agents
# Create Video Analysis Agent
video_agent = Agent(
name="VideoAnalyst",
role="Video Analysis Specialist",
goal="Analyze images and videos to extract meaningful information",
backstory="""You are an expert in computer vision and image analysis.
You excel at describing images, detecting objects, and understanding visual content.""",
llm="gpt-4o-mini",
reflection=False
)
# Task with Video File
task1 = Task(
name="analyze_video",
description="""Watch this video and provide:
1. A summary of the main events
2. Key objects and people visible
3. Any text or important information shown
4. The overall context and setting""",
expected_output="Comprehensive analysis of the video content",
agent=video_agent,
images=["video.mp4"]
)
# Create Agents instance
agents = AgentManager(
agents=[video_agent],
tasks=[task1],
process="sequential",
)
# Run all tasks
agents.start()