Content Generation Agent with Image Creation
Automate your content pipeline — from research to blog post to cover image
The Problem
Content creation at scale — blog posts, social media, images — requires coordinating research, writing, image generation, and brand consistency. Manual workflows are slow and inconsistent.
The Solution
Deep Agents' file-based configuration (AGENTS.md for brand voice, skills/ for content templates) creates a content pipeline. Sub-agents handle research, the main agent writes content following brand guidelines, and custom tools generate images via Gemini.
Working Code
from deepagents import create_deep_agentfrom deepagents.backends import FilesystemBackendfrom langchain_core.tools import tool
@tooldef generate_cover(prompt: str, slug: str) -> str: """Generate a cover image for a blog post.""" from google import genai client = genai.Client() response = client.models.generate_content( model="gemini-2.5-flash-image", contents=[prompt], ) for part in response.parts: if part.inline_data is not None: image = part.as_image() image.save(f"blogs/{slug}/hero.png") return f"Image saved to blogs/{slug}/hero.png" return "No image generated"
agent = create_deep_agent( memory=["./AGENTS.md"], skills=["./skills/"], tools=[generate_cover], subagents=[{"name": "researcher", "description": "Research topics", "tools": [web_search]}], backend=FilesystemBackend(root_dir="."),)Step by Step
Define brand voice (AGENTS.md)
Create an AGENTS.md file that describes your brand voice, writing style, target audience, and content rules. The agent reads this at startup and follows it for every piece of content.
Create content skills
Add markdown skill files in `skills/` for different content types: blog posts, social media threads, newsletters. Each skill defines structure, tone, and formatting rules.
Add image generation tools
Create custom tools using the `@tool` decorator for image generation via Gemini, DALL-E, or other providers. The agent calls these tools automatically when creating visual content.
Configure research sub-agents
Add sub-agents for research tasks — web search, competitor analysis, trend monitoring. They gather information that the main content agent uses for writing.
Generate content
Invoke the agent with a content brief. It will research the topic, write the content following your brand guidelines, generate a cover image, and save everything to disk.
Related Use Cases
Deep Research Agent with Sub-Agents
Build a research agent that breaks complex topics into sub-tasks, delegates to specialist sub-agents, searches the web, and synthesizes findings into a structured report.
Automated Code Review Agent
Build an agent that navigates codebases, reads files, searches for patterns with grep/glob, identifies bugs and security issues, and writes detailed review reports — all with built-in filesystem tools and sandboxing.
Ready to build this?
Get started with Vstorm's open-source tools — production-tested, fully documented, and free.
Get StartedReady to build your first production AI agent?
Open-source tools, battle-tested patterns, zero boilerplate. Configure your stack and ship in minutes — not months.