Architecture Overview

This series walks through building a production-ready AI agent system deployed on Google Cloud Platform. We’ll cover everything from architecture design to deployment, security, and monitoring.

System Architecture

The system implements a microservices architecture with the following key components:

graph TD
    A[Web Client<br/>Next.js Frontend<br/>Firebase Auth] -->|Bearer Token<br/>User Firebase Token| B[Support Agent<br/>FastAPI<br/>Google ADK Agent<br/>Gemini 2.5 Flash<br/>Token Exchange: User → Service Token<br/>MCP Client JSON-RPC 2.0]
    
    B -->|MCP Calls| C[Product Catalogue MCP]
    B -->|MCP Calls| D[CRM MCP Server]
    B -->|MCP Calls| E[RAG MCP Server]
    
    C -->|Vector Search| F[LanceDB<br/>Vector Database]
    D -->|NoSQL Operations| G[Firestore<br/>NoSQL Database]
    E -->|Vector Operations| H[Vector Store]
    
    style A fill:#2563eb,stroke:#1e40af,stroke-width:2px,color:#fff
    style B fill:#f59e0b,stroke:#d97706,stroke-width:2px,color:#fff
    style C fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
    style D fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
    style E fill:#10b981,stroke:#059669,stroke-width:2px,color:#fff
    style F fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#fff
    style G fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#fff
    style H fill:#8b5cf6,stroke:#7c3aed,stroke-width:2px,color:#fff
    
    linkStyle 0 stroke:#ffffff,stroke-width:2px
    linkStyle 1 stroke:#ffffff,stroke-width:2px
    linkStyle 2 stroke:#ffffff,stroke-width:2px
    linkStyle 3 stroke:#ffffff,stroke-width:2px
    linkStyle 4 stroke:#ffffff,stroke-width:2px
    linkStyle 5 stroke:#ffffff,stroke-width:2px

Key Design Patterns

1. Token Exchange Pattern

User Firebase tokens are validated, then the agent uses a service account token for MCP calls. This ensures:

2. MCP (Model Context Protocol)

Standardized JSON-RPC 2.0 interface for agent-to-service communication:

3. Microservice Architecture

Each MCP server is independently deployable and scalable:

4. FastMCP Integration

Uses Google ADK’s FastMCP for tool definitions and protocol handling:

Technology Stack

What You’ll Learn

Throughout this series, you’ll learn:

  1. Architecture Design: How to structure a cloud-native agent system
  2. Authentication & Security: Token exchange patterns and permission models
  3. MCP Protocol: Implementing standardized agent-to-service communication
  4. Agent Development: Building agents with Google ADK
  5. MCP Server Development: Creating scalable backend services
  6. Deployment: Deploying to Cloud Run with proper configuration
  7. Monitoring & Maintenance: Observability and troubleshooting strategies

Next Steps

In the next article, we’ll dive into the System Components, exploring each service in detail and understanding their responsibilities.