System Design

Backend Architecture

A deep dive into the modular, production-grade execution engine that powers your autonomous workflows.

Execution Engine Layers

API Layer

Express server handling REST requests, authentication, and workflow registration.

  • Route Handlers
  • Input Validation
  • Auth Middleware

Orchestration Layer

The Step Runner manages the workflow lifecycle, state transitions, and variable passing.

  • Step Runner
  • Variable Interpolation
  • Error Policy Engine

Persistence Layer

MongoDB stores workflow definitions, execution logs, and agent memory.

  • Mongoose Models
  • Vector Search (RAG)
  • Execution History

Component Interaction

The platform follows a unidirectional data flow for executions. Triggers are captured by the API or Scheduler, which then hands off the execution to the Runner. The Runner interacts with various Executors (LLM, Tools) while updating the state in MongoDB.

Stateless API

The frontend is a pure dashboard interacting with the API server.

Isolated Workers

Step execution can be distributed across multiple worker processes.

Event Driven

Logs and status updates are persisted as events occur.

API SERVER (REST)
SCHEDULER
WORKER POOL
AGENT RUNNER

Execution Engine Flow

1

Initialization

Load workflow definition and initialize context.

2

Pre-execution

Validate inputs and resolve variable templates.

3

Processing

Dispatch steps to specialized executors (LLM, HTTP, etc.).

4

Post-execution

Normalize outputs and persist execution logs.

Modular Extensibility

The architecture is designed to be plug-and-play. You can easily add new executors by implementing a standard interface in the backend/src/runner/executors directory. This allows the platform to support any third-party service or custom internal logic with minimal effort.