Master the fundamental building blocks of AI agent systems. These concepts form the foundation for everything you'll build on the platform.
An Agent is an autonomous AI entity with a specific purpose, personality, and set of capabilities. Each agent is powered by a large language model (LLM) and can use tools to interact with external systems.
Complex tasks often require multiple specialized agents working together. The coordination layer manages how agents discover each other, share context, and delegate tasks.
The Task Delegator intelligently routes tasks to the best available agent based on:
Agents can share data through a versioned context system with conflict resolution:
A centralized registry tracks all agents, their capabilities, health status, and performance metrics. This enables dynamic discovery and load balancing across your agent fleet.
Workflows define sequences of steps that agents execute. They support dependencies, parallel execution, conditional logic, and error recovery.
// Workflow Step Types
type StepType =
| "agent_task" // Execute an agent
| "approval_gate" // Wait for human approval
| "parallel_group" // Run steps in parallel
| "conditional" // Branch based on conditions
| "wait" // Wait for external event
// Workflow Execution States
type Status =
| "running" // Currently executing
| "paused" // Waiting for input/approval
| "completed" // Successfully finished
| "failed" // Error occurred
| "cancelled" // Manually stoppedSteps run one after another
Independent steps run simultaneously
Branch based on runtime data
HITL ensures human oversight for critical agent actions. It balances automation efficiency with safety and compliance requirements.
Agent determines it needs to perform a sensitive operation (send email, publish content, execute payment)
System creates an approval request with full context: action type, parameters, risk level, and timeout
Approver receives notification, reviews the request, and approves, rejects, or requests changes
On approval, workflow resumes. On rejection, workflow handles the denial gracefully.
The platform is built on an event-driven architecture using Inngest. This enables reactive workflows, scheduled tasks, and real-time processing.
workflow/started - Workflow beginsworkflow/step.completed - Step finishesapproval/requested - HITL triggeredagent/task.delegated - Task routedschedule/cron.triggered - Scheduled runTools extend agent capabilities by connecting them to external services, APIs, and databases. Tools are the bridge between AI reasoning and real-world actions.
interface ToolDefinition {
name: string // Unique identifier
description: string // What the tool does (shown to LLM)
parameters: ZodSchema // Input validation schema
execute: (params, ctx) => Promise<any> // Execution logic
requiresApproval?: boolean // Triggers HITL gate
maxExecutionTime?: number // Timeout in ms
}