How steffanabishake/enterprise-ai-assistant works
Enterprise Knowledge Assistant is a role-aware chat application for searching internal documents and returning answers with supporting passages. The main workflow runs from the Streamlit chat through the FastAPI API, into a routed LangGraph workflow, then through authorized retrieval, optional analysis or service lookup, response generation and citation/safety validation before streaming results. Local mode uses BM25; live mode adds Pinecone and OpenAI. The graph preserves documented ingestion, tracing, and in-memory conversation capabilities. Edges rely on excerpts or README statements; unsampled implementation details are not inferred.
Main entry points: main.py Chat API · graph.py Workflow router · providers.py Provider client · retrieval.py Hybrid retrieval
Components 20
Chat experience
- Streamlit chat
frontend/chat.py
Conversation workflow
- Chat API
app/main.py - Identity and permissions
app/security.py - Request and answer models
app/models.py - Session memory
app/memory.py - Workflow router
app/graph.py - Answer generation
app/graph.py - Citation and safety checks
app/graph.py
Knowledge and retrieval
- Hybrid retrieval
app/retrieval.py - Sample document catalog
data/documents.json - Vector ingestion
scripts/ingest.py
Tools and integrations
- Provider client
app/providers.py - Incident analysis
app/tools.py - MCP service lookup
app/tools.py - Service catalog server
app/mcp_server.py - Execution tracing
app/main.py
Other components
- Chat user
- Pinecone vector index
- OpenAI API
- LangSmith
Connections 23
- Chat user → Streamlit chat: asks question
README.md - Streamlit chat → Chat API: posts chat
README.md - Chat API → Identity and permissions: authenticates and limits
app/main.py - Chat API → Request and answer models: accepts request
app/main.py - Chat API → Session memory: loads and updates
app/main.py - Chat API → Workflow router: streams workflow
app/main.py - Chat API → Execution tracing: configures traces
app/main.py - Workflow router → Hybrid retrieval: routes search
app/graph.py - Hybrid retrieval → Sample document catalog: loads documents
app/retrieval.py - Hybrid retrieval → Identity and permissions: filters access
app/retrieval.py - Workflow router → Incident analysis: calls analysis
app/graph.py - Workflow router → MCP service lookup: calls service lookup
app/graph.py - MCP service lookup → Service catalog server: calls tool
app/tools.py - Hybrid retrieval → Provider client: requests embeddings and search
app/retrieval.py - Provider client → OpenAI API: requests embeddings and completions
app/providers.py - Provider client → Pinecone vector index: queries and upserts vectors
app/providers.py - Vector ingestion → Sample document catalog: loads source documents
scripts/ingest.py - Vector ingestion → Provider client: embeds and upserts
scripts/ingest.py - Workflow router → Answer generation: routes results
app/graph.py - Answer generation → Provider client: requests live answer
app/graph.py - Answer generation → Citation and safety checks: passes answer
app/graph.py - Citation and safety checks → Chat API: streams checked answer
app/main.py - Execution tracing → LangSmith: sends traces
README.md