This post is my submission for DEV Education Track: Build Multi-Agent Systems with ADK.
Finding the perfect, thoughtful gift shouldn't feel like a chore.
Whether it's for a birthday, anniversary, or holiday, we all experience gift-buying paralysis:
To solve this, I built GiftAdvisor. It is an intelligent, consumer-friendly gift recommendation system built with Google Agent Development Kit (ADK), Gemini ( gemini-3.1-flash-lite), and deployed seamlessly to
GiftAdvisor transforms unstructured descriptions of a person into tailored, ranked, and strictly budget-compliant gift recommendations.
Instead of dumping everything into a single monolithic prompt, GiftAdvisor splits the cognitive load across three specialized AI agents orchestrated via Google ADK:
LlmAgent
, SequentialAgent
, and InMemorySessionService
.min-instances=0
(scales to zero when idle for $0.00 base cost)..md
), JSON (.json
), Clipboard, or Print / Save as PDF.ProfileAnalyzerAgent
)
recipient_profile
profile_analyzer_agent = LlmAgent(
name="ProfileAnalyzerAgent",
model=model_name,
instruction="""
You are an expert gift persona analyzer.
Analyze the recipient's description, occasion, and relationship.
Extract key traits, hobbies, lifestyle context, and explicit anti-preferences (what to avoid).
Save your structured analysis to session state key 'recipient_profile'.
""",
output_key="recipient_profile",
)
IdeaFinderAgent
)
{recipient_profile}
from the session state and ideates 6–10 candidate ideas across diverse categories (e.g., candidate_gift_ideas
idea_finder_agent = LlmAgent(
name="IdeaFinderAgent",
model=model_name,
instruction="""
You are a creative gift brainstormer.
Given the recipient profile:
{recipient_profile}
Brainstorm 6 to 10 distinct, creative gift ideas across multiple categories.
For each idea, provide a realistic estimated market price.
Save your candidate ideas to session state key 'candidate_gift_ideas'.
""",
output_key="candidate_gift_ideas",
)
BudgetFilterAgent
)
{candidate_gift_ideas}
, {budget_limit}
, and {currency}
. It validates each candidate against the budget ceiling. Any item that exceeds the budget is logged in an final_gift_recommendations
budget_filter_agent = LlmAgent(
name="BudgetFilterAgent",
model=model_name,
instruction="""
You are a meticulous gift budget auditor and curator.
Budget Limit: {budget_limit} {currency}
Candidate Ideas:
{candidate_gift_ideas}
1. Audit each idea against the budget ceiling.
2. Eliminate items that exceed the limit and suggest budget-friendly alternatives.
3. Present the Top 3-5 Recommended Gifts formatted into budget tiers with rationale.
Save the final report to session state key 'final_gift_recommendations'.
""",
output_key="final_gift_recommendations",
)
SequentialAgent
Google ADK makes chaining agents intuitive using SequentialAgent
. State flows from one agent's output_key
directly into the next agent's prompt template variables:
gift_advisor_pipeline = SequentialAgent(
name="GiftAdvisorPipeline",
sub_agents=[
profile_analyzer_agent,
idea_finder_agent,
budget_filter_agent,
],
)
google-adk
(Agent Development Kit v2.7.0)gemini-3.1-flash-lite
(via google-genai
)To keep running costs near $0.00 while maintaining rapid startup times:
min-instances = 0
memory = 512MiB
& cpu = 1 vCPU
gemini-3.1-flash-lite
Separation of Concerns Prevents Hallucination:
When asking a single LLM prompt to analyze personality, brainstorm 10 items, and filter by budget simultaneously, it often ignores budget limits or produces bland suggestions. By decoupling Analysis -> Ideation -> Budget Auditing into separate ADK agents, each agent performs its task with significantly higher precision.
Session State is the Superpower of ADK:
Using InMemorySessionService
and prompt variable injection ({recipient_profile}
, {candidate_gift_ideas}
) made passing structured context between agents clean, traceable, and modular.
Cloud Run + Gemini is a Perfect Match:
Deploying containerized Python agent applications to Cloud Run gives you an instant HTTPS public API with scale-to-zero economics. No idle server bills, automatic TLS certificates, and global scaling out of the box.
Building GiftAdvisor with Google ADK demonstrated how accessible and clean multi-agent orchestration has become in Python.