To enhance the developer experience on Google Cloud, we introduced Dev Signal, a multi-agent system that converts community signals into actionable technical insights.
In the first part of our series, we established the foundational elements of this system, including the project environment and core capabilities via the Model Context Protocol (MCP). We integrated various external sources, such as Reddit for trend analysis and Google Cloud Docs for technical references. For those interested, the complete project can be accessed in our GitHub repository.
Multi-Agent Architecture
In this second installment, we delve into the multi-agent architecture and the integration of the Vertex AI memory bank for personalized interactions. Our system will feature a Root Orchestrator overseeing three specialized agents: the Reddit Scanner, GCP Expert, and Blog Drafter. This setup facilitates a smooth transition from trend discovery to expert content generation.
Infrastructure and Model Setup
We begin by initializing the environment and the shared Gemini model. The following code snippet is essential for setting up the dev_signal_agent/agent.py:
from google.adk.agents import Agent
from google.adk.apps import App
from google.adk.models import Gemini
from google.adk.tools import google_search, AgentTool, load_memory_tool, preload_memory_tool
from google.adk.tools.tool_context import ToolContext
from google.genai import types
from dev_signal_agent.app_utils.env import init_environment
PROJECT_ID, MODEL_LOC, SERVICE_LOC, SECRETS = init_environment()
shared_model = Gemini(
model="gemini-3-flash-preview",
vertexai=True,
project=PROJECT_ID,
location=MODEL_LOC,
retry_options=types.HttpRetryOptions(attempts=3),
) Memory Management
Dev Signal is designed to learn from user interactions, capturing preferences such as technical interests or blogging styles. This personalization is achieved through the Vertex AI memory bank, which retains session history across conversations.
Long-term Memory
The save_session_to_memory_callback function automates memory storage after each interaction, ensuring seamless data retention. The process includes:
- Ingestion: Conversation data is sent to Vertex AI.
- Embedding: Text is transformed into numerical vectors to capture meaning.
- Storage: Vectors are stored in a managed index for future retrieval.
- Retrieval: The agent recalls history using built-in tools, ensuring relevant context is available during interactions.
Short-term Memory
The add_info_to_state function allows for short-term memory management, enabling the GCP Expert to share findings with the Blog Drafter within the same session. This memory is managed by the Vertex AI Session Service, ensuring continuity during active interactions.
Specialist Agents
Reddit Scanner
The Reddit Scanner identifies trending topics by analyzing high-engagement questions from the past three weeks. It utilizes memory to prioritize user-specific interests, ensuring a tailored discovery experience.
GCP Expert
This agent synthesizes information from official documentation, community insights, and broader web searches to provide accurate technical answers.
Blog Drafter
Responsible for creating blog content, this agent checks user preferences for writing style and drafts engaging posts based on expert findings.
The Root Orchestrator
The Root Orchestrator coordinates the activities of the specialist agents, tailoring interactions based on user history and preferences. It ensures a cohesive experience from trend discovery to content creation.
Conclusion
In this part of our series, we established a multi-agent architecture with a sophisticated memory system. The integration of short-term and long-term memory allows the agent to learn from user feedback and retain stylistic preferences across sessions. In the upcoming Part 3, we will demonstrate how to test the agent locally before deploying it on Google Cloud Run in Part 4. For those eager to explore the implementation, it is available on GitHub.
To learn more about the technology behind this system, check out the Vertex AI Memory Bank overview and the official ADK Documentation.