from praisonaiagents import Agent, Task, Agents, Session
from pydantic import BaseModel
class VideoAnalysis(BaseModel):
duration: str
scenes: list[str]
key_events: list[str]
summary: str
session = Session(session_id="video-001", user_id="user-1")
agent = Agent(
name="VideoAnalyst",
instructions="Analyze videos and return structured results.",
llm="gpt-4o-mini",
memory=True
)
task = Task(
description="Analyze this video in detail",
expected_output="Structured video analysis",
agent=agent,
images=["video.mp4"],
output_pydantic=VideoAnalysis
)
agents = Agents(
agents=[agent],
tasks=[task],
memory=True
)
result = agents.start()
print(result)