The most comprehensive AI legal assistant ever created, powered by 805,000+ legal documents spanning the entire US legal system.
- 31 Specialized Slash Commands - Law enforcement, tax law, contracts, and more
- 805,000+ Legal Documents - Complete US legal system coverage
- Voice Message Support - Whisper AI transcription
- Session Memory - 24-hour conversation history
- Smart Caching - 98% semantic similarity matching
- Production Ready - Health checks, metrics, logging, rate limiting
- Node.js 20+
- Redis
- API Keys: Slack, Anthropic (Claude), OpenAI, Pinecone
# Install dependencies
npm install
# Configure environment
cp .env.template .env
# Edit .env with your API keys
# Build
npm run build
# Start Redis
redis-server &
# Run
npm start# Install Vercel CLI
npm i -g vercel
# Deploy
vercel
# Set environment variables in Vercel dashboardnpm run data:process-all# Federal + State + Tax law
npm run data:all-law
# Or individually
npm run data:federal # 1.2 GB, 55k docs
npm run data:state # 2.6 GB, 510k docs
npm run data:tax # 1.3 GB, 225k docs/legal-help- General legal assistance/constitutional- Constitutional analysis/define- Legal term definitions/defend-rights- Legal defense guidance/sovereign-rights- Sovereign citizenship framework
/traffic-stop- Real-time traffic stop defense/warrant-check- Warrant validity verification/miranda-rights- Miranda rights explanation/search-seizure- 4th Amendment rights/remain-silent- 5th Amendment guidance/right-to-counsel- 6th Amendment attorney rights/police-misconduct- File complaint guidance/arrest-rights- What to do when arrested/evidence-suppression- Motion to suppress evidence/qualified-immunity- Challenge qualified immunity
/tax-strategy- Aggressive tax minimization/irs-audit- IRS audit defense/tax-deductions- Maximize deductions/tax-credits- All available credits/offshore-tax- International tax strategies/tax-court- Tax Court litigation/innocent-spouse- Innocent spouse relief/tax-liens- Handle IRS liens/levies/estimated-tax- Quarterly payment strategy/constitutional-tax- Constitutional tax challenges
/contract-review- Contract analysis/legal-research- Case law research/file-lawsuit- Civil lawsuit guidance/appeal-case- Appellate procedure/pro-se- Self-representation guide
/new-session- Reset conversation history
GET /health- Service health checkGET /metrics- System metrics
βββββββββββββββββββββββββββββββββββββββ
β Slack Interface β
β 31 Commands + Voice + Sessions β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββ΄βββββββββββββββββββββββ
β Enhanced Legal Slack Bot β
β Session β Cache β Voice β Legal β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β β β
βββββΌββββ βββββΌβββββ βββββΌββββββ
β Redis β βPineconeβ β Claude β
β β β Vector β β Haiku β
β β β DB β β 4.5 β
βββββββββ ββββββββββ βββββββββββ
| Source | Documents | Size |
|---|---|---|
| Base Legal | 15,000 | 128 MB |
| Federal Law | 55,000 | 1.2 GB |
| State Law | 510,000 | 2.6 GB |
| Tax Law | 225,000 | 1.3 GB |
| TOTAL | 805,000 | 5.2 GB |
See .env.template for all required variables:
SLACK_BOT_TOKEN- Your Slack bot tokenSLACK_SIGNING_SECRET- Slack signing secretANTHROPIC_API_KEY- Claude API keyOPENAI_API_KEY- OpenAI API key (embeddings + Whisper)PINECONE_API_KEY- Pinecone vector DB keyREDIS_URL- Redis connection URL
- One-Time: ~$300 (embeddings)
- Monthly: ~$250-340 (Pinecone + APIs + hosting)
- Per-Query: ~$0.0001
# Development mode with auto-reload
npm run dev
# Build
npm run build
# Lint
npm run lint
# Format
npm run format
# Type check
npm run typecheckdata:extract-pdf- Extract text from PDFsdata:parse-definitions- Parse Black's Law Dictionarydata:parse-constitutional- Parse Constitutiondata:parse-founding- Parse Founding Documentsdata:chunk- Chunk all documentsdata:embed- Generate embeddingsdata:load- Load to Pineconedata:process-all- Run full base pipelinedata:federal- Process federal lawdata:state- Process state lawdata:tax- Process tax lawdata:all-law- Process ALL law data
# Run tests
npm test
# Test coverage
npm run test:coverageWinston can integrate with n8n for workflow automation. See n8n-workflows/ directory for templates.
Example workflows:
- Automated legal research triggers
- Document processing pipelines
- Multi-agent legal analysis
- Scheduled report generation
- FINAL-COMPLETION-REPORT.md - Complete feature documentation
- PROGRESS-REPORT-SESSION-2.md - Development progress
- Agent OS Specs - Technical specifications
- Agent OS - Spec-driven development
- Claude-Flow - Multi-agent orchestration
- Claude Code - Implementation
- TypeScript - Type-safe code
- Slack Bolt - Slack integration
- Anthropic Claude - AI reasoning
- OpenAI - Embeddings & Whisper
- Pinecone - Vector database
- Redis - Caching & sessions
This is an educational AI assistant. It provides legal information, NOT legal advice. Always consult a licensed attorney for your specific legal situation.
MIT
Built using the Ultimate Coding Agent System:
- Agent OS by Builder Methods
- Claude-Flow by rUv
- Claude Code by Anthropic
Winston - Your AI Legal Defense Companion βοΈπ€
Made with β€οΈ using Agent OS + Claude-Flow + Claude Code