A comprehensive overview of the platform's technical architecture, from the frontend to the AI execution layer.
Next.js 15 App Router with React Server Components
Next.js Route Handlers with Server Actions
Multi-agent orchestration and workflow management
LLM providers, tool execution, and response streaming
Inngest-powered event processing and background jobs
Persistent storage, caching, and session management
The Task Delegator analyzes incoming tasks and routes them to the best available agent based on capability matching, performance history, health status, and current load.
// Task delegation scoring weights
CAPABILITY_WEIGHT = 0.4 // Does agent have required skills?
HEALTH_WEIGHT = 0.3 // Is agent healthy and responsive?
PERFORMANCE_WEIGHT = 0.2 // Historical success rate
LOAD_WEIGHT = 0.1 // Current capacity utilizationManages workflow execution with support for sequential, parallel, and conditional steps. Handles dependencies, error recovery, and state persistence.
Enables agents to share data during workflow execution. Implements versioning, locking, and automatic conflict resolution.
// Context entry structure
interface SharedContextEntry {
key: string // Unique identifier
value: any // The shared data
agent_id: string // Who wrote it
timestamp: string // When it was written
version: number // For conflict detection
metadata?: object // Additional info
}Maintains a live registry of all agents with their capabilities, health status, and performance metrics. Cached in Redis with 24-hour TTL.
User action triggers API call or Server Action. Request is validated and authenticated.
Orchestrator creates execution record, initializes shared context, and identifies required agents.
Task Delegator scores available agents and assigns tasks. Inngest events are emitted.
Agents process tasks, call LLMs, execute tools, and write results to shared context.
Sensitive actions pause for human approval. Notifications sent, workflow waits for response.
Final outputs collected, workflow marked complete, metrics recorded, user notified.
JWT-based authentication with secure HTTP-only cookies. Session management via Redis.
Role-based access control (RBAC) with agency-level isolation.
Multi-layer validation for agent creation and execution.
Encryption at rest and in transit for all sensitive data.
Dive deeper into specific components and patterns