The ScriptWriterAgent generates complete, production-ready video scripts based on content strategies. It creates structured scripts with hooks, introductions, main content, conclusions, and calls-to-action, following proven content templates.
const title = await agent.generateTitle(strategy);// Content type specific:// Tutorial: 'How to {topic}: Step-by-Step Guide'// List: 'Top 10 {topic} Tips You Need to Know'// Review: '{topic} Review: Is It Worth It?'
Introduction with greeting, topic intro, value proposition, credibility
const intro = await agent.generateIntroduction(strategy);// {// greeting: 'Hey everyone, welcome back to the channel!',// topicIntro: 'Today, we\'re diving deep into JavaScript Promises.',// valueProposition: 'By the end of this video, you\'ll understand exactly how to implement JavaScript Promises step by step.',// credibility: 'I\'ve spent months researching this topic',// duration: '0:05-0:20'// }
List items section with 5-10 items in countdown format
const listItems = await agent.generateListItems(strategy);// {// type: 'list_items',// title: 'Top 8 Things About JavaScript Promises',// items: [// {// number: 8,// title: 'The Hidden Power of JavaScript Promises',// description: 'This aspect is crucial because...',// impact: 'This alone can save you hours'// },// // ... countdown to #1// ],// duration: 240// }
const conclusion = await agent.generateConclusion(strategy);// {// type: 'conclusion',// title: 'Wrapping Up',// recap: [// 'So that\'s everything you need to know about JavaScript Promises.',// 'We covered the key points:',// '- The fundamentals and why they matter',// '- Practical steps to get started',// '- Real-world applications and examples',// '- Tips for long-term success'// ],// finalThought: 'Remember, JavaScript Promises is a journey, not a destination. Keep learning and improving!',// duration: '30 seconds'// }
CTA with subscribe, like, comment, and next video prompts
const cta = await agent.generateCTA(strategy);// {// type: 'call_to_action',// subscribe: 'If you found this helpful, make sure to subscribe and hit the notification bell!',// like: 'Give this video a thumbs up if you learned something new.',// comment: 'Let me know in the comments: What\'s your experience with JavaScript Promises?',// nextVideo: 'Check out this related video for more insights.',// duration: '15 seconds'// }