Multi-Agent Architecture for Addiction Recovery Support

openrecovery · Healthcare · 2024 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Healthcare addiction recovery support

OpenRecovery wanted to provide personalized addiction-recovery guidance through text and voice without relying on a single monolithic prompt or unauditable chatbot behavior.

Constraints:

Architecture

OpenRecovery built a LangGraph-based multi-agent assistant for addiction recovery. Specialized graph nodes handle workflows such as step work and fear inventory, while shared state memory, few-shot prompts, and search tools support continuity across agents. LangGraph Platform hosts the backend behind mobile apps, LangGraph Studio and LangSmith support trace inspection and prompt iteration, and human-in-the-loop features let users confirm, edit, and give feedback on AI-generated content.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  mobile-applications["Mobile Applications"] --> langgraph-platform["LangGraph Platform"]
  langgraph-platform --> specialized-recovery-agents["Specialized Recovery Agents"]
  specialized-recovery-agents --> shared-state-memory["Shared State Memory"]
  specialized-recovery-agents --> few-shot-prompt-dataset["Few Shot Prompt Dataset"]
  specialized-recovery-agents --> search-tools["Search Tools"]
  langgraph-platform --> langgraph-studio["LangGraph Studio"]
  langsmith["LangSmith"] --> few-shot-prompt-dataset
  mobile-applications --> human-review-loop["Human Review Loop"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Mobile Applications Provide the text and voice user interface for recovery support. LangGraph Platform
LangGraph Platform Hosts the multi-agent backend, conversation APIs, state, and deployment runtime. Specialized Recovery Agents, Shared State Memory, LangGraph Studio
Specialized Recovery Agents Handle recovery-stage workflows such as step work and fear inventory exercises. Shared State Memory, Few Shot Prompt Dataset, Search Tools
Shared State Memory Maintains continuity across agent switches and conversations. Specialized Recovery Agents
Few Shot Prompt Dataset Stores expert examples that can be updated and re-indexed to improve responses. Specialized Recovery Agents, LangSmith
Search Tools Shared tools that multiple agents can access during recovery workflows. Specialized Recovery Agents
LangGraph Studio Visual debugging interface for inspecting graph state and agent interactions. LangGraph Platform
LangSmith Observability, prompt hub, playground, traces, and collaborative prompt engineering environment. Few Shot Prompt Dataset
Human Review Loop Lets users confirm, edit, and give feedback on AI-generated summaries and tables. Mobile Applications

Data flow

A user enters the mobile app through text or voice, interacts with a LangGraph Platform backend, and can move between general chat and specialized recovery-work agents without losing conversation state. Development and improvement flow through LangGraph Studio and LangSmith: traces reveal weak responses, experts update prompts or examples, then the team tests and deploys revised prompts back to the graph platform.

“The deployment architecture appears to follow a pattern where LangGraph Platform serves as the backend for agent orchestration, while the mobile applications”summary, stated
“when the team identifies an unsatisfactory response while debugging traces, they can add new few-shot examples to the dataset in LangSmith, re-index it”summary, stated

Why this architecture

The graph design gave OpenRecovery modularity and stateful context switching across recovery workflows, while LangSmith and LangGraph Studio made prompt iteration observable and accessible to domain experts. Human-in-the-loop controls were included because recovery support requires user trust and accuracy rather than silent automation.

“The graph structure of LangGraph provides several architectural benefits according to the case study. First, it enables the reuse of key components across multiple agents.”summary, stated
“Given the sensitive nature of addiction recovery, OpenRecovery incorporated several human-in-the-loop mechanisms into their system.”summary, stated

Models used: unspecified LLM through LangChain stack

Scale

Alternatives considered (roads not taken)

Use a single monolithic LLM prompt or simple chain

Rejected because: The team needed specialized nodes for different recovery workflows and reusable shared state/tools across them.

“Rather than using a single monolithic LLM prompt or simple chain, the team designed a system with specialized nodes”summary, stated

Keep prompt changes gated behind engineering work

Rejected because: OpenRecovery needed addiction-recovery experts and the content team to test and revise prompts directly.

“The non-technical content team and addiction recovery experts can modify prompts in the LangSmith prompt hub, test them in the playground, and deploy new revisions to LangGraph Platform.”summary, stated

Let the AI silently own generated personal summaries

Rejected because: Users needed to verify accuracy and maintain control over sensitive personal information.

“Users are also given the ability to edit AI-generated summaries and tables, allowing them to verify the accuracy of their personal information and maintain control over their data.”summary, stated

Patterns

multi-agent-orchestration (architecture)

The assistant uses LangGraph nodes as specialized agents for different addiction-recovery workflows while sharing state and tools.

“The core technical innovation described in this case study is OpenRecovery's multi-agent architecture built on LangGraph.”summary, stated

agent-memory (state)

Shared state memory lets users switch between recovery agents without losing continuity.

“These shared components include state memory that persists across agent interactions, dynamic few-shot expert prompts that can be updated independently”summary, stated

human-in-the-loop-gate (safety)

The system prompts for confirmation, lets users edit AI-generated summaries, and accepts natural-language feedback.

“The first mechanism described is the AI's ability to prompt users for deeper introspection, mimicking the role of a sponsor or therapist.”summary, implied

observability-tracing (operations)

LangSmith and LangGraph Studio expose traces and graph state so the team can debug and improve agent behavior.

“LangSmith's trace logging capabilities are also used in conjunction with LangGraph Studio to ensure changes function as expected before deployment.”summary, stated

eval-driven-development (development)

The team replays weak responses from traces, adds few-shot examples, re-indexes, and retests the same question.

“they can add new few-shot examples to the dataset in LangSmith, re-index it, and test the same question to verify the improvement.”summary, stated

Tradeoffs

Model recovery work as a graph of specialized agents

Chose LangGraph multi-agent architecture over A single monolithic prompt or chain.

Rationale: Specialized nodes let OpenRecovery tailor behavior to stages such as step work and fear inventory while reusing shared state and tools.

“Rather than using a single monolithic LLM prompt or simple chain, the team designed a system with specialized nodes, each tailored to specific stages”summary, stated

Expose prompt iteration to domain experts

Chose LangSmith prompt hub and playground for non-technical content experts over Engineering-only prompt revisions.

Rationale: Recovery experts could directly improve behavior and empathy without waiting for every change to become a software task.

“The non-technical content team and addiction recovery experts can modify prompts in the LangSmith prompt hub, test them in the playground, and deploy new revisions to LangGraph Platform.”summary, stated

Keep users in control of AI-generated recovery artifacts

Chose Editable summaries, tables, and feedback loops over Fully automated AI-generated records.

Rationale: The sensitive personal context made verification and user control more important than seamless automation.

“In the context of recovery, where personal narratives and accurate self-reflection are crucial, this capability seems particularly valuable.”summary, implied

Gotchas (what bit them)

The case lacks clinical and production outcome evidence.

Root cause: The source is a vendor case study that emphasizes tooling benefits without disclosing deployment scale, user outcomes, or accuracy metrics.

Resolution: Treat technical architecture claims as useful, but mark promotional bias and avoid asserting clinical effectiveness.

“The case study does not provide quantitative metrics on user outcomes, system accuracy, or scale of deployment.”summary, stated

Healthcare compliance and crisis handling are not described.

Root cause: The published writeup omits patient-data privacy, clinical validation, and escalation behavior for crisis scenarios.

Resolution: Do not infer a complete healthcare safety architecture from the described LangGraph and LangSmith workflow.

“The regulatory and compliance aspects of deploying an AI system for mental health support are not discussed.”summary, stated

Sensitive support domains require domain experts in the prompt loop.

Root cause: Generic engineering-only prompt iteration can miss empathy and recovery-methodology needs.

Resolution: The team used LangSmith so non-technical recovery experts could modify prompts and examples directly.

“This democratization of prompt engineering is significant because it allows domain experts—people who understand addiction recovery—to directly influence the system's behavior”summary, stated

Evaluation

The case describes trace-based debugging, replaying questions after few-shot changes, and pre-deployment checks, but does not provide quantitative clinical or production metrics.

“The platform enables several key workflows that are essential for maintaining and improving LLM-based systems in production.”summary, implied
“The case study does not provide quantitative metrics on user outcomes, system accuracy, or scale of deployment.”summary, stated

Outcomes

The report names around-the-clock support and beta mobile availability, but no production usage volume or benchmark metrics.

“The scalable architecture built on LangGraph is positioned to accommodate these expansions by adding new specialized agents for various recovery stages and mental health support.”summary, stated
“A public launch was mentioned as forthcoming at the time of the case study's publication in October 2024, with beta versions available for testing”summary, stated