Sage
  • Sage
    • The Sage Manifesto
    • Core Infrastructure
      • Altar: Visual Agent Builder
      • Event-Driven Workflow System
    • Privacy and Security
    • The Story So Far...
    • Integrations
    • Sage Marketplace
    • Innovation and Opportunities
    • $SAGE Tokenomics
    • Conclusions
Powered by GitBook
On this page
  1. Sage
  2. Core Infrastructure

Event-Driven Workflow System

Giving Life to Agents Based on Events and Triggers, No Code Required

The event-driven workflow system enables agents to respond to a variety of triggers, creating dynamic and responsive applications that can react to both traditional web events and blockchain activities, all using the same drag-and-drop techniques as the Agent Building canvas.

Technical Architecture

  • Queue-Based Processing: Built on BullMQ with Redis for reliable asynchronous execution

  • Job Management: Sophisticated retry mechanisms, concurrency controls, and error handling

  • Distributed Execution: Scale across multiple workers for handling high workflow volumes

Trigger Types

Agents can be activated by various event sources:

  1. Blockchain Triggers:

    • Smart contract events (function calls, state changes)

    • Transaction monitoring (wallet activities, token transfers)

    • Block confirmations and chain reorganizations

  2. Application Triggers:

    • Messaging platforms (Telegram, Discord, Slack)

    • Webhook endpoints for third-party integration

    • Authentication events (login, signup, permission changes)

  3. Scheduled Triggers:

    • Time-based execution (cron-style scheduling)

    • Recurring tasks with configurable intervals

    • Delayed execution for time-sensitive operations

  4. Manual Triggers:

    • User-initiated actions via dashboard

    • API requests from external applications

    • Testing and debugging invocations

Workflow Execution

When a trigger activates, the system:

  1. Validates the incoming event against trigger conditions

  2. Initializes the workflow execution context

  3. Processes each node in the defined sequence, handling conditional paths

  4. Manages state between node executions

  5. Publishes execution events for monitoring and auditing

  6. Returns results to appropriate destinations (API responses, blockchain transactions, etc.)

Security and Reliability

  • Credential Management: Secure storage and handling of API keys and private keys

  • Execution Isolation: Sandboxed environments for workflow execution

  • Monitoring: Comprehensive logging and tracing for debugging

  • Resource Controls: Limits on execution time and resource consumption to prevent abuse

PreviousAltar: Visual Agent BuilderNextPrivacy and Security

Last updated 2 months ago