A Django chatbot application with safety monitoring and compliance tracking, powered by LangGraph and Claude AI.
- Interactive Web Chatbot: Clean Django-based interface with real-time chat
- Safety Monitoring: Built-in compliance checking and safety event tracking
- LangGraph Integration: Advanced conversation flow management
- User Authentication: Secure registration and login system
- Session Management: Persistent conversation history
- Python 3.13+
- uv package manager
-
Clone the repository:
git clone <repository-url> cd chatguard
-
Install dependencies:
uv sync
-
Set up environment variables in
.env:DJANGO_SECRET_KEY=your-secret-key-here ANTHROPIC_API_KEY=your-anthropic-api-key-here
-
Run database migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Visit http://127.0.0.1:8000/ to use the chatbot
ruff check .- Run linting checksruff format .- Apply code formattingruff check --fix .- Auto-fix linting issues
config/- Django project configurationchatbot/- Main chatbot applicationmain.py- Legacy CLI chatbot (standalone)
Important: Always set environment variables in production:
DJANGO_SECRET_KEY- Required for Django securityANTHROPIC_API_KEY- Required for Claude AI integration
- Backend: Django 5.2+
- AI: LangGraph + Anthropic Claude 3.5 Sonnet
- Package Management: uv
- Code Quality: Ruff (linting & formatting)
- Database: SQLite (development), configurable for production