Skip to main content

Workflow Basic Template

The Workflow Basic template demonstrates the simplest workflow you can build with BindAI. It introduces the core concepts of the workflow engine by executing a single AI agent in a linear sequence. This template is the recommended starting point for understanding how workflows are created, executed, and extended. Once you’re familiar with this template, you can gradually introduce conditions, loops, parallel execution, retries, scheduling, and human approval into your workflows.

Purpose

This template demonstrates how to:
  • Create a workflow
  • Register and execute an AI agent
  • Execute nodes sequentially
  • Share data through the workflow context
  • Return the final workflow result
To keep the example focused, it intentionally avoids advanced workflow features such as branching, retries, loops, and parallel execution.

Workflow Structure

The workflow consists of three nodes connected in a simple linear sequence.
Execution always begins at the Start node, continues to the Agent node, and finishes at the End node. Each node is executed exactly once.

When to Use

Use the Workflow Basic template when you want to:
  • Learn how BindAI workflows execute
  • Build your first workflow
  • Test an AI agent in a workflow
  • Create simple automations
  • Prototype new workflow ideas
This template serves as the foundation for every other workflow pattern in BindAI.

Components

A basic workflow contains the minimum set of components required for execution.
Each component has a single responsibility:

Execution Flow

Workflow execution follows a predictable sequence.
Once the End node is reached, execution stops and the workflow returns its result.

Agent Execution

The Agent node performs the primary AI task.
The agent receives the workflow input, processes the request using the configured provider, and stores the result in the workflow context for later use. In more advanced workflows, multiple agents can access and update the same shared context.

Workflow Context

Every workflow maintains a shared execution context.
The workflow context stores information generated during execution, making it available to subsequent nodes. Typical values include:
  • User input
  • Agent responses
  • Variables
  • Intermediate results
  • Metadata
Sharing state through the workflow context allows complex workflows to coordinate multiple tasks without manually passing values between nodes.

Expected Output

When execution completes successfully, the workflow returns a result.
The returned data depends on the configured agent and workflow logic, but typically includes the final agent response along with any values stored during execution.

What You’ll Learn

By working through this template, you’ll understand:
  • How a workflow is structured
  • How workflow execution begins and ends
  • How nodes execute sequentially
  • How agents participate in a workflow
  • How data is shared through the workflow context
These concepts form the foundation for every workflow built with BindAI.

Extending the Workflow

Once you’re comfortable with the basic execution model, you can introduce additional workflow nodes to support more advanced automation. For example, adding a condition:
Or introducing a loop:
You can also combine multiple workflow features—including conditions, retries, parallel execution, scheduling, and human approval—to build sophisticated business processes while preserving the same underlying execution model.

Best Practices

  • Start with a simple linear workflow before adding complexity.
  • Verify that each node behaves as expected before introducing additional logic.
  • Give workflow nodes clear, descriptive names.
  • Store shared information in the workflow context instead of duplicating data.
  • Build complex workflows incrementally by adding one feature at a time.

Related Templates

The Workflow Basic template introduces the core execution model used throughout the BindAI workflow engine. The remaining templates build on these same concepts while introducing additional capabilities:
  • Workflow Condition
  • Workflow Loop
  • Workflow Parallel
  • Workflow Human
  • Workflow Retry
  • Workflow Timeout
  • Workflow Schedule
Each template focuses on a single workflow pattern, making it easier to learn advanced features step by step.