A self-built agentic intake system for law firm client qualification. LangGraph orchestrates conflict-of-interest checks, case classification, and attorney routing using Claude, with every qualified case pushed to HubSpot and every AI decision traced in Langfuse for full observability.
▶ Watch the Walkthrough (Loom — coming soon)Law firm intake is a decision-heavy bottleneck. Before a new case can be accepted, it needs a conflict-of-interest check against existing matters, classification of case type and urgency, a fee structure decision, and routing to the right attorney — all before a human ever reads the client's message. Doing this by hand doesn't scale, and doing it with a simple script misses the judgment calls a real intake process requires.
I built an agent using LangGraph to model the intake process as a decision graph rather than a linear script. A client submits a case through an n8n-hosted form; the request flows into a FastAPI service running the LangGraph agent, which first checks the client and opposing party against matter history for conflicts. If clear, Claude classifies the case type and urgency, the agent assigns a fee structure and attorney, and the qualified case is pushed into HubSpot as a real contact record via HubSpot's MCP server. n8n handles the client-facing confirmation email and routes high-urgency cases to a direct alert. Every Claude call is traced in Langfuse, and a dedicated error-handling workflow emails an alert if any part of the pipeline fails, so a broken run never fails silently.
n8n orchestration: webhook intake, LangGraph classification, confirmation email, and urgency-based alert routing
A real Langfuse trace: the exact prompt sent to Claude and its structured case_type / urgency output, with model, latency, and cost logged automatically
HubSpot's property panel showing case_type and assigned_attorney written automatically to the contact record via MCP