Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ ASPNETCORE_URLS=http://+:3010
LIS_EXEC_HOST=false # true = exec commands run on host via nsenter (requires pid:host + privileged)

# Database
POSTGRES_PASSWORD=changeme
DATABASE_URL=Host=postgres;Database=lis;Username=lis;Password=changeme

# AI Provider (Anthropic)
ANTHROPIC_ENABLED=true
# Accepts standard API keys (sk-ant-api03-...) or long-lived OAuth tokens from `claude setup-token` (sk-ant-oat01-...).
# OAuth tokens are auto-detected by prefix; set ANTHROPIC_AUTH_MODE=bearer to force bearer auth if needed.
ANTHROPIC_API_KEY=sk-ant-...
ANTHROPIC_MODEL=claude-sonnet-4-20250514
ANTHROPIC_MAX_TOKENS=4096
ANTHROPIC_CONTEXT_BUDGET=12000
ANTHROPIC_THINKING_EFFORT=
ANTHROPIC_AUTH_MODE=
ANTHROPIC_MODEL=claude-sonnet-4-6
ANTHROPIC_MAX_TOKENS=16000
ANTHROPIC_CONTEXT_BUDGET=300000
ANTHROPIC_THINKING_EFFORT= # off | low | medium | high | <token count>
ANTHROPIC_CACHE_ENABLED=true
ANTHROPIC_CACHE_TTL=5m

Expand All @@ -25,7 +29,9 @@ MEMORIES_EMBEDDING_BASE_URL=
# Channel (WhatsApp / GOWA)
GOWA_ENABLED=true
GOWA_BASE_URL=http://gowa:3000
GOWA_DEVICE_ID=default
# After pairing your WhatsApp device (via the GOWA UI QR code), replace this with the real device UUID
# shown in GOWA's /app/devices endpoint. GOWA v8.3.3+ rejects requests with an unknown X-Device-Id.
GOWA_DEVICE_ID=
GOWA_BASIC_AUTH=
GOWA_WEBHOOK_SECRET=changeme

Expand All @@ -37,6 +43,12 @@ LIS_REACT_ON_MESSAGE_QUEUED=false
LIS_REACT_ON_MESSAGE_QUEUED_EMOJI=πŸ•
LIS_TOOL_NOTIFICATIONS=true
LIS_MAX_TOOL_ITERATIONS=10
LIS_GROUP_CONTEXT_MESSAGES= # empty = default; last N consecutive user msgs kept in group context
LIS_NEW_SESSION_ON_AGENT_SWITCH=false

# Web Search (Brave) β€” optional, enables the web_search tool
LIS_WEB_SEARCH_ENABLED=false
LIS_WEB_SEARCH_API_KEY=

# Context Compaction (0 or empty = percentage of ANTHROPIC_CONTEXT_BUDGET)
LIS_KEEP_RECENT_TOKENS=4000
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,20 @@ Lis.Tests β€” xUnit test suite

### Prerequisites
- Docker & Docker Compose
- Anthropic API key ([console.anthropic.com](https://console.anthropic.com))
- Anthropic credentials β€” either:
- An API key from [console.anthropic.com](https://console.anthropic.com) (`sk-ant-api03-...`), or
- A long-lived OAuth token from `claude setup-token` (`sk-ant-oat01-...`) β€” requires Claude Code installed locally

### Setup

```bash
git clone <repo-url> && cd lis
cp .env.example .env
# Edit .env β€” set at minimum:
# ANTHROPIC_API_KEY=sk-ant-...
# ANTHROPIC_API_KEY=sk-ant-... # or sk-ant-oat01-... from `claude setup-token`
# LIS_OWNER_JID=<your-phone>@s.whatsapp.net
# GOWA_WEBHOOK_SECRET=<random-string>
# POSTGRES_PASSWORD=<matches DATABASE_URL password>

docker compose up -d
# Scan QR code at http://localhost:3000
Expand Down Expand Up @@ -277,6 +280,7 @@ OPENAI_API_KEY=sk-... # enables Whisper transcription

| Doc | Topic |
|-----|-------|
| [DEPLOYMENT.md](docs/DEPLOYMENT.md) | Production deployment (Caddy + managed Postgres, two-stack compose) |
| [AGENTS.md](docs/AGENTS.md) | Multi-agent system, per-chat config, agent switching |
| [CONTEXT_COMPACTION.md](docs/CONTEXT_COMPACTION.md) | Rolling compaction, sessions, token tracking, prompt caching |
| [SECURITY_MODEL.md](docs/SECURITY_MODEL.md) | 5-layer defense, tool auth, workspace sandbox |
Expand Down
22 changes: 20 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:

postgres:
container_name: backend-postgres
image: postgres:17-alpine
image: pgvector/pgvector:pg17
restart: always
environment:
POSTGRES_DB: lis
Expand All @@ -31,7 +31,7 @@ services:

gowa:
container_name: gowa
image: aldinokemal/go-whatsapp-web-multidevice:latest
image: aldinokemal2104/go-whatsapp-web-multidevice:v8.3.3
restart: unless-stopped
ports:
- "3000:3000"
Expand All @@ -40,6 +40,24 @@ services:
WHATSAPP_WEBHOOK: "http://backend:3010/webhook/whatsapp"
WHATSAPP_WEBHOOK_SECRET: "${GOWA_WEBHOOK_SECRET}"
WHATSAPP_WEBHOOK_EVENTS: "message"
volumes:
- gowa-data:/app/storages
Copy link
Copy Markdown
Owner

@Hanake0 Hanake0 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to endorse a cannonical setup, i would probably recomend also using pg as the storage backend for gowa.
File Storage is probably fine, but we are alreading setting up pg for the agent, using it for gowa is ok too.

Volume storage is probably recommended to still be kept tho, if you have automatic media download setup on gowa.


# Optional web UI for browsing/editing the Postgres DB during development.
# Enable with: docker compose --profile db-ui up -d
# Then open http://localhost:8081
pgweb:
container_name: pgweb
image: sosedoff/pgweb:latest
restart: unless-stopped
profiles: ["db-ui"]
ports:
- "8081:8081"
environment:
PGWEB_DATABASE_URL: "postgres://lis:${POSTGRES_PASSWORD}@postgres:5432/lis?sslmode=disable"
depends_on:
- postgres

volumes:
pgdata:
gowa-data:
Loading