ADV
Dec 25

Marketing Plan & Implement Agent

Two-phase marketing agent with brand context: Stage 0 extracts brand info from URL or manual input, planning phase gathers requirements and creates a plan with todos, implementation phase executes the plan using web scraping and research tools. Uses callOptionsSchema + prepareCall for dynamic agent configuration.

View Full Pattern on Desktop
Marketing Plan & Implement Agent preview

Problems Solved

  • Two-phase marketing workflow (plan then implement)
  • Interactive plan building through conversation
  • Automated research and web scraping during implementation
  • Structured todo list generation with dependencies
  • Real-time progress visualization for agent tools
  • Human-in-the-loop approval for plans
  • Stage management between planning and implementation
  • Dynamic agent configuration via callOptionsSchema and prepareCall
  • Passing runtime context to tools via experimental_context
  • Brand context extraction from URLs using Cheerio

Use Cases

  • Marketing campaign planning and execution
  • Competitor research and analysis
  • Content marketing strategy development
  • SEO research and implementation
  • Market trend analysis
  • Brand positioning research

AI SDK APIs

useChatgatewayToolLoopAgenttool(generateObjecthasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessagecallOptionsSchemaprepareCallexperimental_context

Tags

aiagentsmarketingplanningimplementationai-sdktool-loopweb-scrapingfirecrawlhuman-in-the-looptodo-management

Requirements

Node.js
18+
Memory
512MB
Other
  • OpenAI API key
  • Firecrawl API key

Environment Variables

External Services

openaifirecrawl

Ready to use?

View the full interactive pattern with live preview and copy the source code.

View Pattern on Desktop
End of Pattern