How kasamshaikh/agentic-customer-email-response works
Customer Mail Agent is a human-reviewed email triage and reply application. A customer submits an email through the console; the API stores it and invokes the reasoning pipeline, which classifies the request, retrieves FAQ passages, and drafts a reply. A reviewer can request revisions or approve and edit the final text; approval writes a sent-email artifact and audit record. Separate bootstrap code uploads the FAQ corpus and provisions its search index and optional hosted agent. Runtime wiring is based on sampled source; console interactions and broader capabilities are described in the README.
Main entry points: main.py FastAPI endpoints · bootstrap.py Knowledge bootstrap · agent_client.py Agent client · index.html Web console
Components 16
Mail workflow
- Web console
app/static/index.html - FastAPI endpoints
app/main.py - Request models
app/models.py
Grounding and reasoning
- Agent client
app/agent_client.py - AI Search
- Foundry models
- Hosted agent
Mail records
- Blob access
app/storage.py - Mail containers
Knowledge setup
- Knowledge bootstrap
bootstrap/bootstrap.py - FAQ corpus
knowledge/snapshot - Search index builder
bootstrap/search_index.py - Hosted agent setup
bootstrap/agent_setup.py - Knowledge blob container
Other components
- Customer
- Human reviewer
Connections 20
- Customer → Web console: submits email
- Web console → FastAPI endpoints: calls endpoints
- FastAPI endpoints → Request models: validates requests
- FastAPI endpoints → Blob access: stores and reads
- FastAPI endpoints → Agent client: runs or redrafts
- FastAPI endpoints → Web console: returns results
- Human reviewer → Web console: reviews and approves
- Agent client → AI Search: queries FAQ index
- Agent client → Foundry models: requests draft
- Agent client → Hosted agent: invokes optionally
- Hosted agent → AI Search: uses search tool
- Blob access → Mail containers: reads and writes
- Knowledge bootstrap → FAQ corpus: loads FAQ files
- Knowledge bootstrap → Knowledge blob container: uploads corpus
- Knowledge bootstrap → Search index builder: builds index
- Search index builder → Knowledge blob container: indexes blob content
- Search index builder → AI Search: creates and populates
- Knowledge bootstrap → Hosted agent setup: creates optionally
- Hosted agent setup → Hosted agent: provisions agent
- Hosted agent setup → AI Search: configures connection