0

Support Ticket Agent

awesome-llm-apps2_1_support_ticket_agent

A structured output agent demonstrating Pydantic schema-based responses for customer support ticket creation.

Sign in to save downloads to your library and vote.

Preview

Support Ticket Agent

A structured output agent demonstrating Pydantic schema-based responses for customer support ticket creation.

๐ŸŽฏ What This Demonstrates

  • Structured Output: Using Pydantic models to define response schemas
  • Enum Types: Priority levels with controlled values
  • Optional Fields: Flexible schema with required and optional properties
  • Field Validation: Input validation and description metadata

๐Ÿš€ Quick Start

  1. Install OpenAI Agents SDK:

    pip install openai-agents
    
  2. Set up environment:

    cp ../env.example .env
    # Edit .env and add your OpenAI API key
    
  3. Run the agent:

    from agents import Runner
    from agent import root_agent
    
    result = Runner.run_sync(root_agent, "I can't log into my account and it's urgent!")
    print(result.final_output)  # Returns SupportTicket object
    

๐Ÿ’ก Key Concepts

  • Pydantic Models: Defining structured response schemas
  • Enum Validation: Priority levels (low, medium, high, critical)
  • Field Descriptions: Helping the LLM understand field requirements
  • Optional Fields: Handling optional vs required data

๐Ÿงช Example Usage

# The agent will return a SupportTicket object like:
{
    "title": "Account Login Issue",
    "description": "User unable to access account",
    "priority": "high",
    "category": "account_access",
    "steps_to_reproduce": ["Go to login page", "Enter credentials", "Error occurs"],
    "estimated_resolution_time": "2-4 hours"
}

๐Ÿ”— Next Steps

Ingestion metadata

Source catalog
awesome-llm-apps
Repository
Shubhamsaboo/awesome-llm-apps ยท main
File path
ai_agent_framework_crash_course/openai_sdk_crash_course/2_structured_output_agent/2_1_support_ticket_agent/README.md
Last refreshed
7/23/2026, 10:39:09 PM (4h ago)
Refresh schedule
Daily ยท 03:00 UTC
Dedupe status
Unique ยท deduped by (source, url)