zenflow

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

zenflow

zenflow

The multi-agent harness & workflow engine.

A production multi-agent harness. Declarative YAML agent workflows; an LLM coordinator routes events through hub-and-spoke mailboxes with race-safe delivery; agents call native MCP tools. One YAML file, one Go binary. Runs on any provider goai supports.

Codecov Release Go Reference License

Website · Docs · Blueprint · Architecture · YAML Reference · Examples


[!IMPORTANT] Status: zenflow is extremely new and under active development; APIs and the YAML schema may change before v1.0.

See it run

A real zenflow flow spec/v1/examples/full-featured.yaml --model google/gemini-3-flash-preview --workdir /tmp/full-feature-gemini --yolo --plan run. The --plan flag prints the DAG before execution; the coordinator narrates every step boundary; four agents (planner, coder, reviewer, deployer) call read / write / glob / grep / bash tools to plan, implement, review, and ship a feature; the deploy_staging sub-workflow (loaded via includes:) runs after the main DAG completes. The cast that produced this recording is pinned at demos/full-featured.cast - replay it locally with asciinema play demos/full-featured.cast.

Core features

  • Declarative YAML agent workflows. Multi-agent workflows expressed in a small composable spec: steps, dependencies, parallel fan-out, conditions (CEL), loops (forEach, repeat-until via untilAgent/maxIterations), includes for sub-workflow reuse, and tool steps (tool / toolInput) that invoke a registered goai tool directly without an LLM call.
  • LLM coordinator with hub-and-spoke messaging. A coordinator agent narrates progress, forwards events between running steps, and finalizes the run. Peer agents never address each other directly.
  • Race-safe Mailbox + Wake delivery. Every message is delivered through a per-agent mailbox with explicit drop reasons. No silent loss, no out-of-order delivery, no leaked goroutines.
  • Native MCP tools. Point the harness at a Claude-compatible .zenflow/settings.json and every Model Context Protocol server's tools become available to your agents - stdio, HTTP, or SSE. No Go code, no recompile. Reference a whole server by name in an agent's tools:. See MCP servers.
  • Multi-provider verified. Verified against Google gemini-3-pro-preview, AWS Bedrock (anthropic.claude-sonnet-4-6, minimax.minimax-m2.5), and Azure (DeepSeek-V3.2, claude-sonnet-4-6, gpt-5, gpt-5.3-codex) - any model goai supports works.
  • Spec-first. Workflows validate against spec/v1/schema.json plus a Go validator with 40+ conformance fixtures BEFORE the first LLM call. Cycles, missing dependencies, unknown agents, malformed CEL - all rejected in milliseconds, not after a minute of model burn.
  • Embed anywhere. CLI for one-shot runs (zenflow flow, zenflow goal, zenflow agent); Go library primitives (zenflow.New, Orchestrator.RunFlow) for embedding inside long-running services. Ships as a single static Go binary - no JVM, no Python interpreter, no Node runtime. go install, brew install, or curl | sh and you're running.

Install

The fastest path is the install script - it picks the right archive for your OS+arch from the latest GitHub Release, verifies the SHA-256 checksum, and drops zenflow into ~/.local/bin (or %LOCALAPPDATA%\Programs\zenflow on Windows).

# macOS / Linux
curl -fsSL https://zenflow.sh/install.sh | sh
# Windows (PowerShell)
iwr -useb https://zenflow.sh/install.ps1 | iex

Other options:

# Docker (linux/amd64 + linux/arm64 multi-arch image on GHCR)
docker pull ghcr.io/zendev-sh/zenflow:latest
docker run --rm \
  -e GEMINI_API_KEY \
  -e ZENFLOW_MODEL=google/gemini-2.0-flash \
  -v "$PWD":/wd -w /wd \
  ghcr.io/zendev-sh/zenflow:latest flow workflow.yaml

# Homebrew (macOS / Linux)
brew install zendev-sh/tap/zenflow

# Go install
go install github.com/zendev-sh/zenflow/cmd/zenflow@latest

# Manual download
# https://github.com/zendev-sh/zenflow/releases/latest

Requires Go 1.25+ when installing via go install or building from source. The Docker image runs as the distroless nonroot user and ships a static zenflow binary, no shell.

Quick start

Drop a workflow into a YAML file:

# debate.yaml
name: debate
agents:
  pro:    { description: "Argues IN FAVOR of the proposition." }
  con:    { description: "Argues AGAINST the proposition." }
  judge:  { description: "Impartial judge declaring a winner." }

steps:
  - id: team-pro
    agent: pro
    instructions: "Argue: 'AI assistants will replace junior dev roles within 5 years.'"

  - id: team-con
    agent: con
    instructions: "Argue against the same proposition."

  - id: verdict
    agent: judge
    instructions: "Declare a winner with reasoning."
    dependsOn: [team-pro, team-con]

Run it from the CLI:

export GEMINI_API_KEY=...
zenflow flow debate.yaml

For automated CI runs where you want to block shell access, add --sandbox:

zenflow flow debate.yaml --sandbox --model google/gemini-2.5-flash

--sandbox restricts tools to read, write, grep, and glob; bash is blocked even if --allow bash is also passed. See the CLI reference for the full permission flag set (--yolo, --allow, --deny, --strict).

Or embed in Go:

package main

import (
    "context"
    "fmt"
    "log"
    "os"

    "github.com/zendev-sh/goai/provider/google"
    "github.com/zendev-sh/zenflow"
)

func main() {
    wf, err := zenflow.LoadWorkflow("debate.yaml")
    if err != nil {
        log.Fatal(err)
    }

    llm := google.Chat("gemini-2.0-flash", google.WithAPIKey(os.Getenv("GEMINI_API_KEY")))
    orch := zenflow.New(
        zenflow.WithModel(llm),
        zenflow.WithCoordinator(zenflow.NewDefaultCoordRunner(llm)),
    )
    defer orch.Close()

    result, err := orch.RunFlow(context.Background(), wf)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(result.Summary)
}

See examples/ for 19 runnable Go embeddings and spec/v1/examples/ for the matching YAML.

Three modes

zenflow exposes the same engine through three CLI verbs and one Go library surface:

Mode What it does Use when
zenflow flow workflow.yaml Runs a fully-declared YAML DAG to completion. The plan is fixed up-front; you want a deterministic execution.
zenflow goal "build a thing" Asks the coordinator to plan and run a workflow on the fly. The plan must adapt to user input or interim results.
zenflow agent "<prompt>" Single-agent chat with optional tool loop. One-shot agent calls; reuses zenflow's lifecycle hooks and provider routing.

The library form (zenflow.New(...).RunFlow(ctx, wf)) is the same engine; the CLI is a thin wrapper that resolves a provider from --model, wires the coordinator, and prints results.

MCP servers

Give agents tools from any Model Context Protocol server with a Claude-compatible .zenflow/settings.json - no Go code, no recompile:

{
  "mcpServers": {
    "firecrawl": {
      "command": "npx",
      "args": ["-y", "firecrawl-mcp"],
      "env": { "FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}" }
    }
  }
}
agents:
  crawler:
    description: "Crawls pages with firecrawl."
    tools: ["read", "write", "firecrawl"]   # bare server name = all its tools
zenflow flow crawl.yaml --model google/gemini-2.5-flash --verbose
# zenflow: MCP loaded 8 tool(s) from server(s) [firecrawl]

The CLI reads .zenflow/settings.json by default (override with --mcp-config, disable with --no-mcp); all three verbs use it. stdio, HTTP, and SSE transports are supported, with ${VAR} env expansion. Discovered tools are namespaced <server>__<tool>. Embedders get the same surface via LoadMCPConfig / ConnectMCPConfig / WithAdditionalTools. Full guide: MCP servers.

Documentation

Section What's there
Getting Started Install, first workflow, three-mode walkthrough.
Architecture DAG executor, coordinator, Router, Mailbox, delivery engine (internal), lifecycle.
Concepts Agents, scheduling, coordinator, messaging, failure handling, isolation, shared memory, observability, loops, conditions, composition, structured output, tools.
YAML Reference Workflow / agent / step / loop schemas + CEL expression reference.
CLI Reference Commands, flags, output formats.
Integrations MCP servers, CI/CD, Docker, scripting, observability (OTel / Langfuse / Jaeger / Datadog).
Go API Core functions, options (49 With* constructors), types, errors.
Examples 19 worked examples covering every primitive.
SKILL.md Top-of-funnel context for AI agents that consume zenflow (tool description, env vars, YAML shape, NDJSON event schema, exit codes, decision flow). Follows the AI-skill format convention; reusable by any agent harness.

Compared to other multi-agent frameworks

zenflow takes a narrower position than CrewAI, AutoGen, and LangGraph: workflows are declarative YAML rather than Python control flow; messaging is mediated by a single coordinator instead of peer-to-peer; delivery is race-safe by construction via a mailbox + wake registry. See Compare for a side-by-side covering the tradeoffs each design makes.

Contributing

See CONTRIBUTING.md for dev setup, build/test commands, and the PR process.

AI contributors: two files cover different audiences and should not be confused.

  • AGENTS.md (regenerated from CLAUDE.md by scripts/sync-agents-md.sh; pre-commit hook keeps them in sync) - instructions for AI agents editing the codebase. Code style, package layout, key rules, testing levels.
  • SKILL.md - context for AI agents consuming zenflow as a tool. CLI verbs, env vars, YAML shape, NDJSON event schema, exit codes.

Community

  • Code of Conduct - the standards we expect from all contributors and how to report violations.
  • Security Policy - private vulnerability disclosure process; do not open a public issue for security reports.

License

Apache 2.0.

Documentation

Overview

Package zenflow is a declarative multi-agent workflow engine for Go. A zenflow workflow is a YAML DAG of steps. Each step has an agent (an LLM-backed conversational role), instructions, optional dependencies, and an optional retry/timeout/isolation policy. The engine schedules steps respecting their dependencies, runs them concurrently when safe, and threads inter-step messages through a coordinator. Three execution modes share one engine: - [Orchestrator.RunFlow] runs a fully-declared YAML DAG. - [Orchestrator.RunGoal] asks a coordinator LLM to plan a workflow from a goal string, then runs it. - [Orchestrator.RunAgent] runs a single agent loop with no DAG. The CLI binary at cmd/zenflow is a thin wrapper around the same Orchestrator. Embedders use the library form directly:

import "github.com/zendev-sh/zenflow"
func main {

orch := zenflow.New(zenflow.WithModelResolver(modelResolver)) defer orch.Close wf, err := zenflow.LoadWorkflow("workflow.yaml") if err != nil { panic(err) } res, err := orch.RunFlow(ctx, wf) // ...

}

# Coordinator and messaging A coordinator is itself an AgentRunner running in parallel with the step DAG. It owns four default tools: forward_to_agent (coord -> step's mailbox), send_message (step -> coord upstream), narrate (emit a progress event), and finalize (terminate the run with a summary). Peer agents never address each other directly - every inter-step message flows through the coordinator (hub-and-spoke). # Race-safe delivery Every send goes through the DeliveryEngine (Mailbox + Wake pair). The Mailbox is the per-step inbox; the Wake is a 1-buffered channel that signals "new mail." A drop returns a typed DropReason - there is no silent loss, no out-of-order delivery, and no leaked goroutines. # Resume from transcript A long step can be resumed across process boundaries via the TranscriptStore interface. The executor records the system prompt, model ID, and message history; resume calls [Executor.ResumeStep] to spawn a fresh runner that continues from the last appended turn. # Provider routing zenflow does no LLM I/O itself. All provider work goes through goai (https://goai.sh). Any model goai supports - Google Gemini, AWS Bedrock, Azure (DeepSeek / Anthropic / GPT chat / GPT responses), Vertex, and others - works as a zenflow agent backend. See goai.ProviderRouter and the WithModel option. # Stability Pre-1.0. The exported surface (Orchestrator, RunFlow/RunGoal/RunAgent, the With* options, Workflow / Step / StepResult / WorkflowResult, the MailboxStore / TranscriptStore / Storage / StepIsolation interfaces, and the YAML schema in spec/v1/) is intended to settle at v0.1.0 but may still change. See docs/architecture, docs/concepts, and docs/yaml at zenflow.sh for the full reference. The CLI's own help is `zenflow --help`.

Index

Constants

View Source
const (
	AgentStatusCompleted = exec.AgentStatusCompleted
	AgentStatusTruncated = exec.AgentStatusTruncated
)

AgentStatus enum values re-exported from internal/exec.

View Source
const (
	MessageKindNotification = types.MessageKindNotification
	MessageKindContent      = types.MessageKindContent
)

MessageKind constants re-exported from internal/types.

View Source
const (
	EventWorkflowStart           = types.EventWorkflowStart
	EventWorkflowEnd             = types.EventWorkflowEnd
	EventStepStart               = types.EventStepStart
	EventStepEnd                 = types.EventStepEnd
	EventStepSkipped             = types.EventStepSkipped
	EventAgentTurn               = types.EventAgentTurn
	EventToolCall                = types.EventToolCall
	EventMessage                 = types.EventMessage
	EventError                   = types.EventError
	EventCoordinatorNarration    = types.EventCoordinatorNarration
	EventCoordinatorMessage      = types.EventCoordinatorMessage
	EventCoordinatorSynthesis    = types.EventCoordinatorSynthesis
	EventCoordinatorInboxMessage = types.EventCoordinatorInboxMessage
	EventMessageSent             = types.EventMessageSent
	EventPlanReady               = types.EventPlanReady
	EventAgentInboxDrain         = types.EventAgentInboxDrain
	EventMessageDropped          = types.EventMessageDropped
	EventAgentIdle               = types.EventAgentIdle
	EventAgentWake               = types.EventAgentWake
	EventMaxWakeCyclesWarning    = types.EventMaxWakeCyclesWarning
	EventResumeStarted           = types.EventResumeStarted
	EventResumeCompleted         = types.EventResumeCompleted
	EventResumeFailed            = types.EventResumeFailed
	EventResumeQueued            = types.EventResumeQueued
	EventTranscriptSealed        = types.EventTranscriptSealed
)

EventType constants re-exported from internal/types.

View Source
const (
	RouterMessageInfo          = router.MessageInfo
	RouterMessageCancel        = router.MessageCancel
	RouterMessageContextUpdate = router.MessageContextUpdate
	RouterMessageResumeReply   = router.MessageResumeReply
)

RouterMessageType enum re-exports.

View Source
const (
	DropReasonUnspecified             = router.DropReasonUnspecified
	DropReasonWorkflowCancelled       = router.DropReasonWorkflowCancelled
	DropReasonTargetTerminal          = router.DropReasonTargetTerminal
	DropReasonUnknownStep             = router.DropReasonUnknownStep
	DropReasonMailboxClosedByFinalize = router.DropReasonMailboxClosedByFinalize
	DropReasonMaxWakeCycles           = router.DropReasonMaxWakeCycles
	DropReasonHoldTimeout             = router.DropReasonHoldTimeout
	DropReasonMailboxFull             = router.DropReasonMailboxFull
	DropReasonNoTranscript            = router.DropReasonNoTranscript
	DropReasonTranscriptTooLarge      = router.DropReasonTranscriptTooLarge
	DropReasonResumeShutdown          = router.DropReasonResumeShutdown
	DropReasonResolverError           = router.DropReasonResolverError
)

DropReason enum re-exports.

View Source
const (
	LoopOutputModeLast       = spec.LoopOutputModeLast
	LoopOutputModeCumulative = spec.LoopOutputModeCumulative
)

LoopOutputMode constants re-exported from internal/spec.

View Source
const (
	FailureCascade        = spec.FailureCascade
	FailureSkipDependents = spec.FailureSkipDependents
	FailureAbort          = spec.FailureAbort
)

FailureStrategy values re-exported from internal/spec.

View Source
const (
	SchedulerDependencyFirst = spec.SchedulerDependencyFirst
	SchedulerRoundRobin      = spec.SchedulerRoundRobin
	SchedulerLeastBusy       = spec.SchedulerLeastBusy
)

SchedulerStrategy values re-exported from internal/spec.

View Source
const (
	StatusRunning   = spec.StatusRunning
	StatusCompleted = spec.StatusCompleted
	StatusFailed    = spec.StatusFailed
	StatusPartial   = spec.StatusPartial
)

WorkflowStatus values re-exported from internal/spec.

View Source
const (
	StepCompleted = spec.StepCompleted
	StepFailed    = spec.StepFailed
	StepSkipped   = spec.StepSkipped
	StepCancelled = spec.StepCancelled
)

StepStatus values re-exported from internal/spec.

View Source
const CoordRouterInboxID = exec.CoordRouterInboxID

CoordRouterInboxID is re-exported from internal/exec.

View Source
const DefaultAgentHandleTTL = exec.DefaultAgentHandleTTL

DefaultAgentHandleTTL is re-exported from internal/exec.

View Source
const DefaultCoordCleanupTimeout = exec.DefaultCoordCleanupTimeout

DefaultCoordCleanupTimeout is re-exported from internal/exec. It bounds the cleanup phase of RunCoordinatorLoop's returned func.

View Source
const DefaultCoordColdStartPrompt = exec.DefaultCoordColdStartPrompt

DefaultCoordColdStartPrompt is re-exported from internal/exec.

View Source
const DefaultCoordContinuationPrompt = exec.DefaultCoordContinuationPrompt

DefaultCoordContinuationPrompt is re-exported from internal/exec.

View Source
const DefaultCoordSystemPrompt = exec.DefaultCoordSystemPrompt

DefaultCoordSystemPrompt is re-exported from internal/exec.

View Source
const DefaultMaxBytesPerDep = exec.DefaultMaxBytesPerDep

DefaultMaxBytesPerDep is re-exported from internal/exec. It is the per-dependency byte cap applied by the orchestrator's default OutputTransform when WithOutputTransform is not provided.

View Source
const DefaultMaxMailboxSize = exec.DefaultMaxMailboxSize

DefaultMaxMailboxSize is re-exported from internal/exec. It is the per-step mailbox cap installed by New when WithMaxMailboxSize is not provided. Pass WithMaxMailboxSize(0) to opt out of the cap.

View Source
const DefaultMaxTranscriptBytes = resume.DefaultMaxTranscriptBytes

DefaultMaxTranscriptBytes re-exports resume.DefaultMaxTranscriptBytes so external consumers (and the WithMaxTranscriptBytes docstring) can reference the canonical default per-step byte cap applied to the Day-1 InMemoryTranscriptStore. Stable.

View Source
const DefaultMaxTranscriptMessages = resume.DefaultMaxTranscriptMessages

DefaultMaxTranscriptMessages re-exports resume.DefaultMaxTranscriptMessages so external consumers (and the WithMaxTranscriptMessages docstring) can reference the canonical default per-step message-count cap applied to the Day-1 InMemoryTranscriptStore. Stable.

View Source
const DefaultTruncatedResumeMessages = resume.DefaultTruncatedResumeMessages

DefaultTruncatedResumeMessages re-exports resume.DefaultTruncatedResumeMessages so external consumers can read or mirror the executor's tail bound for LoadTruncated when no explicit cap is supplied. Stable.

View Source
const MetadataKeyResumeReverse = router.MetadataKeyResumeReverse

MetadataKeyResumeReverse is re-exported from internal/router.

Variables

View Source
var (
	WithRunnerModel               = exec.WithRunnerModel
	WithRunnerTools               = exec.WithRunnerTools
	WithRunnerPermissions         = exec.WithRunnerPermissions
	WithRunnerProgress            = exec.WithRunnerProgress
	WithRunnerGoAIOptions         = exec.WithRunnerGoAIOptions
	WithRunnerStreaming           = exec.WithRunnerStreaming
	WithRunnerVerbose             = exec.WithRunnerVerbose
	WithRunnerRunID               = exec.WithRunnerRunID
	WithRunnerStepID              = exec.WithRunnerStepID
	WithRunnerSystemPrompt        = exec.WithRunnerSystemPrompt
	WithRunnerModelID             = exec.WithRunnerModelID
	WithRunnerStateRef            = exec.WithRunnerStateRef
	WithRunnerMailbox             = exec.WithRunnerMailbox
	WithRunnerWake                = exec.WithRunnerWake
	WithRunnerRouter              = exec.WithRunnerRouter
	WithRunnerSpawnDepth          = exec.WithRunnerSpawnDepth
	WithRunnerSpawnParentCallID   = exec.WithRunnerSpawnParentCallID
	WithRunnerMaxWakeCycles       = exec.WithRunnerMaxWakeCycles
	WithRunnerTranscript          = exec.WithRunnerTranscript
	WithRunnerInitialMessages     = exec.WithRunnerInitialMessages
	WithRunnerPreStartDrainGate   = exec.WithRunnerPreStartDrainGate
	WithRunnerWakeContextProvider = exec.WithRunnerWakeContextProvider
)

WithRunner* options re-exported from internal/exec.

View Source
var (
	ErrAgentHandleTimeout        = exec.ErrAgentHandleTimeout
	ErrAgentCancelled            = exec.ErrAgentCancelled
	ErrAgentPanicked             = exec.ErrAgentPanicked
	ErrAgentTurnLimitExceeded    = exec.ErrAgentTurnLimitExceeded
	ErrAgentNoSubmitResult       = exec.ErrAgentNoSubmitResult
	ErrInvalidAgentHandleID      = exec.ErrInvalidAgentHandleID
	ErrAgentToolDirectInvocation = exec.ErrAgentToolDirectInvocation
)

AgentError sentinels re-exported from internal/exec.

View Source
var (
	ErrForwardTargetRequired = coord.ErrForwardTargetRequired
	ErrSendMessageEmpty      = coord.ErrSendMessageEmpty
	ErrNarrateEmpty          = coord.ErrNarrateEmpty
)

Coord tool argument-validation sentinels re-exported from internal/coord. Consumers can match against these via errors.Is to distinguish missing-argument failures from other tool errors.

View Source
var (
	// LoadMCPConfig reads and parses an MCP settings file.
	LoadMCPConfig = exec.LoadMCPConfig
	// ConnectMCPConfig connects to every server in a config and aggregates tools.
	ConnectMCPConfig = exec.ConnectMCPConfig
	// WithMCPClientInfo sets the advertised client name/version.
	WithMCPClientInfo = exec.WithMCPClientInfo
	// WithMCPRequestTimeout bounds each MCP request.
	WithMCPRequestTimeout = exec.WithMCPRequestTimeout
	// WithMCPStderr routes stdio subprocess stderr.
	WithMCPStderr = exec.WithMCPStderr
)

MCP functions + options re-exported from internal/exec.

View Source
var (
	WithModel                     = exec.WithModel
	WithTools                     = exec.WithTools
	WithAdditionalTools           = exec.WithAdditionalTools
	WithGoAIOptions               = exec.WithGoAIOptions
	WithStorage                   = exec.WithStorage
	WithPermissions               = exec.WithPermissions
	WithProgress                  = exec.WithProgress
	WithDefaultModel              = exec.WithDefaultModel
	WithForceModel                = exec.WithForceModel
	WithMaxConcurrency            = exec.WithMaxConcurrency
	WithMaxTurns                  = exec.WithMaxTurns
	WithMaxDepth                  = exec.WithMaxDepth
	WithApproval                  = exec.WithApproval
	WithApprovalTimeout           = exec.WithApprovalTimeout
	WithSharedMemory              = exec.WithSharedMemory
	WithTracer                    = exec.WithTracer
	WithCoordinator               = exec.WithCoordinator
	WithIsolation                 = exec.WithIsolation
	WithOutputTransform           = exec.WithOutputTransform
	WithStreaming                 = exec.WithStreaming
	WithoutStreaming              = exec.WithoutStreaming
	WithVerbose                   = exec.WithVerbose
	WithoutVerbose                = exec.WithoutVerbose
	WithMaxWakeCycles             = exec.WithMaxWakeCycles
	WithHoldTimeout               = exec.WithHoldTimeout
	WithAgentHandleTTL            = exec.WithAgentHandleTTL
	WithDropCallback              = exec.WithDropCallback
	WithDropCallbackBufferSize    = exec.WithDropCallbackBufferSize
	WithMaxMailboxSize            = exec.WithMaxMailboxSize
	WithMailboxStore              = exec.WithMailboxStore
	WithMailboxDelivery           = exec.WithMailboxDelivery
	WithoutMailboxDelivery        = exec.WithoutMailboxDelivery
	WithProgressBufferSize        = exec.WithProgressBufferSize
	WithTranscriptStore           = exec.WithTranscriptStore
	WithMaxTranscriptMessages     = exec.WithMaxTranscriptMessages
	WithMaxTranscriptBytes        = exec.WithMaxTranscriptBytes
	WithExternalInbox             = exec.WithExternalInbox
	WithModelResolver             = exec.WithModelResolver
	WithTruncationOnCapReached    = exec.WithTruncationOnCapReached
	WithoutTruncationOnCapReached = exec.WithoutTruncationOnCapReached
	WithRouterObserver            = exec.WithRouterObserver
	WithRunID                     = exec.WithRunID
	WithFlowContext               = exec.WithFlowContext
	WithGoalContext               = exec.WithGoalContext
)

All Orchestrator With* options re-exported from internal/exec.

View Source
var (
	ErrApprovalTimeout      = exec.ErrApprovalTimeout
	ErrModelRequired        = exec.ErrModelRequired
	ErrStorageRequired      = exec.ErrStorageRequired
	ErrNilAgentHandle       = exec.ErrNilAgentHandle
	ErrNilOrchestrator      = exec.ErrNilOrchestrator
	ErrResumeNoModel        = exec.ErrResumeNoModel
	ErrWorkflowNil          = exec.ErrWorkflowNil
	ErrPlanDenied           = exec.ErrPlanDenied
	ErrRunnerNil            = exec.ErrRunnerNil
	ErrEmptyGoal            = exec.ErrEmptyGoal
	ErrRunNotFound          = exec.ErrRunNotFound
	ErrStepNotFound         = exec.ErrStepNotFound
	ErrIncludePathEscape    = exec.ErrIncludePathEscape
	ErrIncludeDepthExceeded = exec.ErrIncludeDepthExceeded
	ErrRefPathEscape        = exec.ErrRefPathEscape
)
View Source
var (
	ErrResumeShutdown       = router.ErrResumeShutdown
	ErrModelResolverMissing = router.ErrModelResolverMissing
	ErrModelResolverError   = router.ErrModelResolverError
	ErrMailboxFullOnResume  = router.ErrMailboxFullOnResume
)

Router error sentinels re-exported.

View Source
var (
	// ErrNoTranscript re-exports resume.ErrNoTranscript.
	// Stable.
	ErrNoTranscript = resume.ErrNoTranscript

	// ErrTranscriptTooLarge re-exports resume.ErrTranscriptTooLarge.
	// Stable.
	ErrTranscriptTooLarge = resume.ErrTranscriptTooLarge
)

Sentinel errors re-exported from resume.

View Source
var AgentToolDef = exec.AgentToolDef

AgentToolDef is re-exported from internal/exec.

View Source
var ApplyDefaults = exec.ApplyDefaults

ApplyDefaults is re-exported from internal/exec.

View Source
var AssemblePrompt = exec.AssemblePrompt

AssemblePrompt is re-exported from internal/exec. Builds the user prompt from agent + step + baseDir + prior step results. Useful for SDK consumers that want to dry-run or inspect the assembled prompt without invoking the executor.

View Source
var AssemblePromptWithForEach = exec.AssemblePromptWithForEach

AssemblePromptWithForEach is re-exported from internal/exec. Same as AssemblePrompt but accepts an optional *ForEachContext for forEach loop iterations.

View Source
var BuildCoordStepMenu = exec.BuildCoordStepMenu

BuildCoordStepMenu is re-exported from internal/exec.

View Source
var BuildEvalContext = exec.BuildEvalContext

BuildEvalContext is re-exported from internal/exec.

View Source
var BuildToolCatalog = exec.BuildToolCatalog

BuildToolCatalog is re-exported from internal/exec.

View Source
var CoordinatorChat = exec.CoordinatorChat

CoordinatorChat is re-exported from internal/exec.

View Source
var CoordinatorPrompt = exec.CoordinatorPrompt

CoordinatorPrompt is re-exported from internal/exec.

View Source
var CoordinatorStreamChat = exec.CoordinatorStreamChat

CoordinatorStreamChat is re-exported from internal/exec.

View Source
var DecidePermission = exec.DecidePermission

DecidePermission is re-exported from internal/exec. Applies a static PermissionPolicy plus the caller-owned alwaysAllow map and returns (allowed, prompt, err): see exec.DecidePermission docs.

View Source
var DetectMixedScript = exec.DetectMixedScript

DetectMixedScript is re-exported from internal/exec.

View Source
var DropReasonStrings = router.DropReasonStrings

DropReasonStrings is re-exported from internal/router.

View Source
var ErrMailboxFull = router.ErrMailboxFull

ErrMailboxFull is re-exported from internal/router.

View Source
var ErrNilFactoryInner = exec.ErrNilFactoryInner

ErrNilFactoryInner is re-exported from internal/exec.

View Source
var ErrOrchestratorClosed = exec.ErrOrchestratorClosed

ErrOrchestratorClosed is re-exported from internal/exec.

View Source
var ErrToolDenied = exec.ErrToolDenied

ErrToolDenied is re-exported from internal/exec. Wrapped by DecidePermission when a tool matches the policy's Deny list.

View Source
var ErrToolNotAllowed = exec.ErrToolNotAllowed

ErrToolNotAllowed is re-exported from internal/exec. Wrapped by DecidePermission when a strict-mode policy rejects a tool not on the Allow list.

View Source
var EvaluateCEL = exec.EvaluateCEL

EvaluateCEL is re-exported from internal/exec.

View Source
var EvaluateCELToArray = exec.EvaluateCELToArray

EvaluateCELToArray is re-exported from internal/exec.

View Source
var FilterTools = exec.FilterTools

FilterTools is re-exported from internal/exec.

View Source
var FinalizeToolDef = coord.FinalizeToolDef

FinalizeToolDef is re-exported from internal/coord.

View Source
var FormatDuration = spec.FormatDuration

FormatDuration is re-exported from internal/spec.

View Source
var ForwardToAgentToolDef = coord.ForwardToAgentToolDef

ForwardToAgentToolDef is re-exported from internal/coord.

View Source
var LintPortability = exec.LintPortability

LintPortability is re-exported from internal/exec.

View Source
var LoadWorkflow = exec.LoadWorkflow

LoadWorkflow is re-exported from internal/exec.

View Source
var MailboxLen = router.MailboxLen

MailboxLen is re-exported from internal/router.

View Source
var MessageIDs = router.MessageIDs

MessageIDs is re-exported from internal/router.

View Source
var NarrateToolDef = coord.NarrateToolDef

NarrateToolDef is re-exported from internal/coord.

View Source
var New = exec.New

New is re-exported from internal/exec.

View Source
var NewAgentHandle = exec.NewAgentHandle

NewAgentHandle is re-exported from internal/exec.

View Source
var NewAgentRunner = exec.NewAgentRunner

NewAgentRunner is re-exported from internal/exec.

View Source
var NewBoundedInMemoryStore = router.NewBoundedInMemoryStore

NewBoundedInMemoryStore is re-exported from internal/router.

View Source
var NewChanWakeTarget = router.NewChanWakeTarget

NewChanWakeTarget is re-exported from internal/router.

View Source
var NewDefaultCoordRunner = exec.NewDefaultCoordRunner

NewDefaultCoordRunner is re-exported from internal/exec.

View Source
var NewDeliveryEngine = router.NewDeliveryEngine

NewDeliveryEngine is re-exported from internal/router.

View Source
var NewFactoryCache = exec.NewFactoryCache

NewFactoryCache is re-exported from internal/exec.

View Source
var NewFileStorage = exec.NewFileStorage

NewFileStorage is re-exported from internal/exec.

View Source
var NewInMemoryMailboxStore = router.NewInMemoryMailboxStore

NewInMemoryMailboxStore is re-exported from internal/router.

View Source
var NewInMemoryTranscriptStore = resume.NewInMemoryTranscriptStore

NewInMemoryTranscriptStore re-exports resume.NewInMemoryTranscriptStore. Stable.

View Source
var NewInMemoryTranscriptStoreWithCaps = resume.NewInMemoryTranscriptStoreWithCaps

NewInMemoryTranscriptStoreWithCaps re-exports resume.NewInMemoryTranscriptStoreWithCaps. Stable.

View Source
var NewInMemoryTranscriptStoreWithOptions = resume.NewInMemoryTranscriptStoreWithOptions

NewInMemoryTranscriptStoreWithOptions re-exports resume.NewInMemoryTranscriptStoreWithOptions. Stable.

View Source
var NewMemoryStorage = exec.NewMemoryStorage

NewMemoryStorage is re-exported from internal/exec.

View Source
var NewMessageRouter = router.NewRouter

NewMessageRouter is re-exported from internal/router.

View Source
var NewSharedMemory = exec.NewSharedMemory

NewSharedMemory is re-exported from internal/exec.

View Source
var NewSharedMemoryTools = exec.NewSharedMemoryTools

NewSharedMemoryTools is re-exported from internal/exec.

View Source
var NewSubmitResultHandler = exec.NewSubmitResultHandler

NewSubmitResultHandler is re-exported from internal/exec.

View Source
var NewWakeRegistry = router.NewWakeRegistry

NewWakeRegistry is re-exported from internal/router.

View Source
var ParseCoordinatorResponse = exec.ParseCoordinatorResponse

ParseCoordinatorResponse is re-exported from internal/exec.

View Source
var ParseDurationStrict = spec.ParseDurationStrict

ParseDurationStrict is re-exported from internal/spec.

View Source
var ParseWorkflow = exec.ParseWorkflow

ParseWorkflow is re-exported from internal/exec.

View Source
var ParseWorkflowJSON = exec.ParseWorkflowJSON

ParseWorkflowJSON is re-exported from internal/exec.

View Source
var RunCoordinatorLoop = exec.RunCoordinatorLoop

RunCoordinatorLoop is re-exported from internal/exec.

View Source
var SandboxDefaultAllow = exec.SandboxDefaultAllow

SandboxDefaultAllow is re-exported from internal/exec - the canonical safe-tool allow-list applied by --sandbox (read, write, grep, glob). bash is intentionally absent. Returns a fresh slice on each call so callers cannot mutate the canonical list.

View Source
var SanitizeUnicode = exec.SanitizeUnicode

SanitizeUnicode is re-exported from internal/exec.

View Source
var SanitizeWorkflowUnicode = exec.SanitizeWorkflowUnicode

SanitizeWorkflowUnicode is re-exported from internal/exec.

View Source
var SendMessageToolDef = coord.SendMessageToolDef

SendMessageToolDef is re-exported from internal/coord.

View Source
var SetRunAgentAsyncRunnerForTest = exec.SetRunAgentAsyncRunnerForTest

SetRunAgentAsyncRunnerForTest is re-exported from internal/exec.

View Source
var SubmitResultToolDef = exec.SubmitResultToolDef

SubmitResultToolDef is re-exported from internal/exec.

View Source
var SynthesizeOnly = exec.SynthesizeOnly

SynthesizeOnly is re-exported from internal/exec.

View Source
var TopoSort = exec.TopoSort

TopoSort is re-exported from internal/exec.

View Source
var ValidateToolNames = exec.ValidateToolNames

ValidateToolNames is re-exported from internal/exec.

View Source
var ValidateWorkflow = exec.ValidateWorkflow

ValidateWorkflow is re-exported from internal/exec.

View Source
var WaitForCoordWake = exec.WaitForCoordWake

WaitForCoordWake is re-exported from internal/exec.

View Source
var WithCleanupTimeout = exec.WithCleanupTimeout

WithCleanupTimeout is re-exported from internal/exec.

View Source
var WithCoordContextProvider = exec.WithCoordContextProvider

WithCoordContextProvider is re-exported from internal/exec.

View Source
var WithCoordMaxWakeCycles = exec.WithCoordMaxWakeCycles

WithCoordMaxWakeCycles is re-exported from internal/exec.

View Source
var WithCoordSystemPrompt = exec.WithCoordSystemPrompt

WithCoordSystemPrompt is re-exported from internal/exec.

View Source
var WithCoordSystemPromptSuffix = exec.WithCoordSystemPromptSuffix

WithCoordSystemPromptSuffix is re-exported from internal/exec.

View Source
var WithCoordTools = exec.WithCoordTools

WithCoordTools is re-exported from internal/exec.

View Source
var WithEngineClock = router.WithEngineClock

WithEngineClock is re-exported from internal/router.

View Source
var WithEngineTickInterval = router.WithEngineTickInterval

WithEngineTickInterval is re-exported from internal/router.

View Source
var WithStepLocker = router.WithStepLocker

WithStepLocker is re-exported from internal/router.

View Source
var WithTranscriptCaps = resume.WithTranscriptCaps

WithTranscriptCaps re-exports resume.WithTranscriptCaps. Stable.

Functions

func DefaultStorageDir

func DefaultStorageDir() string

DefaultStorageDir returns the default directory for FileStorage: $HOME/.zenflow/runs. When os.UserHomeDir fails (no HOME, etc.) it falls back to <os.TempDir>/zenflow/runs so the path is always usable. CLI consumers and embedders that want the standard zenflow storage location should call this and pass the result to NewFileStorage:

storage := zenflow.NewFileStorage(zenflow.DefaultStorageDir)
orch := zenflow.New(zenflow.WithStorage(storage))

Stable.

Types

type AgentConfig

type AgentConfig = spec.AgentConfig

AgentConfig is re-exported from internal/spec.

type AgentError

type AgentError = exec.AgentError

AgentError is re-exported from internal/exec.

type AgentHandle

type AgentHandle = exec.AgentHandle

AgentHandle + lifecycle re-exports from internal/exec.

type AgentResult

type AgentResult = exec.AgentResult

AgentResult is re-exported from internal/exec.

type AgentRunner

type AgentRunner = exec.AgentRunner

AgentRunner is re-exported from internal/exec.

type AgentRunnerOption

type AgentRunnerOption = exec.RunnerOption

AgentRunnerOption is re-exported from internal/exec. The canonical internal name is exec.RunnerOption (C14 stutter rename). The public facade keeps the AgentRunnerOption name so external SDK consumers don't see a breaking rename. exec keeps AgentRunnerOption as an alias of RunnerOption, so either form resolves to the same underlying type here.

type AgentStatus

type AgentStatus = exec.AgentStatus

AgentStatus is re-exported from internal/exec.

type ApprovalHandler

type ApprovalHandler = spec.ApprovalHandler

ApprovalHandler is re-exported from internal/spec.

type BoundedInMemoryStore

type BoundedInMemoryStore = router.BoundedInMemoryStore

BoundedInMemoryStore is re-exported from internal/router.

type ChanWakeTarget

type ChanWakeTarget = router.ChanWakeTarget

ChanWakeTarget is re-exported from internal/router.

type ClosedAware

type ClosedAware = router.ClosedAware

ClosedAware is re-exported from internal/router.

type CoordLoopOption

type CoordLoopOption = exec.CoordLoopOption

CoordLoopOption is re-exported from internal/exec.

type CoordOption

type CoordOption = exec.CoordOption

CoordOption is re-exported from internal/exec.

type CoordinatorValidationError

type CoordinatorValidationError = exec.CoordinatorValidationError

CoordinatorValidationError is re-exported from internal/exec.

type CycleError

type CycleError = exec.CycleError

CycleError is re-exported from internal/exec.

type DeliveryEngine

type DeliveryEngine = router.DeliveryEngine

DeliveryEngine is re-exported from internal/router.

type DropError

type DropError = router.DropError

DropError is re-exported from internal/router.

type DropEvent

type DropEvent = router.DropEvent

DropEvent is re-exported from internal/router.

type DropReason

type DropReason = router.DropReason

DropReason is re-exported from internal/router.

type DuplicateStepError

type DuplicateStepError = exec.DuplicateStepError

DuplicateStepError is re-exported from internal/exec.

type Duration

type Duration = spec.Duration

Duration is re-exported from internal/spec.

type EngineActiveStepsSource

type EngineActiveStepsSource = router.EngineActiveStepsSource

EngineActiveStepsSource is re-exported from internal/router.

type EngineClock

type EngineClock = router.EngineClock

EngineClock is re-exported from internal/router.

type EngineOption

type EngineOption = router.EngineOption

EngineOption is re-exported from internal/router.

type EngineStepLocker

type EngineStepLocker = router.EngineStepLocker

EngineStepLocker is re-exported from internal/router. Renamed from the previously unexported `engineStepLocker` in zenflow root when the messaging substrate was extracted to internal/router (so out-of-package callers can satisfy it).

type EngineWakeRegistry

type EngineWakeRegistry = router.EngineWakeRegistry

EngineWakeRegistry is re-exported from internal/router.

type EngineWakeTarget

type EngineWakeTarget = router.EngineWakeTarget

EngineWakeTarget is re-exported from internal/router.

type EvalContext

type EvalContext = exec.EvalContext

EvalContext is re-exported from internal/exec.

type EvalStepContext

type EvalStepContext = exec.EvalStepContext

EvalStepContext is re-exported from internal/exec.

type Event

type Event = types.Event

Event is re-exported from internal/types.

type EventType

type EventType = types.EventType

EventType is re-exported from internal/types.

type Executor

type Executor = exec.Executor

Executor is re-exported from internal/exec.

type FactoryCache

type FactoryCache = exec.FactoryCache

FactoryCache is re-exported from internal/exec.

type FileStorage

type FileStorage = exec.FileStorage

FileStorage is re-exported from internal/exec.

type ForEachContext

type ForEachContext = exec.ForEachContext

ForEachContext is re-exported from internal/exec.

type HostSpecificEnvError

type HostSpecificEnvError = exec.HostSpecificEnvError

HostSpecificEnvError is re-exported from internal/exec.

type InMemoryMailboxStore

type InMemoryMailboxStore = router.InMemoryMailboxStore

InMemoryMailboxStore is re-exported from internal/router.

type InMemoryTranscriptStore

type InMemoryTranscriptStore = resume.InMemoryTranscriptStore

InMemoryTranscriptStore re-exports resume.InMemoryTranscriptStore. Stable.

type InMemoryTranscriptStoreOption

type InMemoryTranscriptStoreOption = resume.InMemoryTranscriptStoreOption

InMemoryTranscriptStoreOption re-exports resume.InMemoryTranscriptStoreOption. Stable.

type IncludeConflictError

type IncludeConflictError = exec.IncludeConflictError

IncludeConflictError is re-exported from internal/exec.

type JSONParseError

type JSONParseError = exec.JSONParseError

JSONParseError is re-exported from internal/exec.

type LenAware

type LenAware = router.LenAware

LenAware is re-exported from internal/router.

type Loop

type Loop = spec.Loop

Loop is re-exported from internal/spec.

type LoopValidationError

type LoopValidationError = exec.LoopValidationError

LoopValidationError is re-exported from internal/exec.

type MCPConfig added in v0.2.0

type MCPConfig = exec.MCPConfig

MCPConfig is the parsed settings.json document.

type MCPOption added in v0.2.0

type MCPOption = exec.MCPOption

MCPOption configures ConnectMCPConfig.

type MCPServerConfig added in v0.2.0

type MCPServerConfig = exec.MCPServerConfig

MCPServerConfig describes one MCP server (stdio or remote).

type MCPToolset added in v0.2.0

type MCPToolset = exec.MCPToolset

MCPToolset owns live MCP clients and exposes their tools.

type MailboxStore

type MailboxStore = router.MailboxStore

MailboxStore is re-exported from internal/router.

type MapWakeRegistry

type MapWakeRegistry = router.MapWakeRegistry

MapWakeRegistry is re-exported from internal/router.

type MemoryStorage

type MemoryStorage = exec.MemoryStorage

MemoryStorage is re-exported from internal/exec.

type MessageKind

type MessageKind = types.MessageKind

MessageKind is re-exported from internal/types.

type MessageRouter

type MessageRouter = router.Router

MessageRouter is re-exported from internal/router.

type MetadataSetter

type MetadataSetter = resume.MetadataSetter

MetadataSetter re-exports resume.MetadataSetter. Stable.

type MissingAgentError

type MissingAgentError = exec.MissingAgentError

MissingAgentError is re-exported from internal/exec.

type MissingDepError

type MissingDepError = exec.MissingDepError

MissingDepError is re-exported from internal/exec.

type MissingNameError

type MissingNameError = exec.MissingNameError

MissingNameError is re-exported from internal/exec.

type ModelResolver

type ModelResolver = spec.ModelResolver

ModelResolver is re-exported from internal/spec (the canonical definition); internal/exec.ModelResolver is itself a type alias to spec.ModelResolver, so callers can mix the two interchangeably.

type NoStepsError

type NoStepsError = exec.NoStepsError

NoStepsError is re-exported from internal/exec.

type NopIsolation

type NopIsolation = exec.NopIsolation

NopIsolation is re-exported from internal/exec.

type Option

type Option = exec.Option

Option is re-exported from internal/exec.

type Orchestrator

type Orchestrator = exec.Orchestrator

Orchestrator is re-exported from internal/exec.

type Output

type Output = types.Output

Output is re-exported from internal/types.

type OutputTransformer

type OutputTransformer = spec.OutputTransformer

OutputTransformer is re-exported from internal/spec.

type PermissionHandler

type PermissionHandler = types.PermissionHandler

PermissionHandler is re-exported from internal/types.

type PermissionPolicy

type PermissionPolicy = exec.PermissionPolicy

PermissionPolicy is re-exported from internal/exec.

type PermissionRequest

type PermissionRequest = types.PermissionRequest

PermissionRequest is re-exported from internal/types.

type PortabilityWarning

type PortabilityWarning = exec.PortabilityWarning

PortabilityWarning is re-exported from internal/exec.

type ProgressSink

type ProgressSink = types.ProgressSink

ProgressSink is re-exported from internal/types.

type RealClock

type RealClock = router.RealClock

RealClock is re-exported from internal/router.

type ResumeHandle

type ResumeHandle = router.ResumeHandle

ResumeHandle is re-exported from internal/router.

type Resumer

type Resumer = router.Resumer

Resumer is re-exported from internal/router.

type RouterMessage

type RouterMessage = router.Message

RouterMessage is re-exported from internal/router.

type RouterMessageType

type RouterMessageType = router.MessageType

RouterMessageType is re-exported from internal/router.

type Run

type Run = spec.Run

Run is re-exported from internal/spec.

type RunFlowOption

type RunFlowOption = exec.RunFlowOption

RunFlowOption is re-exported from internal/exec.

type RunGoalOption

type RunGoalOption = exec.RunGoalOption

RunGoalOption is re-exported from internal/exec.

type RunStore

type RunStore = spec.RunStore

RunStore is re-exported from internal/spec. Narrow role: persist/load workflow Run records only.

type SharedMemory

type SharedMemory = exec.SharedMemory

SharedMemory is re-exported from internal/exec.

type SharedMemoryStore

type SharedMemoryStore = spec.SharedMemoryStore

SharedMemoryStore is re-exported from internal/spec. Narrow role: persist/load the per-run shared key/value memory only.

type Step

type Step = spec.Step

Step is re-exported from internal/spec.

type StepIsolation

type StepIsolation = spec.StepIsolation

StepIsolation is re-exported from internal/spec.

type StepResult

type StepResult = spec.StepResult

StepResult is re-exported from internal/spec.

type StepResultStore

type StepResultStore = spec.StepResultStore

StepResultStore is re-exported from internal/spec. Narrow role: persist/load per-step results only.

type StepStatus

type StepStatus = spec.StepStatus

StepStatus is re-exported from internal/spec.

type StepTranscript

type StepTranscript = resume.StepTranscript

StepTranscript re-exports resume.StepTranscript. Stable.

type Storage

type Storage = spec.Storage

Storage is re-exported from internal/spec.

type SubmitResultHandler

type SubmitResultHandler = exec.SubmitResultHandler

SubmitResultHandler is re-exported from internal/exec.

type TokenBudgetTransformer

type TokenBudgetTransformer = exec.TokenBudgetTransformer

TokenBudgetTransformer is re-exported from internal/exec.

type ToolNotFoundError

type ToolNotFoundError = exec.ToolNotFoundError

ToolNotFoundError is re-exported from internal/exec.

type Tracer

type Tracer = spec.Tracer

Tracer is re-exported from internal/spec.

type TranscriptStore

type TranscriptStore = resume.TranscriptStore

TranscriptStore re-exports resume.TranscriptStore so existing consumers can keep importing it from the zenflow root package. Stable.

type TranscriptTruncatedLoader

type TranscriptTruncatedLoader = resume.TranscriptTruncatedLoader

TranscriptTruncatedLoader re-exports resume.TranscriptTruncatedLoader. Stable.

type UnicodeUnsafeError

type UnicodeUnsafeError = exec.UnicodeUnsafeError

UnicodeUnsafeError is re-exported from internal/exec.

type ValidationError

type ValidationError = exec.ValidationError

ValidationError is re-exported from internal/exec.

type Workflow

type Workflow = spec.Workflow

Workflow is re-exported from internal/spec.

type WorkflowOptions

type WorkflowOptions = spec.WorkflowOptions

WorkflowOptions is re-exported from internal/spec.

type WorkflowResult

type WorkflowResult = spec.WorkflowResult

WorkflowResult is re-exported from internal/spec.

type WorkflowStatus

type WorkflowStatus = spec.WorkflowStatus

WorkflowStatus is re-exported from internal/spec.

Directories

Path Synopsis
cmd
zenflow command
Command zenflow runs multi-agent workflows from YAML definitions.
Command zenflow runs multi-agent workflows from YAML definitions.
zenflow/dag
Package dag renders a Unicode box-drawing diagram of a zenflow workflow DAG.
Package dag renders a Unicode box-drawing diagram of a zenflow workflow DAG.
zenflow/tool
Cross-platform helpers for (Windows support).
Cross-platform helpers for (Windows support).
internal
coord
Package coord houses the workflow coordinator surface: the small behavioural contract a coord-side AgentRunner must implement (RunnerHandle), the four goai.Tool factories the coord LLM uses to drive a workflow (forward_to_agent / send_message / narrate / finalize), and the factory + default system prompt that wire those tools onto a pre-configured *AgentRunner.
Package coord houses the workflow coordinator surface: the small behavioural contract a coord-side AgentRunner must implement (RunnerHandle), the four goai.Tool factories the coord LLM uses to drive a workflow (forward_to_agent / send_message / narrate / finalize), and the factory + default system prompt that wire those tools onto a pre-configured *AgentRunner.
exec
Package exec is the zenflow execution core.
Package exec is the zenflow execution core.
resume
Package resume holds the persistence contract and default implementation for resumable step transcripts.
Package resume holds the persistence contract and default implementation for resumable step transcripts.
spec
Package spec holds the workflow specification types - the schema-shaped data the YAML parser, validator, and executor share.
Package spec holds the workflow specification types - the schema-shaped data the YAML parser, validator, and executor share.
types
Package types holds the small, dependency-free contract surface of zenflow that can be shared across all internal packages without triggering an import cycle.
Package types holds the small, dependency-free contract surface of zenflow that can be shared across all internal packages without triggering an import cycle.
observability
otel module

Jump to

Keyboard shortcuts

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