Back to Prompt Library
planning
Google ADK Agent Setup with Gemini 2.5 Pro
Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.
Linked challenge: Multimodal Content Generator for Brand Safety
Format
Code-aware
Lines
15
Sections
6
Linked challenge
Multimodal Content Generator for Brand Safety
Prompt source
Original prompt text with formatting preserved for inspection.
15 lines
6 sections
No variables
1 code block
Initialize your Google ADK environment and define a primary agent that leverages Gemini 2.5 Pro for its core generative capabilities. Structure the agent to handle multimodal inputs and produce structured multimodal outputs. Ensure the agent is configured to use Vertex AI for model access.
```python
import google.generativeai as genai
import vertexai
from vertexai.preview.generative_models import GenerationConfig, GenerativeModel, Part, Tool
# Initialize Vertex AI
vertexai.init(project="YOUR_GCP_PROJECT_ID", location="YOUR_GCP_REGION")
# Configure Gemini 2.5 Pro
model = GenerativeModel("gemini-1.5-pro-preview-0514") # Use 1.5 Pro as a stand-in if 2.5 Pro not public yet
def generate_multimodal_concept(topic: str, audience: str) -> dict:
prompt = f"Generate a short video concept for '{topic}' targeting '{audience}'. Provide a script, visual description, and audio cues in JSON format.\nScript:\nVisual Description:\nAudio Cues:"
response = model.generate_content(prompt, generation_config=GenerationConfig(response_mime_type="application/json"))
return response.candidates[0].content.parts[0].text
# In a full ADK agent, this would be wrapped as a tool or agent capability.
```Adaptation plan
Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.
Keep stable
Preserve the role framing, objective, and reporting structure so comparison runs stay coherent.
Tune next
Swap in your own domain constraints, anomaly thresholds, and examples before you branch variants.
Verify after
Check whether the prompt asks for the right evidence, confidence signal, and escalation path.