How wellington-roveder/reservabot works
ReservaBot is a conversational restaurant-reservation agent. A user submits a message in the Streamlit chat; the app classifies it and blocks an out-of-scope first message, or sends it to the LLM service. The service can iteratively dispatch tools for table listing, availability, reservation creation, lookup, and cancellation; repository queries enforce business rules and persist data in SQLite. The app and service also expose and record operational traces. Arrows are limited to relationships shown in excerpts or explicitly documented in the README; unsampled implementation details are not inferred.
Main entry points: openai_service.py LLM tool agent · app.py Streamlit chat · nlu.py Semantic gatekeeper · queries.py Reservation operations
Components 11
Chat experience
- Streamlit chat
app.py
Conversation services
- Semantic gatekeeper
services/nlu_config/nlu.py - Intent examples
services/nlu_config/intents.json - LLM tool agent
services/openai_service.py - Tool definitions
services/tools.json
Reservation domain
- Reservation operations
repository/queries.py - SQLite connection pool
repository/database.py - SQLite reservation store
Observability
- Trace and cost telemetry
services/telemetry.py
Other components
- Restaurant customer
- OpenAI-compatible API
Connections 11
- Restaurant customer → Streamlit chat: sends message
app.py - Streamlit chat → Semantic gatekeeper: classifies message
app.py - Semantic gatekeeper → Intent examples: loads examples
services/nlu_config/nlu.py - Streamlit chat → LLM tool agent: requests response
app.py - LLM tool agent → OpenAI-compatible API: sends completions
services/openai_service.py - LLM tool agent → Tool definitions: loads tool definitions
services/openai_service.py - LLM tool agent → Reservation operations: dispatches tools
services/openai_service.py - Reservation operations → SQLite connection pool: uses database
repository/queries.py - SQLite connection pool → SQLite reservation store: reads and writes
repository/database.py - Streamlit chat → Trace and cost telemetry: records turn trace
app.py - LLM tool agent → Trace and cost telemetry: calculates cost
services/openai_service.py