Mesh Flow

Transform brittle prompt chains into robust, artifact-driven DAG workflows with hard gates and explicit traces.

Install
cmdop skills install agensi-mesh-flow

Mesh Flow is a skill that moves multi-agent orchestration logic out of prompts and into a structured, artifact-driven DAG (directed acyclic graph) framework. Instead of relying on implicit prompt-chaining, developers define their workflow in a single project.yaml file, identifying each node by the artifacts it consumes and produces. This topology-first design decouples workflow structure from the logic inside individual skill nodes.

Before any execution begins, a compiler validates the workflow for circular dependencies, missing artifact producers, and schema violations. This compile-then-run approach catches structural errors early rather than at runtime. Once validated, execution proceeds through a state machine that distinguishes three explicit failure states — failed, blocked, and rejected — each with its own automated recovery path.

Mesh Flow enforces hard gates that models cannot bypass. These include human-in-the-loop approval steps, artifact presence checks, and custom verifier functions. All skill nodes share a standardized adapter contract, which guarantees consistent trace logging and error reporting across the entire workflow.

A CLI is included for local validation, workflow execution, and generating Mermaid-format visualizations of the agent’s decision graph. These visualizations make it straightforward to inspect and communicate workflow topology before deployment.

Mesh Flow is suited to production-grade agentic systems where workflow predictability, auditability, and controlled failure handling matter. It is not a simple prompt-chaining helper and carries meaningful structural overhead for small or single-step agent tasks.

Use cases

  • Define a multi-step agent pipeline in project.yaml with explicit artifact dependencies between nodes
  • Validate a complex agent workflow for circular dependencies and missing producers before running it
  • Insert human-in-the-loop approval gates that cannot be skipped by model outputs
  • Trace and audit every node's inputs, outputs, and failure state across a multi-agent run
  • Generate Mermaid visualizations of an agent's DAG to inspect or document workflow topology
  • Implement custom verifier functions to enforce business rules at specific workflow checkpoints

When to use it

  • Building production multi-agent workflows where reproducibility and auditability are required
  • Workflows that need hard gates such as human approvals or artifact presence checks that models must not bypass
  • Teams that need to inspect and validate workflow structure before any execution occurs
  • Agentic systems requiring clear, distinguishable failure modes and automated recovery paths

When not to use it

  • Simple single-step or two-step agent tasks where DAG overhead is not justified
  • Projects that require a lightweight prompt-chaining library with no compile step
  • Environments without CLI access, as the included CLI is part of the core workflow
  • Use cases that do not involve artifact-passing between nodes, since the framework centers on artifact contracts