How googlecloudplatform/ces-genesys-chat works
Genesys Chat Adapter for CXAS is a FastAPI middleware that accepts Genesys Bot Connector turns, authenticates and routes them to a CXAS deployment, then translates CXAS responses into Genesys messages and intents. Its principal workflow includes session and turn tracking, including intent rotation for loop prevention, and supports Firestore-backed or in-memory session state. Configuration resolves API keys and runtime settings; structured logging adds request correlation. Source excerpts are partial, so the graph includes README-documented capabilities where implementation details were not sampled.
Main entry points: main.py Utterance endpoint · config.py Runtime configuration · logging_utils.py Structured request logging
Components 14
Genesys ingress
- Utterance endpoint
src/main.py - API key authentication
src/main.py
Turn adapter
- Deployment routing
src/main.py - Request translation
src/main.py - Response translation
src/main.py - Intent rotation
src/main.py
Session state
- Session and turn tracking
src/main.py - In-memory session cache
src/main.py - Firestore sessions
Configuration and observability
- Runtime configuration
src/config.py - Structured request logging
src/logging_utils.py
Other components
- Genesys Bot Connector
- Secret Manager
- CXAS CES API
Connections 15
- Genesys Bot Connector → Utterance endpoint: posts turn
README.md - Utterance endpoint → API key authentication: checks key
README.md - API key authentication → Runtime configuration: uses keys
src/main.py - Runtime configuration → Secret Manager: resolves secrets
src/config.py - Utterance endpoint → Deployment routing: routes turn
src/main.py - Deployment routing → Session and turn tracking: loads mapping
src/main.py - Deployment routing → Request translation: provides deployment
src/main.py - Request translation → CXAS CES API: posts utterance
README.md - CXAS CES API → Response translation: returns result
README.md - Response translation → Intent rotation: selects intent
README.md - Response translation → Genesys Bot Connector: returns reply
README.md - Session and turn tracking → In-memory session cache: reads and writes
src/main.py - Session and turn tracking → Firestore sessions: reads and writes
README.md - Utterance endpoint → Structured request logging: binds request context
src/main.py - Utterance endpoint → Runtime configuration: uses settings
src/main.py