Spaces:
Sleeping
Sleeping
| title: AI Support Ticket | |
| emoji: π« | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: docker | |
| pinned: true | |
| # AI Customer Support Ticket Resolution (OpenEnv) | |
| An AI-powered support ticket system using AWS Bedrock for automatic ticket classification and resolution suggestions. | |
| Built by [Jainam H. Maru](https://huggingface.co/dev9269) β Cybersecurity Engineer & AI Security Researcher | |
| ## Features | |
| - **AI Classification** β Automatically categorizes tickets (billing, technical, account, shipping, general) | |
| - **Priority Detection** β AI assigns priority (low / medium / high / critical) | |
| - **Resolution Suggestions** β AI generates resolution drafts using AWS Bedrock (Titan) | |
| - **Confidence Scoring** β High-confidence tickets auto-resolve; low-confidence tickets route to agent review | |
| - **Agent Workflow** β Agents can review, add notes, override AI, and close tickets | |
| - **Live Stats Dashboard** β Real-time metrics on resolution rates and ticket distribution | |
| ## Architecture | |
| ``` | |
| Customer β Submit Ticket β AI Engine (AWS Bedrock) | |
| β | |
| Classify + Generate Resolution | |
| β | |
| confidence β₯ 0.8 β ai_resolved | |
| confidence < 0.8 β agent_review | |
| β | |
| Agent Reviews & Closes | |
| ``` | |
| ## Setup | |
| ### 1. Install dependencies | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| ### 2. Configure environment | |
| ```bash | |
| cp .env.example .env | |
| # Edit .env with your AWS credentials | |
| ``` | |
| ### 3. AWS Bedrock Setup | |
| - Enable **Amazon Titan Text Express** model in AWS Bedrock console | |
| - Ensure your IAM user/role has `bedrock:InvokeModel` permission | |
| ### 4. Run | |
| ```bash | |
| python main.py | |
| ``` | |
| Open http://localhost:8000 | |
| ## API Endpoints | |
| | Method | Endpoint | Description | | |
| |--------|----------|-------------| | |
| | POST | `/tickets` | Submit new ticket (triggers AI analysis) | | |
| | GET | `/tickets` | List tickets (filter by status/priority) | | |
| | GET | `/tickets/{id}` | Get ticket details | | |
| | PATCH | `/tickets/{id}` | Update ticket (agent actions) | | |
| | DELETE | `/tickets/{id}` | Delete ticket | | |
| | GET | `/stats` | Dashboard statistics | | |
| ## Project Structure | |
| ``` | |
| βββ main.py # FastAPI app & routes | |
| βββ ai_engine.py # AWS Bedrock AI classification & resolution | |
| βββ models.py # Pydantic data models | |
| βββ index.html # Frontend UI | |
| βββ tickets.json # Ticket storage | |
| βββ .env.example # Environment config template | |
| βββ requirements.txt | |
| ``` | |