How jemuelbjeroham/lisa works
LISA is a conversational assistant with general-enquiry and technical-clarification routes. A chat request loads conversation state, adds the user message, invokes the conversation graph, then saves the resulting state and returns or streams the response. Technical clarification plans knowledge retrieval and can use a hypothetical document (HyDE) before grounding its answer. The graph preserves that workflow alongside memory persistence and MCP knowledge access. The README is empty; connections for some unsampled components are omitted where the excerpts do not establish call direction.
Main entry points: application.py Chat application · graph.py Conversation graph · technical_clarification.py Technical clarification · memory_repository.py Postgres adapter
Components 24
Conversation runtime
- Chat application
src/lisa/application.py - Conversation store
src/lisa/conversation/store.py - Redis store
src/lisa/conversation/redis.py - In-memory store
src/lisa/conversation/in_memory.py - State serialization
src/lisa/conversation/serialization.py - Conversation graph
src/lisa/graph.py - Conversation state
src/lisa/state.py - Stream events
src/lisa/streaming/events.py
Knowledge and agents
- General enquiry
src/lisa/agents/general_enquiry.py - Technical clarification
src/lisa/agents/technical_clarification.py - Retrieval planner
src/lisa/retrieval/planning.py - Knowledge retriever
src/lisa/knowledge/mcp_retriever.py - MCP client
src/lisa/mcp/client.py
Models and routing
- Route orchestrator
src/lisa/orchestrator.py - Routing policy
src/lisa/routing.py - Model factory
src/lisa/model.py - Model resilience
src/lisa/model_resilience.py
Memory persistence
- Memory service
src/lisa/memory/service.py - Memory repository
src/lisa/memory/repository.py - Postgres adapter
src/lisa/infrastructure/postgres/memory_repository.py - Postgres database
src/lisa/infrastructure/postgres/database.py - Memory model
src/lisa/memory/models.py
Other components
- User
- MCP knowledge server
Connections 26
- User → Chat application: sends message
src/lisa/application.py - Chat application → Conversation store: loads and saves
src/lisa/application.py - Chat application → Conversation graph: invokes
src/lisa/application.py - Chat application → Model factory: creates models
src/lisa/application.py - Chat application → MCP client: opens session
src/lisa/application.py - Chat application → Knowledge retriever: configures
src/lisa/application.py - Redis store → State serialization: serializes state
src/lisa/conversation/redis.py - Redis store → Conversation store: implements
src/lisa/conversation/redis.py - In-memory store → Conversation state: stores state
src/lisa/conversation/in_memory.py - Conversation graph → Route orchestrator: dispatches routing
src/lisa/graph.py - Conversation graph → General enquiry: dispatches
src/lisa/graph.py - Conversation graph → Technical clarification: dispatches
src/lisa/graph.py - Conversation graph → Conversation state: passes state
src/lisa/graph.py - Route orchestrator → Routing policy: uses decision type
src/lisa/orchestrator.py - General enquiry → Model resilience: streams through
src/lisa/agents/general_enquiry.py - General enquiry → Stream events: emits
src/lisa/agents/general_enquiry.py - Technical clarification → Retrieval planner: plans retrieval
src/lisa/agents/technical_clarification.py - Technical clarification → Knowledge retriever: retrieves knowledge
src/lisa/agents/technical_clarification.py - Technical clarification → Stream events: emits
src/lisa/agents/technical_clarification.py - Knowledge retriever → MCP client: calls search tool
src/lisa/knowledge/mcp_retriever.py - MCP client → MCP knowledge server: calls tools
src/lisa/mcp/client.py - Memory service → Memory repository: uses repository
src/lisa/memory/service.py - Memory service → Memory model: handles memories
src/lisa/memory/service.py - Postgres adapter → Memory repository: implements
src/lisa/infrastructure/postgres/memory_repository.py - Postgres adapter → Memory model: persists
src/lisa/infrastructure/postgres/memory_repository.py - Postgres adapter → Postgres database: uses database