Skip to content

AI Agents

CRAFT uses 14 specialized AI agents that collaborate through the content pipeline. Each agent has a defined role, structured output format, and quality expectations. Agents are invoked via the Claude Agent SDK with full tool access (Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch).

Pipeline Agents

These agents are directly wired into the 8-stage orchestration pipeline:

AgentPipeline StageToolsOutput
ResearcherResearchWeb search, file read/writeresearch.md — sources, data, competitive analysis, unique angle
WriterScriptFile read/writescript.md — screenplay in channel character voice
StoryboarderStoryboardFile read/writestoryboard.md — visual sequences, scene layouts, timing
Asset FinderAssetsWeb search, file toolsDownloads media resources to episode directory
CompositorCompositingFile read/write, BashEpisode.tsx — Remotion video composition
ProducerReview (all stages)Read-onlyStructured JSON: score (1-10), pass/fail, feedback, upstream issues

Support Agents

These agents handle tasks outside the main pipeline:

AgentRole
Content ArchitectEpisode structure and outline generation
Brand DesignerVisual branding and identity
Trend AnalystTrend identification and scoring
Channel WizardChannel setup and onboarding
CuratorContent proposal evaluation
DiscoveryYouTube trend discovery
Idea RouterIdea classification and channel routing
Channel StrategistLong-form channel growth analysis

How Agents Execute

  1. The worker-orchestrate service determines the next stage to run
  2. It loads the agent definition from app/agents/{name}.md
  3. Builds a prompt with episode context (channel, episode dir, iteration, prior feedback)
  4. Invokes the Claude Agent SDK with --dangerously-skip-permissions (agents run in Docker)
  5. The agent reads the episode directory, does its work, writes artifacts
  6. The orchestrator checks the result and runs the Producer for review

Producer Review

The Producer agent is the quality gate. After each stage, it:

  • Reads the channel's CHANNEL.md for tone and audience expectations
  • Reads the stage output artifact
  • Scores 1-10 with structured JSON output
  • Provides actionable feedback if the score is below 7
  • Can flag upstream issues (e.g., "the script is weak because the research missed X")

The review uses the Agent SDK's outputFormat: json_schema for guaranteed structured output.

Budget Controls

Each agent invocation has configurable budget limits:

StageMax TurnsBudgetReview Budget
Research30$2.00$0.50
Script30$3.00$0.50
Storyboard25$2.00$0.50
Assets30$3.00
Compositing35$5.00$0.50
Final Review15$1.00

TIP

Agent definitions live in app/agents/*.md — each file defines the agent's persona, instructions, and output expectations. Edit them to customize behavior.