The pipeline
From Reddit post to attorney review in minutes.
Every lead flows through a five-stage, deterministic pipeline. No black boxes. No surprises. The same logic runs 24/7 — and every decision is logged.
Watcher
Reddit monitoring — no AI cost
The Watcher polls Reddit every 60 seconds using the PRAW API. It applies a keyword pre-filter in pure Python before any AI call is made. A post must match at least one of your firm's configured keywords to proceed — this keeps costs near zero for irrelevant content.
Technical details
- PRAW (Python Reddit API Wrapper) — official API, no scraping
- 60-second polling interval per subreddit
- Keyword pre-filter: case-insensitive, configurable per tenant
- Deduplication: posts seen before are skipped
- Every evaluation logged to subreddit_interactions table
Cost per call
~$0 per poll — pure Python, no LLM
Classifier
AI scores relevance and case type
Posts that pass the keyword filter are sent to Claude Haiku for classification. The model returns structured JSON — never prose. Posts must score ≥ 0.7 confidence to continue. Lower-confidence posts are discarded and logged.
Technical details
- Model: Claude Haiku 4.5 — low cost, high throughput
- Output: structured JSON only — is_relevant, confidence, case_type, urgency, jurisdiction_signals
- Threshold: confidence < 0.7 → discarded
- Structured output enforced — model cannot return prose
- Latency: ~1–2 seconds per post
Cost per call
~$0.001 per classification call
Sample output
{
"is_relevant": true,
"confidence": 0.92,
"case_type": "personal_injury",
"urgency": "high",
"jurisdiction_signals": ["CA"]
}Drafter
Compliant response drafted by AI
For posts that pass classification, Claude Sonnet drafts a response using your firm's system prompt, the detected case type, and your template library. Responses are capped at 200 words. Tone is empathetic and human — the draft is a starting point, not a final output.
Technical details
- Model: Claude Sonnet 4.6 — best coding + reasoning model
- Inputs: firm system prompt + case_type + template variant
- Hard cap: 200 words enforced at prompt level
- Template rotation: minimum 5 variants to avoid repetition
- Prohibited phrases never appear: 'guaranteed', 'we will win', 'you are entitled to'
Cost per call
~$0.01–0.03 per draft
Gate
Compliance check — no AI involved
Every draft passes through a pure Python rules engine before reaching your review queue. The Gate is fully deterministic and auditable. There is no LLM in this stage — ever. Binary pass/fail.
The Gate is intentionally non-AI. Compliance decisions are deterministic and fully auditable — not probabilistic.
Technical details
- Post age vs. jurisdiction solicitation windows
- Daily posting rate limits per firm per subreddit
- Prohibited phrases check (regex-based)
- Response length cap: 200 words hard limit
- All checks logged with reason codes
Cost per call
$0 — pure Python, no LLM
Dispatch
Attorney reviews, then posts
Leads that pass the Gate arrive in your Slack channel with three buttons: Approve, Edit, Reject. Nothing posts without an attorney clicking Approve. In POC mode, every lead requires human review — auto-posting is a separate opt-in feature available after validation.
Technical details
- Delivery: Slack webhook with inline Approve / Edit / Reject buttons
- Auto-post mode: randomized 3–12 minute delay to appear human (opt-in only)
- Posts via your Reddit account — your identity, your voice
- Every action logged: timestamp, post_id, action taken
- Immutable audit log — no deletes
Cost per call
$0 — Slack webhooks are free
Architecture
Built for reliability, not just demos.
LexAlert runs as an isolated worker process per law firm. No shared infrastructure between clients. No cross-tenant data access — enforced at the database layer.
Per-tenant isolation
Each law firm runs its own isolated pipeline worker. No shared queues, no shared AI context, no shared anything.
SQLite in POC, Postgres in production
Queue persists to SQLite during validation. Production deployments use Postgres (Supabase) with row-level security.
Immutable audit log
Every pipeline action is logged with timestamp, post_id, action, and actor. Logs are append-only — nothing is deleted.
Encrypted credentials
Reddit credentials are AES-256 encrypted at rest. They never appear in logs, error messages, or API responses.
Always-on worker
The pipeline runs continuously. No batch jobs, no nightly runs. If a post appears at 3am, you see it by 3:05am.
Deterministic compliance
The Gate stage is pure Python — no LLM. The same input will always produce the same output. Fully auditable.
Bar compliance
The Gate stage exists because compliance is non-negotiable.
Legal advertising is governed by state bar rules that vary by jurisdiction. Solicitation windows, prohibited phrases, and required disclosures differ state by state. LexAlert's Gate enforces these rules deterministically — before you ever see a draft.
The attorney still reviews every response. LexAlert is a drafting and monitoring tool — the attorney is the professional of record and is always responsible for what gets posted.
Jurisdiction solicitation windows
State-specific rules enforced per post location
Daily rate limits
Per firm, per subreddit — prevents overposting
Prohibited phrases
'guaranteed', 'we will win', 'you are entitled to', 'no-risk'
Response length cap
Hard 200-word limit — enforced at both Drafter and Gate
Attorney review required
No auto-posting in default mode — ever
Ready to see it in action?
Book a 30-minute demo and we'll show you real leads from your practice area and target market.
Book a Demo