How jwg12345/enterprise-ai-agent works
This repository is a Korean-language enterprise incident-response demo. Operators query incidents and can search manuals for evidence-grounded answers; operators can also generate a ticket draft, review it, and approve or reject it before Spring creates a ticket. Ticket runs can be inspected and resumed, with agent checkpoints separated from Spring’s approval and ticket records. The README documents the broader integrations and safety boundaries; some routing and persistence details are unsampled, so those links are omitted or marked unverified.
Main entry points: main.py FastAPI service · ticket_runtime.py Ticket run runtime · store.py RAG index and search · app.py Streamlit app
Components 23
Operator UI
- Streamlit app
demo-ui/app.py - Incident query client
demo-ui/api_client.py - Ticket review UI
demo-ui/tickets_ui.py
AI API
- FastAPI service
ai-service/app/main.py - Answer service
ai-service/app/agent/service.py - Answer graph
ai-service/app/agent/graph.py - Grounded answers
ai-service/app/agent/answers.py - Incident contracts
ai-service/app/models.py
Manual search
- RAG index and search
ai-service/app/rag/store.py - Manual chunks
ai-service/app/rag/documents.py - ChromaDB
Ticket workflow
- Draft preview API
ai-service/app/draft_previews.py - Draft generation
ai-service/app/agent/draft_preview.py - Ticket run runtime
ai-service/app/agent/ticket_runtime.py - Ticket execution graph
ai-service/app/agent/ticket_graph.py - Run registry
ai-service/app/ticket_runs.py - Graph checkpoints
ai-service/app/agent/checkpoints.py - Approval proxy
ai-service/app/approvals.py - Agent PostgreSQL
Business system
- Spring business API
- Business PostgreSQL
Other components
- Operator
- LLM endpoint
Connections 29
- Operator → Streamlit app: uses
- Streamlit app → Incident query client: fetches incidents
demo-ui/app.py - Incident query client → FastAPI service: requests incidents
demo-ui/api_client.py - Streamlit app → Ticket review UI: renders tickets
demo-ui/app.py - Ticket review UI → FastAPI service: requests ticket actions
demo-ui/tickets_ui.py - FastAPI service → Spring business API: queries incidents
- Spring business API → Business PostgreSQL: stores tickets
- FastAPI service → Answer service: starts and invokes
ai-service/app/main.py - Answer service → Answer graph: builds and invokes
ai-service/app/agent/service.py - Answer graph → Grounded answers: generates answers
ai-service/app/agent/graph.py - Answer service → RAG index and search: searches evidence
ai-service/app/agent/service.py - Grounded answers → LLM endpoint: requests completion
ai-service/app/agent/answers.py - Grounded answers → Incident contracts: validates query
ai-service/app/agent/answers.py - RAG index and search → ChromaDB: queries index
ai-service/app/rag/store.py - RAG index and search → Manual chunks: loads chunks
ai-service/app/rag/store.py - FastAPI service → Draft preview API: routes preview
ai-service/app/main.py - Draft preview API → RAG index and search: searches evidence
ai-service/app/draft_previews.py - Draft preview API → Draft generation: generates preview
ai-service/app/draft_previews.py - Draft generation → LLM endpoint: requests completion
ai-service/app/agent/draft_preview.py - Ticket review UI → FastAPI service: submits draft and decisions
- FastAPI service → Run registry: serves run operations
ai-service/app/main.py - Run registry → Ticket run runtime: delegates runs
ai-service/app/ticket_runs.py - Ticket run runtime → Ticket execution graph: builds and resumes
ai-service/app/agent/ticket_runtime.py - Ticket run runtime → Graph checkpoints: opens checkpoints
ai-service/app/agent/ticket_runtime.py - Ticket run runtime → Agent PostgreSQL: stores run ownership
ai-service/app/agent/ticket_runtime.py - Ticket run runtime → Spring business API: calls approval and ticket APIs
ai-service/app/agent/ticket_runtime.py - FastAPI service → Approval proxy: routes approval operations
ai-service/app/main.py - Approval proxy → Spring business API: forwards approvals and tickets
ai-service/app/approvals.py - Spring business API → Business PostgreSQL: persists approvals and tickets