Agent Architecture

AI System

Comprehensive guide to SHELTR's multi-agent chatbot system with MCP-powered workflow automation, public orchestrator, and admin control panel

Version 2.0.0β€’Updated September 22, 2025β€’MCP ENHANCEDβ€’WORKFLOW AUTOMATION

System Overview

SHELTR features an AI chatbot system with three integrated components powered by Model Context Protocol (MCP):

  • Public Landing Page Chatbot - Orchestrator-based system with MCP workflow automation
  • Super Admin Chatbot Control Panel - Configurable agents with MCP tool integration
  • MCP Workflow Engine - 10 specialized tools + 2 automated multi-step workflows

πŸš€ MCP Integration Highlights

Intelligent Actions

  • β€’ Real-world action execution (donations, status updates)
  • β€’ Automated workflows (shelter onboarding, emergency response)
  • β€’ Smart data queries with natural language

Technical Features

  • β€’ 10 specialized MCP tools for platform operations
  • β€’ Role-based access control for secure tool usage
  • β€’ Multi-step workflow automation with dependencies
Public Landing Page Chatbot
MCP-powered orchestrator system for public users

Agent Types (7 MCP-Enhanced Agents)

  • β€’ Emergency - Crisis response with automated escalation workflow
  • β€’ Participant Support - Real status updates, QR code generation
  • β€’ Donor Relations - Live donation processing, receipt generation
  • β€’ Public Information - Enhanced knowledge search and platform queries
  • β€’ Public Support - Intelligent onboarding and guidance
  • β€’ Shelter Operations - Real-time capacity updates, reporting
  • β€’ Technical Support - System queries and account management

MCP-Enhanced Workflow

  • β€’ Intent Classification + MCP Tool Detection
  • β€’ Role-Based Routing + Permission Validation
  • β€’ RAG Enhancement + Real-Time Data Access
  • β€’ Response Generation + Action Execution
Super Admin Control Panel
MCP-integrated configurable agent system for internal use

Agent Types (5 MCP-Integrated Agents)

  • β€’ General Assistant - All MCP tools based on user role
  • β€’ SHELTR Support - Platform tools, shelter onboarding workflows
  • β€’ Technical Expert - System queries, performance analysis
  • β€’ Business Analyst - Analytics tools, revenue reporting
  • β€’ Creative Writer - Knowledge search for content research

MCP-Enhanced Features

  • β€’ Session Management + Workflow Execution History
  • β€’ Agent Selection + Tool Access Based on Role
  • β€’ Model Selection + MCP Tool Integration
  • β€’ Real-time Configuration + Action Monitoring

πŸ› οΈ MCP Tools & Workflows

πŸ”§MCP Tools (10 Available)
Specialized tools for platform operations

Shelter Management

create_shelter, update_shelter_capacity

Donation Processing

process_donation, generate_donation_receipt

Participant Support

update_participant_status, generate_participant_qr

Emergency Response

emergency_escalation

Analytics & Knowledge

generate_impact_report, query_platform_data, search_knowledge_base

πŸ”„MCP Workflows (2 Active)
Multi-step automated processes

Shelter Onboarding

  • 1. Create shelter profile
  • 2. Send welcome email
  • 3. Schedule training

Emergency Response

  • 1. Escalate emergency
  • 2. Notify authorities (if critical)
  • 3. Create incident report

🎯 User Experience Enhancement

Before MCP

User: "I need help with housing"

Bot: "Here are some resources about housing assistance..."

After MCP

User: "I need help with housing"

Bot: "Let me check your status and available options..."

[Executes: update_participant_status, search_knowledge_base]

Bot: "Found 3 shelters with availability. Generated your QR code. Here are your next steps..."

🎯 Agent Responsibilities Matrix

Public-Facing Agents (Orchestrator)

AgentPrimary UsersKey FunctionsStatus
emergencyCrisis situationsCrisis intervention, safety resourcesβœ… Active
participant_supportHomeless individualsService booking, resource navigationβœ… Active
donor_relationsDonorsSmartFundβ„’ explanation, impact trackingβœ… Active
public_informationGeneral publicPlatform education, SmartFundβ„’ modelβœ… Active
public_supportNew usersGetting started, donation guidanceβœ… Active
shelter_operationsShelter adminsParticipant management, reportingβœ… Active
technical_supportAll usersPlatform issues, account problemsβœ… Active

Admin-Facing Agents (Control Panel)

AgentPrimary UseKey FunctionsStatus
generalGeneral assistanceVarious tasks, Q&Aβœ… Active
sheltr_supportPlatform supportSHELTR-specific helpβœ… Active
technical_expertDevelopment supportTechnical guidance, architectureβœ… Active
business_analystStrategy supportBusiness insights, analyticsβœ… Active
creative_writerContent creationWriting assistance, marketingβœ… Active

πŸ”„ System Architecture Comparison

AspectOrchestrator AgentsControl Panel Agents
ConfigurationHardcoded in prompts.pyConfigurable via UI
PurposePublic user supportSuper Admin tooling
PersistenceSession-basedFull conversation history
Model SelectionFixed per agentUser-selectable
Knowledge BaseRAG-enhancedConfigurable per agent
AccessPublic usersSuper Admin only

System Integration

Firebase Storage Status

  • β€’ Knowledge Base: βœ… 10+ documents loaded
  • β€’ Storage Bucket: gs://sheltr-ai.firebasestorage.app
  • β€’ Collections: knowledge_documents, knowledge_chunks
  • β€’ Embeddings: 100+ embedding chunks for RAG

Technical Implementation

  • β€’ Orchestrator: apps/api/services/chatbot/orchestrator.py
  • β€’ Control Panel: apps/web/src/app/dashboard/chatbots/page.tsx
  • β€’ Models: GPT-4o, GPT-4o Mini, Claude (configurable)
  • β€’ RAG System: Real-time knowledge enhancement

πŸš€ Current Status: MCP-Enhanced Multi-Agent System

βœ… Operational Systems

  • Public Orchestrator: 7 MCP-enhanced agents with workflow automation
  • Admin Control Panel: 5 agents with MCP tool integration
  • MCP Backend: 10 specialized tools + 2 automated workflows
  • Knowledge Base: 57+ documents with semantic search

πŸ”„ In Progress

  • Frontend MCP Client: React integration for tool execution
  • Tool Implementations: Converting stubs to full functionality
  • Workflow UI: Visual workflow execution monitoring
  • Testing & Validation: End-to-end workflow testing

πŸ”§ Technical Architecture

Orchestrator: apps/api/services/chatbot/orchestrator.py
Control Panel: apps/web/src/app/dashboard/chatbots/page.tsx
MCP Service: apps/api/services/mcp_service.py
MCP Router: apps/api/routers/mcp.py
Knowledge Base: Firebase Firestore with vector embeddings
Models: OpenAI GPT-4o/Mini, Anthropic Claude