Zing Forum

Reading

Recombine Engine: A TypeScript Agent Workflow Orchestration Framework for Conversational AI

Recombine Engine is a TypeScript library designed specifically for building agent workflows for conversational AI. It supports multi-step workflow orchestration, conditional execution, structured responses, file-based prompt management, and message history management, and can be integrated with the Recombine Bosun prompt engineering IDE.

TypeScript智能体工作流对话AIZod提示工程工作流编排Nunjucks多智能体RecombineLLM应用
Published 2026-04-23 17:14Recent activity 2026-04-23 18:01Estimated read 5 min
Recombine Engine: A TypeScript Agent Workflow Orchestration Framework for Conversational AI
1

Section 01

Introduction / Main Floor: Recombine Engine: A TypeScript Agent Workflow Orchestration Framework for Conversational AI

Recombine Engine is a TypeScript library designed specifically for building agent workflows for conversational AI. It supports multi-step workflow orchestration, conditional execution, structured responses, file-based prompt management, and message history management, and can be integrated with the Recombine Bosun prompt engineering IDE.

2

Section 02

Project Positioning and Design Philosophy

In the development practice of conversational AI, simple single-turn Q&A often cannot meet the needs of complex business scenarios. Users expect AI to perform multi-step tasks, make decisions based on intermediate results, and coordinate multiple sub-agents to work together. Recombine Engine is a TypeScript library born to address these complex orchestration needs.

The project's design philosophy emphasizes declarative workflow definition and type safety. Developers can define each step of the workflow through clear configuration objects, use TypeScript's type system to catch potential errors at compile time, while maintaining code readability and maintainability. This design concept makes complex agent workflows easy to understand, test, and iterate.

3

Section 03

Core Features

Recombine Engine provides a complete set of features needed to build conversational AI workflows:

4

Section 04

Multi-step Agent Workflow

A workflow consists of a series of interconnected steps (Step). Each step can access the results of previous steps and determine the execution path of the next step based on business logic. This chain structure supports complex decision trees, loops, and conditional branches.

5

Section 05

Conditional Execution and Review Mechanism

Each step can be configured with conditional execution logic (runIf) to decide whether to skip the step. It also supports the Reviewer mode—when the output of a step does not meet expectations, it can automatically retry or roll back to the previous step for re-execution. This mechanism provides a foundation for building robust fault-tolerant systems.

6

Section 06

Structured Responses and Zod Schema Validation

Through integration with the Zod library, developers can define strict output schemas (Schema) for each step. The responses returned by the model are automatically validated and parsed to ensure data structure consistency. This not only improves code reliability but also enables IDEs to provide better auto-completion support.

7

Section 07

File-based Prompt Management

The project supports storing prompt templates in independent text files, which can be loaded via the engine.loadFile() method. This separation allows prompt engineering to proceed in parallel with code development, and non-technical personnel can also participate in prompt optimization without modifying the code.

8

Section 08

Message History Management

The built-in message list manager (makeMessagesList) is responsible for maintaining conversation context. It supports adding user messages, system messages, and assistant messages, and can automatically handle message truncation and context window management.