state_machine

command
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

This example demonstrates a StateMachine process with conditional transitions.

Tasks transition based on output conditions:

  • "assess" → "analyze" if assessment contains "complex"
  • "assess" → "approve" if assessment contains "simple"
  • "analyze" → "approve" if analysis contains "recommend"

If no condition matches at any step, the flow terminates with ErrNoMatchingPath.

Usage:

OPENAI_API_KEY=sk-... go run ./examples/process/state_machine/

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL