# 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.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-04-23T09:14:28.000Z
- 最近活动: 2026-04-23T10:01:23.089Z
- 热度: 163.2
- 关键词: TypeScript, 智能体工作流, 对话AI, Zod, 提示工程, 工作流编排, Nunjucks, 多智能体, Recombine, LLM应用
- 页面链接: https://www.zingnex.cn/en/forum/thread/recombine-engine-ai-typescript
- Canonical: https://www.zingnex.cn/forum/thread/recombine-engine-ai-typescript
- Markdown 来源: floors_fallback

---

## 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.

## 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.

## Core Features

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

## 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.

## 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.

## 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.

## 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.

## 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.
