smithery.ai

evolving-workflow

Templates for building parallel AI agent workflows in MoonBit. Includes patterns for simple fan-out processing and multi-phase orchestration with automatic retry and validation.

First seen Apr 21, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents codex

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,170 B
  • docs SUMMARY.md 202 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Evolving Workflow

Templates for building parallel AI agent workflows using the Codex SDK.

Templates

Template Pattern Description
[paralleltasks](assets/paralleltasks) Fan-out Process items in parallel with bounded concurrency
[multiphase](assets/multiphase) Fan-out → Sequential → Fan-out Three-phase workflow with intermediate planning

Project Structure

your_workflow/
├── main.mbt           # Orchestration (usually unchanged)
├── moon.pkg.json
└── app/
    ├── job.mbt        # TaskHandle lifecycle (customize this)
    ├── args.mbt       # CLI parsing
    └── moon.pkg.json

main.mbt: Orchestration

The main file orchestrates: initialize → spawn parallel agents → summarize results.

async fn main {
  let config = @app.initialize() catch { ... }
  let codex = @codex.Codex::new()

  let results = @shared.for_all_tasks(
    config.items,
    async fn(idx, _) {
      let handle = config.task_start(idx)
      try {
        let thread = codex.start_thread(...)
        @async.retry(@async.RetryMethod::Immediate, fn() {
          let prompt = handle.prompt()
          let response = thread.run(prompt)
          handle.validate(response.final_response)
          handle.finish()
        }, max_retry=3)
      } catch { e => handle.error(e) }
    },
    parallelism=config.parallelism,
  )
  config.summarize(results)
}

For multi-phase, the pattern chains three phases: summarize (fan-out) → plan (sequential) → process (fan-out).

Customization

Edit app/job.mbt to customize:

Function What to change
discover_items() How to find targets to process
readitemcontent() What data to load for prompts
prompt() Your task instructions
validate() Success criteria (raise to retry)
finish() How to save results