| from crewai import Crew, Process |
|
|
| |
| from agent_01_strategist import StrategistUnit |
| from agent_02_screenwriter import ScreenwriterUnit |
| from agent_03_visual import VisualDirectorUnit |
| from agent_04_motion import MotionDirectorUnit |
| from agent_05_post import PostSupervisorUnit |
|
|
| |
| |
| |
|
|
| def run_production_studio(topic): |
| """ |
| Triggers the FULL 5-Stage Linear Assembly Line: |
| Strat -> Writer -> Visual -> Motion -> Post |
| """ |
| |
| |
| unit_01 = StrategistUnit() |
| unit_02 = ScreenwriterUnit() |
| unit_03 = VisualDirectorUnit() |
| unit_04 = MotionDirectorUnit() |
| unit_05 = PostSupervisorUnit() |
| |
| |
| agent_01 = unit_01.create_agent() |
| agent_02 = unit_02.create_agent() |
| agent_03 = unit_03.create_agent() |
| agent_04 = unit_04.create_agent() |
| agent_05 = unit_05.create_agent() |
| |
| |
| |
| task_01 = unit_01.create_task(topic) |
| task_02 = unit_02.create_task(task_01) |
| task_03 = unit_03.create_task(task_02) |
| task_04 = unit_04.create_task(task_03) |
| task_05 = unit_05.create_task(task_04) |
| |
| |
| studio_crew = Crew( |
| agents=[agent_01, agent_02, agent_03, agent_04, agent_05], |
| tasks=[task_01, task_02, task_03, task_04, task_05], |
| process=Process.sequential, |
| verbose=True |
| ) |
| |
| |
| |
| result = studio_crew.kickoff() |
| return result |
|
|
| if __name__ == "__main__": |
| print("Testing Full Studio Workflow...") |
| |
| print(run_production_studio("The History of Coffee in 30 seconds")) |