How tahaishfaq/ai-customer-support-agent works
Aide is a hosted AI customer-support and customer-insights product. The main workflow is an operator authenticating, creating an agent, adding knowledge, configuring and embedding its webchat, then reviewing conversations and analytics; customers chat through the public widget and can be handed off to the human desk. The graph also preserves billing, agent actions, realtime updates, and platform administration. Relationships are limited to README-documented capabilities and SOURCE INDEX references; several route-to-service details were not sampled and are therefore not asserted.
Main entry points: page.jsx Agent console · prisma.js Application database · require-product.js Access control · loop.js Agent orchestration
Components 25
Agent product
- Agent console
app/(app)/agents/[id]/page.jsx - Agent management API
app/api/agents/route.js - Agent service
lib/services/agent.service.js - Knowledge management
app/api/agents/[id]/knowledge/route.js - Widget customization
components/customization/CustomizationStudio.jsx - Agent actions
lib/actions/action-config.js - Agent orchestration
lib/orchestrator/loop.js - Knowledge retrieval policy
lib/services/ai/source-policy.js
Chat and desk
- Embedded webchat
app/w/[publicKey]/page.jsx - Public chat API
app/api/public/agents/[publicKey]/chat/route.js - Chat service
lib/services/chat.service.js - Conversation management
app/api/conversations/route.js - Human support desk
components/desk/InboxShell.jsx - Customer insights
app/api/analytics/overview/route.js
Platform services
- Authentication
auth.js - Access control
lib/require-product.js - Workspace management
lib/services/workspace.service.js - Application database
lib/prisma.js - Realtime gateway
realtime-gateway/attach.js
Billing
- Subscription service
lib/billing/subscription.service.js - Product entitlements
lib/billing/entitlements.service.js
Administration
- Admin console
app/admin/(console)/page.jsx - Platform settings
lib/services/platform-settings.service.js
Other components
- Support operator
- Web customer
Connections 25
- Support operator → Authentication: signs in
- Support operator → Agent console: builds agent
- Agent console → Agent management API: manages agents
- Agent management API → Agent service: calls service
app/api/agents/route.js - Agent console → Knowledge management: adds knowledge
- Agent console → Widget customization: configures widget
- Agent console → Agent actions: configures tools
- Embedded webchat → Web customer: serves widget
- Web customer → Public chat API: sends messages
- Support operator → Conversation management: reviews chats
- Support operator → Human support desk: handles handoff
- Support operator → Customer insights: reads insights
- Access control → Authentication: checks session
- Access control → Subscription service: checks subscription
lib/require-product.js - Access control → Product entitlements: checks entitlements
lib/require-product.js - Workspace management → Application database: reads and writes
lib/services/workspace.service.js - Agent service → Application database: reads and writes
- Chat service → Agent orchestration: runs agent
- Agent orchestration → Knowledge retrieval policy: applies policy
lib/orchestrator/index.js - Agent orchestration → Agent actions: uses action config
lib/orchestrator/index.js - Subscription service → Application database: reads and writes
lib/billing/subscription.service.js - Subscription service → Product entitlements: supplies access state
- Support operator → Admin console: administers platform
- Admin console → Platform settings: manages settings
- Realtime gateway → Application database: session checks