Zing Forum

Reading

Cori: Transforming Agent Conversations into Reproducible, Deterministic Workflows

Cori is an open-source framework that enables repeatable and traceable automated execution by capturing one-off Agent conversations into type-safe TypeScript workflows, built on the Temporal workflow engine.

Agent工作流TypeScriptTemporal确定性执行自动化MCP开源框架
Published 2026-06-02 07:14Recent activity 2026-06-02 07:18Estimated read 7 min
Cori: Transforming Agent Conversations into Reproducible, Deterministic Workflows
1

Section 01

Cori Framework Core Introduction: Transforming Agent Conversations into Reproducible, Deterministic Workflows

Cori is an open-source framework whose core goal is to resolve the conflict between the uncertainty of AI Agent interactions and the need for predictability in engineering practice. It enables repeatable and traceable automated execution by capturing one-off Agent conversations into type-safe TypeScript workflows, built on the Temporal workflow engine. The framework's core philosophy is to separate the creation of workflows by Agents from the deterministic execution by the system, balancing the flexibility of Agents with the reliability of traditional software engineering.

2

Section 02

Project Background: The Uncertainty Challenge of Agent Interactions

With the popularization of AI Agents, the conflict between dynamic, non-deterministic Agent interactions and the predictable, reproducible results required in engineering is becoming increasingly prominent. For example, an Agent executing the same task may produce different results due to changes in time or environment, which is an obstacle in critical business scenarios. Cori's solution is to let Agents only be responsible for writing the workflow once, while the execution of the workflow is guaranteed to be deterministic and reproducible by the system.

3

Section 03

Architecture Design: Folder as Workflow and LLM-Free Execution at Runtime

Cori's architecture design includes three key principles:

  1. Folder as Workflow: Abandon the centralized registry; each workflow exists as a folder (containing manifest.md and step files), supporting version control and collaboration.
  2. LLM-Free Execution at Runtime: No LLM calls are needed during workflow execution, ensuring predictable costs, stable latency, and reproducible results, with retry and state tracking implemented based on the Temporal engine.
  3. End-to-End Type Safety: Built with TypeScript and Zod, input and output have type constraints and runtime validation to ensure data transmission security.
4

Section 04

Core Features: Step Types and Distributed Execution

Cori provides four step types to cover automation scenarios:

  • CLI Step: Execute command-line tools (e.g., curl, git) and capture output;
  • Code Step: Run TypeScript functions in a sandbox to handle complex logic;
  • MCP Step: Call Model Context Protocol server tools;
  • LLM Step: Explicitly call large language models (requires active selection). In addition, it supports distributed execution (steps are routed to appropriate workers) and credential isolation (sensitive information does not leave the local machine), and each run generates detailed trace files for debugging and auditing.
5

Section 05

Technology Selection and User Experience

Technology Selection: Choose the Temporal engine to leverage its capabilities such as persistent execution and automatic retries; use the TypeScript + Zod combination to achieve type safety and runtime validation, reducing learning costs. User Experience: Installation is simple (one command), the local Temporal server starts automatically on first run; workflows are defined declaratively (manifest.md + steps directory); supports referencing remote workflows via Git (fixed by tag, version, or commit SHA).

6

Section 06

Application Scenarios: From Document Translation to Security Operations

Cori is suitable for various scenarios:

  1. Automated Document Translation: Agents generate a unified workflow to process multilingual documents, ensuring consistency;
  2. Data ETL Pipelines: Type safety and execution tracking ensure reliable data flows, with Agents assisting in generating initial code;
  3. Security-Sensitive Operations: Distributed execution and credential isolation mechanisms protect sensitive data, and workflow definitions do not contain sensitive information.
7

Section 07

Ecosystem Expansion and Future Outlook

Ecosystem Expansion: Through the skill mechanism (e.g., cori_save_workflow), Agents can directly generate workflow code compliant with Cori specifications, integrating into existing Agent development processes. Outlook: Cori represents a pragmatic approach to AI engineering—Agents enhance developers' capabilities rather than replacing traditional engineering. As Agents are deployed in critical scenarios, its paradigm of "Agents write, system executes" may become an important direction, worth exploring and trying by developers.