multi-agent-system / agents /showrunner.py
Deployment Script
Deploy multi-agent system
2dfc473
Raw
History Blame Contribute Delete
1.57 kB
"""Showrunner agent - Orchestrator for content generation."""
from typing import Any, Dict
from base_agent import BaseAgent
class ShowrunnerAgent(BaseAgent):
"""Orchestrator agent that translates briefs into actionable directives."""
def __init__(self):
"""Initialize the Showrunner agent."""
system_prompt = (
"You are the Showrunner. Given a brief, produce a tight episode directive: "
"premise, tone, which characters are featured, and the emotional core. "
"Keep it under 200 words. Output only the directive as a JSON object with keys: "
"episode_directive, story_premise, tone_brief, character_focus_notes."
)
super().__init__(
agent_id="showrunner",
agent_name="Showrunner",
system_prompt=system_prompt,
)
def generate_directive(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
"""Generate episode directive from user brief.
Args:
inputs: Dictionary with keys:
- user_brief: The initial brief
- season_arc_document: Season context
- character_bible: Character definitions
Returns:
Dictionary with generated directive and related outputs
"""
outputs = self.process(inputs)
# Save state
self.save_state(
{
"inputs": inputs,
"outputs": outputs,
},
filename="directive.json",
)
return outputs