Intelligent assistant with ClickHouse, Wiki, and API integrations.
- Python 3.14+
- uv package manager
- Docker (optional, for container deployment)
uv syncuv run uvicorn packages.api.app:app --reloadThe API is available at http://localhost:8000
curl http://localhost:8000/healthExpected response:
{"status": "healthy", "version": "0.1.0"}uv run ruff check . # Lint
uv run ruff format . # Format
uv run ty check # Type checkuv run pytestuv run ruff check . && uv run ruff format --check . && uv run ty check && uv run pytestuv run deadlock-assistant| Shortcut | Action |
|---|---|
| Ctrl+Q | Quit |
| Ctrl+L | Clear |
| Enter | Submit |
docker build -t deadlock-ai-assistant .docker run -p 8000:8000 deadlock-ai-assistantCopy .env.example to .env and configure the required variables:
cp .env.example .env| Variable | Description | Required | Default | Example |
|---|---|---|---|---|
ANTHROPIC_API_KEY |
Anthropic API key for Claude AI | Yes | - | sk-ant-api03-... |
API_KEYS |
Comma-separated list of valid API keys for authentication | No | - | key1,key2,key3 |
TURNSTILE_SECRET_KEY |
Cloudflare Turnstile secret for browser auth | No | - | 0x4AAA... |
REDIS_URL |
Redis connection URL for conversation storage | No | - | redis://localhost:6379/0 |
LOG_LEVEL |
Application log level | No | INFO |
DEBUG, INFO, WARNING, ERROR |
CONVERSATION_TTL |
Conversation expiration in seconds | No | 86400 (24h) |
3600 |
AGENT_TIMEOUT_SECONDS |
AI response timeout in seconds | No | 60 |
120 |
- ANTHROPIC_API_KEY: Required for both API and CLI. Get your key from Anthropic Console.
- API_KEYS: Enable API key authentication. If not set, authentication is disabled (not recommended for production).
- TURNSTILE_SECRET_KEY: Enable Cloudflare Turnstile verification as an alternative to API keys.
- REDIS_URL: Enable persistent conversation history. Without this, conversations are not persisted.
- LOG_LEVEL: Control log verbosity. Use
DEBUGfor development. - CONVERSATION_TTL: Control how long conversations are kept in Redis.
- AGENT_TIMEOUT_SECONDS: Increase for longer responses; decrease for faster failures.
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc