Lex-Helper¶
Build Amazon Lex chatbots with confidence¶
A modern, type-safe Python library that eliminates the complexity of Lex development
Stop wrestling with nested dictionaries and runtime errors. Lex-Helper provides a clean, intuitive API that makes building production-ready chatbots fast and reliable.
from lex_helper import LexHelper, Config, SessionAttributes
class MySessionAttributes(SessionAttributes):
user_name: str = ""
visit_count: int = 0
def lambda_handler(event, context):
config = Config(
session_attributes=MySessionAttributes(),
package_name="my_bot.intents"
)
lex_helper = LexHelper(config=config)
return lex_helper.handler(event, context)
Why developers choose Lex-Helper¶
Type-Safe Development¶
Define session attributes as Pydantic models with full IDE support. Catch errors at development time, not in production.

Organized Intent Management¶
Each intent lives in its own file with automatic discovery. Scale your bot without losing track of your code.

Smart Disambiguation¶
Automatically handle ambiguous user input with AI-powered clarification using Amazon Bedrock integration.
Multi-Channel Support¶
Built-in formatting for SMS, web, and voice channels. One codebase, multiple interfaces.
Internationalization¶
Seamless multi-language support with automatic locale detection and fallbacks.
AWS Native¶
Built specifically for AWS Lambda and Lex with optimized performance and native integrations.
- Lambda Layer deployment support
- Bedrock AI integration
- CloudWatch logging integration
- AWS SDK best practices
Quick start paths¶
5-Minute Quick Start¶
Get a working chatbot running in minutes with our streamlined tutorial.
Complete Tutorial¶
Learn step-by-step with our comprehensive first chatbot guide.
Real-World Example¶
Explore our production-ready airline booking bot implementation.
What's included¶
Core Features - Type-safe session attributes with Pydantic - Automatic intent handler discovery and routing - Comprehensive dialog state management - Multi-channel response formatting - Built-in error handling and logging
Advanced Capabilities - Smart disambiguation with AI-powered responses - Amazon Bedrock integration for enhanced AI features - Message management with internationalization - Production deployment patterns - Comprehensive testing utilities
Developer Experience - Full TypeScript-style type hints - IDE autocomplete and error detection - Extensive documentation and examples - Active community support - Regular updates and maintenance