The 3-Agent Pattern: How Chex Built a Full-Stack Mental Health Assistant

The 3-Agent Pattern: How Chex Built a Full-Stack Mental Health Assistant

Shawnee Foster's avatar
Mateo Torres's avatar
Shawnee Foster & Mateo Torres
AUGUST 7, 2025
4 MIN READ
TUTORIALS
Rays decoration image
Ghost Icon

Most AI agents are glorified chatbots. Chex just won a hackathon by building three specialized agents that actually book therapy appointments.

Not suggest. Not recommend. Actually book — complete with calendar invites and email confirmations.

Here's the pattern they discovered that you can steal for your own agent systems.

Want to skip to the code? Check out our Quickstart or get your Arcade.dev API key to build authenticated agents in minutes.

The Problem: Single Agents Hit Walls

Traditional AI assistants try to do everything in one conversation. They inevitably fail when tasks require:

  • Multiple data sources (calendar, notes, web searches)
  • Different interaction modes (voice, text, background processing)
  • Time-delayed actions (research then schedule)

Chex solved this by splitting their mental health assistant into three specialized agents, each with its own tools and responsibilities.

The 3-Agent Architecture

Agent 1: The Check-In Agent

Role: Proactive wellness monitoring and initial triage

Tools Used:

  • Google Calendar (via Arcade.dev) — scan for stressful upcoming events
  • Notion (via Arcade.dev) — review personal notes and task lists
  • Vapi — handle warm, conversational voice interactions

What It Does:

# Simplified flow
def check_in_agent():
    # 1. Scan user's calendar for high-stress events
    events = arcade.tools.google_calendar.get_upcoming_events(
        user_auth=user.oauth_token,
    )
    
    # 2. Check Notion for related stress indicators
    notes = arcade.tools.notion.search_pages(
        query="urgent|important|tired|stressed|overwhelmed",
        auth=user.notion_token
    )
    
    # 3. Initiate proactive check-in call
    if stress_indicators_found(events, notes):
        vapi.initiate_call(
            script=generate_check_in_script(events, notes),
            tone="warm_supportive"
        )

During the demo, this agent noticed an upcoming hackathon presentation and initiated a supportive call. The student mentioned being sleep-deprived and needing a therapist — which triggered the next agent.

Agent 2: The Resource Finder

Role: Context-aware research and recommendation engine

Tools Used:

  • Bright Data MCP — web scraping for therapist directories
  • Google Search (via Arcade.dev)— find local therapy practices
  • Firecrawl (via Arcade.dev) — extract therapist contact info

What It Does:

Here's where Chex got clever. They built a dedicated therapist data collection tool using Arcade.dev's Google Search and Firecrawl toolkit:

// Simplified flow
const therapistTool = new Tool({
  id: 'therapist-finder',
  name: 'Searches for therapist practices and extracts their contact information',
  execute: async ({ location }) => {
    // 1. Search Google Maps for therapy practices
    const searchResults = await arcade.tools.execute({
	tool_name: "GoogleSearch.Search",
      query: `therapists in ${location}`,
    });
    
    // 2. Extract structured data from each result
    for (const practice of searchResults) {
      // Get basic info from Google Maps
      const mapData = {
        name: practice.name,
        address: practice.address,
        phone: practice.phone,
        rating: practice.rating
      };
      
      // 3. Build Therapist profile with AI
      mapData.profile = llm.invoke(summarize_profile_prompt, practice.text_result)
    }
    
    return therapists;
  }
});

The agent found Penn-specific wellness resources and local therapists, creating a personalized list complete with validated phone numbers (XXX-XXX-XXXX format) and email addresses.

Agent 3: The Scheduling Agent

Role: Automated outreach and appointment booking

Tools Used:

  • Vapi — make calls to therapist offices
  • Google Calendar (via Arcade.dev) — check availability and create events
  • Gmail (via Arcade.dev) — send confirmation emails

What It Does:

# Simplified flow
def scheduling_agent(therapist_list, patient_availability):
    for therapist in therapist_list:
        # 1. Call therapist office
        call_result = vapi.make_call(
            to=therapist.phone,
            script=f"Calling on behalf of {patient.name}, 
                    a student at UPenn seeking therapy..."
        )
        
        if appointment_confirmed(call_result):
            # 2. Add to both calendars
            arcade.tools.execute({
tool_name: "GoogleCalendar.CreateEvent",
                user_id=patient.id,
                input={
                  "title":"Therapy Session",
                  "time":appointment_time,
                  "location":therapist.address
                }
            })
            
            # 3. Send confirmations
            arcade.tools.execute({
tool_name: "GoogleCalendar.CreateEvent",
                user_id=patient.id,
                input={
                  "subject":"Appointment Confirmed",
                  "body":appointment_details,
                  "recipient":therapist.email
                }
            })

            
            break  # Stop after first successful booking

In the live demo, this agent successfully called a therapist, negotiated a Monday 11 AM appointment, and automatically created calendar events for both parties.

Why This Pattern Works

1. Separation of Concerns

Each agent has a focused job with specific tools. The check-in agent doesn't need web scraping capabilities. The scheduler doesn't need Notion access.

2. Tool Authentication Stays Clean

Instead of one mega-agent with access to everything, each agent only authenticates to the services it needs. This follows the principle of least privilege.

3. Async Handoffs

Agents can work independently. The resource finder can research while the user continues their day. The scheduler can make multiple calls without blocking other operations.

4. Specialized Interfaces

Voice for check-ins (empathy matters), text for resource lists (scannable), background for scheduling (non-intrusive).

Build Your Own Multi-Agent System

Here's a starter template using Arcade.dev and Mastra (the framework Chex used):

The Key Insight

Chex didn't build a mental health chatbot. They built three specialized workers that happen to use AI.

This pattern — decomposing complex workflows into focused agents with authenticated tools — is how you build AI that actually ships to production.

The hackathon judges got it immediately. When the scheduling agent successfully booked a real appointment during the live demo, you could feel the room shift. This wasn't another "AI suggests you call your therapist" demo.

This was AI doing the actual work.

What's Next?

The 3-agent pattern works for more than mental health:

  • Sales: Monitor CRM → Research prospects → Book meetings
  • DevOps: Monitor logs → Diagnose issues → Deploy fixes
  • Recruiting: Scan applications → Research candidates → Schedule interviews

The key is giving each agent:

  1. Clear boundaries (what it owns)
  2. Authenticated tools (via Arcade.dev)
  3. Handoff protocols (how agents communicate)

Start Building Your Multi-Agent System

Ready to build agents that actually do things? Here's how to get started:

  1. Get your API key (takes 30 seconds)
  2. Install the toolkit: bash

npm install @arcadeai/arcadejs

Start with Arcade.dev →


P.S. —Check out the Chex repo to see exactly how it's done.

SHARE THIS POST

RECENT ARTICLES

How Arcade Proactively Addressed The First Major Identity Vulnerability in Agentic AI

While building an AI demo has become trivially easy, production-grade deployments in enterprises have been stifled by performance issues, costs, and security vulnerabilities that their teams have been warning about. Today, we're addressing one of those vulnerabilities head-on. A new class of identity attack Security researchers at The Chinese University of Hong Kong recently identified new variants of COAT (Cross-app OAuth Account Takeover), an identity phishing attack targeting agentic AI a

TUTORIALS

New Year, New Agents to Make You More Productive

Most conversations about AI agents still start the same way: models, prompts, frameworks, followed by an incredible looking demo. Then someone asks, “Okay… when can it ship to production?” That’s where things get a little awkward. The naked truth in the fading demo afterglow is that agents are apps. Which means they need identity, permissions, real integrations, and a way to behave predictably when something goes sideways. Without these components, any agent can dazzle a boardroom, but it won

THOUGHT LEADERSHIP

5 Takeaways from the 2026 State of AI Agents Report

AI agents have moved quickly from experimentation to real-world deployment. Over the past year, organizations have gone from asking whether agents work to figuring out how to deploy enterprise AI agents reliably at scale. The 2026 State of AI Agents Report from the Claude team captures this shift clearly. Drawing on insights from teams building with modern LLM agents—including those powered by models from providers like Anthropic—the report offers a grounded view of how agentic systems are bein

Blog CTA Icon

Get early access to Arcade, and start building now.