text
stringlengths
0
59.1k
![Landing Page Analyzer](https://cdn.voltagent.dev/examples/with-ad-generator/page-analyzer.png)
Functionality:
- Navigates to websites and analyzes content
- Extracts product names, taglines, value propositions
- Identifies target audience and brand attributes
- Captures screenshots for reference
- Outputs structured JSON data
**Tool usage:** BrowserBase integration includes navigation (page loading), screenshot (visual capture), extraction (structured data), and observation (UI element analysis).
### Instagram Ad Creator Agent
Transforms brand data into Instagram ads via Google Gemini:
<details>
<summary>Show ad-creator.agent.ts</summary>
```typescript
import { Agent } from "@voltagent/core";
import { openai } from "@ai-sdk/openai";
import { Memory } from "@voltagent/core";
import { generateInstagramAdGeminiTool } from "../tools/image-generation/instagram-ad-gemini.tool";
export const createAdCreatorAgent = (memory: Memory) => {
return new Agent({
name: "InstagramAdCreator",
purpose: "Create compelling Instagram ad visuals using Google Gemini AI",
instructions: `You are an Instagram advertising specialist using Google's Gemini AI for ad creation.
Your core competencies:
1. Transform brand insights into compelling Instagram ad concepts
2. Create square format (1:1) optimized ads for Instagram feed
3. Ensure brand consistency while maximizing engagement
4. Apply Instagram-specific best practices
Instagram Ad Guidelines:
- Square format (1:1 aspect ratio, 1024x1024)
- Visual storytelling focus
- Clean, aesthetic designs
- Concise, impactful copy
- Thumb-stopping visuals
- Clear visual hierarchy
- Mobile-first design
- Instagram's visual culture alignment
Creative Process:
1. Analyze brand data from LandingPageAnalyzer
2. Develop creative concepts aligned with brand identity
3. Consider Instagram audience preferences
4. Ensure clear call-to-action integration
Your output should include:
- Generated Instagram ad asset (provide the publicUrl)
- Embed the asset using Markdown: ![Ad Preview](publicUrl)
- Creative rationale
- Performance optimization suggestions
- Engagement predictions`,
model: openai("gpt-4o-mini"),
tools: [generateInstagramAdGeminiTool],
memory,
});
};
```
</details>
![Ad Creator Agent](https://cdn.voltagent.dev/examples/with-ad-generator/instagram-agent.png)
Functionality:
- Converts brand analysis to creative concepts
- Generates 1:1 aspect ratio ads for Instagram feed
- Uses Google Gemini for image generation
- Provides optimization recommendations
- Embeds generated assets for preview
**Configuration:**
- Model: `gpt-4o-mini` for conversational processing
- Instructions define Instagram ad specifications
- Google Gemini tool integration for image generation
- Memory persistence for context retention
- Agent name: `InstagramAdCreator` for logging
**Gemini models:** Uses `gemini-2.0-flash-exp` for creative briefs and `gemini-2.5-flash-image-preview` for image generation.
### Supervisor Agent
The supervisor orchestrates the entire workflow and coordinates both subagents:
<details>
<summary>Show supervisor.agent.ts</summary>
```typescript
import { Agent } from "@voltagent/core";
import { openai } from "@ai-sdk/openai";
import type { Memory } from "@voltagent/core";
import { createLandingPageAnalyzer } from "./landing-page-analyzer.agent";