AI-powered email support agent with LangGraph and Google Gemini that classifies emails, searches documentation, handles bug tracking, drafts responses, and manages human review workflows
Email Agent exhibits severe definition quality gaps across all dimensions. Tool descriptions are present but generic (avg ~60 chars, well below 194-char baseline). Input schemas are visible but lack parameter descriptions entirely, critical violation of pattern:tool-description. No output schemas documented. Parameters like 'classification' (object type) and 'search_results' (array) lack type specificity and constraints. Tool names are reasonable (verb_noun pattern) but composition is poor: read_email, classify_intent, search_documentation, draft_response, and send_reply form a rigid pipeline rather than composable units. No error handling guidance, no recovery paths, no idempotent markers. Security concerns: send_reply accepts sender_email as input (should be server-injected); no permission gates on write operations (bug_tracking, send_reply). The codebase shows MCP client integration but tool definitions appear inferred from graph.py/agent.py rather than explicitly registered with full schemas.
Handle bug report classification and tracking
Check recent support tickets for customer
Use LLM to classify email intent and urgency, then route accordingly
Generate response using context and route based on quality
Get customer information from CRM via MCP
Pause for human review using interrupt
Extract and parse email content
No parameter descriptions in any tool schema. Parameters like 'query', 'email', 'classification', 'search_results' lack explanations of expected format, constraints, or purpose. Violates pattern:tool-description baseline (100% of A+ tools have param descriptions).
Output schemas completely undocumented. No tool declares what fields it returns, data types, or structure. LLMs cannot plan downstream calls or extract required data. Violates pattern:tool baseline (100% of A+ tools have documented return types).
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 39 | <=2025-11-25 | v2 |
Search company documentation across MCP sources
Search knowledge base for relevant information
Send the email response via SMTP
Weak parameter typing. 'classification' and 'search_results' declared as generic object/array without field definitions. Ambiguous types force LLMs to guess structure. Violates pattern:constrained-input and review:param-validation-rules.
No error handling or recovery guidance. Tools lack descriptions of failure modes, retryability, or next steps. Violates pattern:recovery-guide and pattern:error-classification.
Security: send_reply accepts 'sender_email' as input parameter. Credentials and sender identity should be server-injected, not user-provided. Violates pattern:secret-injection. Also, bug_tracking and send_reply (WRITE operations) lack permission gates.