ShopWave processes 20 simulated support tickets with a concurrent ReAct-style loop that:
- ingests tickets from JSON
- gathers customer, order, product, and policy context
- classifies and triages through the planner state
- resolves when it is safe to do so
- escalates with a structured summary when policy or confidence requires it
- logs every tool call, retry, validation failure, reasoning step, and final outcome
| Layer | Choice |
|---|---|
| Backend | Python, FastAPI, asyncio, Pydantic |
| Agent loop | Custom ReAct orchestration |
| LLM | Gemini-assisted planning and confidence scoring with deterministic fallback |
| Frontend | Next.js 16, React 19 |
| Design system | Storybook 10 |
| Packaging | Docker + docker-compose |
- Concurrent processing with
asyncio.gather - Minimum 3 tool calls per reasoning chain
- Real tool-using agent loop
- Gemini-assisted planner and confidence scorer when
GEMINI_API_KEYis present - Deterministic fallback planning if the model is unavailable
- Deterministic failure injection:
- timeout on one
get_customercall - malformed
get_orderresponse on one call - partial
search_knowledge_baseresponse on one call
- timeout on one
- Retry budgets with exponential backoff
- Schema validation before agent actions
- Dead-letter queue persistence
- Confidence scoring with automatic escalation below
0.6 - Structured audit log for all 20 tickets
- Responsive frontend dashboard with analytics and ticket drill-down
- Storybook component coverage
backend/
agent/ # planner, evaluator, loop, executor
api/ # FastAPI routes
core/ # logger, retries, validator, state manager, DLQ, LLM client
data/ # customers, orders, products, tickets, KB
tools/ # read and write tool implementations
audit_log.json
dead_letter_queue.json
frontend/
src/app/ # dashboard, analytics, ticket detail
src/components/ # Storybook-backed UI pieces
src/stories/ # component documentation
architecture.png
failure_modes.md
docker-compose.yml
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python main.pycd frontend
npm install
npm run devOpen http://localhost:3000.
Create backend/.env:
GEMINI_API_KEY=your_key_here
Important:
backend/.envis ignored by.gitignore- never commit real API keys to the public repo
If the key is missing or Gemini fails, the agent still runs using deterministic fallback logic.
cd frontend
npm run storybookdocker-compose up --buildFrontend runs on http://localhost:3000 and backend on http://localhost:8000.
- Start backend and frontend, or run Docker.
- Open
http://localhost:3000. - Click
Run Agent. - In
Ticket Queue, click the customer name to open customer details and all queries related to that customer. - Review ticket outcomes and analytics.
Start processing:
curl -X POST http://localhost:8000/api/runInspect status:
curl http://localhost:8000/api/statusInspect full audit log:
curl http://localhost:8000/api/audit-log| Endpoint | Method | Purpose |
|---|---|---|
/api/run |
POST | Start processing all tickets |
/api/status |
GET | Job status and ticket states |
/api/tickets |
GET | Ticket summaries |
/api/tickets/{ticket_id} |
GET | Full audit trail |
/api/customers |
GET | Customer directory (name/email/tier) |
/api/customers/{customer_email} |
GET | Customer profile + all related queries |
/api/analytics |
GET | Aggregate metrics |
/api/audit-log |
GET | Full audit log |
/api/dead-letters |
GET | DLQ contents |
Note: customer_email in /api/customers/{customer_email} should be URL encoded.
Example: alice.turner@email.com -> alice.turner%40email.com.
README.mdarchitecture.pngfailure_modes.mdbackend/audit_log.jsonbackend/dead_letter_queue.json- Storybook stories in
frontend/src/stories
- Push the full project to a public GitHub repository named
hackathon2026-pranika. - Confirm these files are present before submission:
README.mdarchitecture.pngorarchitecture.pdffailure_modes.mdbackend/audit_log.jsonoraudit_log.txt- recorded demo
- Make sure no secrets are committed:
- keep
backend/.envlocal only - check GitHub history for any accidental API key commits
- keep
- Make sure the audit log covers all 20 tickets.
- Make sure the app can be started with a single documented workflow:
- local backend + frontend commands, or
docker-compose up --build
- Backend starts successfully
- Frontend starts successfully
Run Agentprocesses all 20 tickets- Audit log is regenerated from a fresh run
- Architecture document and failure analysis are present
- Recorded demo is prepared