AWEL is a declarative language for defining complex agentic workflows as Directed Acyclic Graphs (DAGs). It provides a framework for composing operators, managing data flow, and orchestrating agent execution in a structured manner.
The DAG Builder component constructs workflow graphs from AWEL definitions. Workflows are defined as compositions of operators connected by edges representing data dependencies.
Key Characteristics:
Declarative Syntax: Workflows defined as operator compositions rather than imperative code
Type Safety: Strong typing ensures data compatibility between connected operators
Lazy Evaluation: DAG construction separates from execution for optimization
Reusability: Workflows can be saved as templates and instantiated with different parameters
Trigger System
AWEL supports multiple trigger mechanisms to initiate workflow execution:
Trigger Type
Description
Use Case
HTTP Trigger
REST API endpoint invocation
Interactive applications, API services
Schedule Trigger
Cron-based periodic execution
Batch processing, scheduled reports
Event Trigger
Message queue or event stream
Real-time processing, event-driven workflows
Manual Trigger
User-initiated execution
Testing, ad-hoc analysis
Workflow Operators
Operators are atomic units of computation in AWEL workflows. Each operator encapsulates specific logic for data transformation, control flow, or external system interaction.
Core Operator Categories:
Transform Operators: Apply functions to input data
MapOperator: Apply function to each element
FilterOperator: Select elements based on predicate
ReduceOperator: Aggregate elements into single value
Authority Levels: Permissions for system access and action execution
Profile Configuration:
Profiles are typically defined declaratively and can be customized per use case. The profile system supports inheritance and composition for creating specialized agent variants.
Agent Memory System
Agents maintain three memory levels:
Short-term Memory: Recent conversation history and immediate context
Window-based retention (typically last N messages)
Used for maintaining conversation coherence
Cleared after task completion
Long-term Memory: Persistent knowledge and learned experiences
Stored in vector databases for semantic retrieval
Contains domain knowledge, previous solutions, and patterns
Indexed for efficient similarity search
Working Memory: Active task state and intermediate results
Tracks current goal hierarchy and progress
Maintains variables and computation state
Used for planning and decision-making
Agent Tools and Function Calling
Agents interact with external systems through a tool interface that provides:
Tool Definition Schema:
Tool:
- name: Unique identifier
- description: Natural language explanation
- parameters: JSON schema for inputs
- returns: Expected output format
- permissions: Required authorization
Tool Execution:
Tools execute in sandboxed environments for security
Results validated against declared schemas
Execution errors captured and reported to agent
Async execution supported for long-running operations
Built-in Tool Categories:
Data Access: SQL queries, file operations, API calls
AWEL workflows implement robust error handling for agent failures:
Recovery Strategies:
Retry: Automatic retry with exponential backoff
Fallback: Switch to alternative agent or strategy
Compensation: Undo partial execution and restore state
User Intervention: Escalate unrecoverable errors to user
Error Propagation:
Errors captured at agent level and propagated through workflow graph, allowing upstream operators to handle or transform errors appropriately.
State Persistence
Agent and workflow state persisted to database for resumability and audit:
Storage Layer:
Workflow execution state stored in metadata database via SQLAlchemyStorage
Agent memory backed by vector stores and relational tables
Task state serialized to JSON for portability
Schema:
Workflow state table includes:
Workflow ID and version
Current execution state (running/paused/completed/failed)