Skip to main content

Temporal Workflows

AgentArea uses Temporal.io for durable, distributed workflow execution. This enables long-running agent tasks with fault tolerance, checkpointing, and real-time control.

Overview

Temporal provides the execution backbone for AgentArea agents:
  • Durable Execution: Workflows survive process failures
  • Long-Running: Tasks can run for hours or days
  • Fault Tolerance: Automatic retries and recovery
  • Real-Time Control: Signals and queries for workflow interaction

Architecture

Components

Service Structure


Agent Execution Workflow

The main workflow for agent task execution:

Workflow Definition

Signals (Real-Time Control)

Queries (State Inspection)


Main Execution Loop

Loop Structure

Termination Conditions


Activities

Activities are the units of work within workflows.

Activity Factory Pattern

Activity Execution


Event Publishing

Event Flow

Event Types

Event Publishing Activity


Worker Configuration

Worker Setup

Worker Configuration


Best Practices


Monitoring

Workflow Metrics

Temporal Web UI

Access the Temporal Web UI at http://localhost:8080 to:
  • View running workflows
  • Debug failed executions
  • Query workflow state
  • Signal/Cancel workflows

Next Steps

Building Agents

Create agents that use workflows

Event Triggers

Trigger workflows from events