๐ซ Customer Support Ticketing Agent with Structured Output
A tutorial demonstrating how to implement a structured customer support ticketing system using Google's ADK (Agent Development Kit) framework. This example shows how to create type-safe, structured support tickets with priority levels, categories, and resolution estimates using Pydantic schemas and
Sign in to save downloads to your library and vote.
Preview
๐ซ Customer Support Ticketing Agent with Structured Output
A tutorial demonstrating how to implement a structured customer support ticketing system using Google's ADK (Agent Development Kit) framework. This example shows how to create type-safe, structured support tickets with priority levels, categories, and resolution estimates using Pydantic schemas and Gemini 3 Flash model.
Tutorial Features
-
๐ซ Structured Support Tickets:
- Learn how to create comprehensive support ticket schemas
- Understand priority levels and categorization
- See how to estimate resolution times
-
๐ง Advanced Schema Design:
- Complex Pydantic models with enums and optional fields
- Proper field validation and descriptions
- Type-safe structured responses
-
๐ฏ Real-World Application:
- Practical customer support use case
- Shows how to handle different types of support requests
- Demonstrates structured output for business processes
-
๐ Priority Management:
- Four-tier priority system (Low, Medium, High, Critical)
- Automatic priority assignment based on issue description
- Category-based routing for different departments
๐ Getting Started
-
Set up your environment:
cd 3_1_customer_support_ticket_agent # Copy the environment template cp env.example .env # Edit .env and add your Google AI API key # Get your API key from: https://aistudio.google.com/ -
Install dependencies:
# Navigate back to the directory cd .. # Install required packages pip install -r requirements.txt -
Run the Agent
# Start the ADK web interface adk webThen:
- Open the web interface in your browser
- Select the "support_ticket_creator" agent
- Enter your support request (e.g., "I can't log into my account and I have an important meeting in 2 hours")
- The response will be a structured JSON with all ticket details
Tutorial Overview
This tutorial demonstrates advanced structured output implementation in Google ADK:
- Complex Schema Design: Learn how to create sophisticated Pydantic models
- Enum Usage: Understand how to use enums for constrained values
- Optional Fields: See how to handle optional data with proper defaults
- Business Logic: Learn how to implement real-world business processes
Code Structure
customer_support_agent/agent.py: Contains the main agent definition and SupportTicket schemacustomer_support_agent/__init__.py: Module initialization for easy imports
Support Ticket Schema
The agent creates structured tickets with the following fields:
- title: Concise summary of the issue
- description: Detailed problem description
- priority: Priority level (low, medium, high, critical)
- category: Department (Technical, Billing, Account, Product)
- steps_to_reproduce: Optional list of steps for technical issues
- estimated_resolution_time: Estimated time to resolve
Example Usage
Input: "My payment failed and I'm getting charged twice for the same service"
Output:
{
"title": "Duplicate payment charge issue",
"description": "Customer reports payment failure followed by duplicate charges for the same service",
"priority": "high",
"category": "Billing",
"steps_to_reproduce": null,
"estimated_resolution_time": "4-6 hours"
}
Dependencies
google-adk: Google's Agent Development Kitpydantic: Data validation and settings management
How Structured Output Works
This tutorial shows how Google ADK handles complex structured output:
- Input Processing: Takes natural language support requests
- Context Analysis: Analyzes the issue severity and type
- Structured Generation: Creates comprehensive tickets with all required fields
- Validation: Ensures output matches the defined schema and business rules
This approach demonstrates how to create reliable, business-ready structured responses in Google ADK applications.
Ingestion metadata
- Source catalog
- awesome-llm-apps
- Repository
- Shubhamsaboo/awesome-llm-apps ยท main
- File path
- ai_agent_framework_crash_course/google_adk_crash_course/3_structured_output_agent/3_1_customer_support_ticket_agent/README.md
- Last refreshed
- 7/24/2026, 3:00:13 AM (51m ago)
- Refresh schedule
- Daily ยท 03:00 UTC
- Dedupe status
- Unique ยท deduped by (source, url)