Graph-first execution
Build workflows as nodes and edges with clear control flow and replayable runs.
Petal Flow is an open-source Go workflow runtime for building AI agent systems as explicit, testable graphs. You can run workflows from Go code, the CLI, or an HTTP daemon.
Graph-first execution
Build workflows as nodes and edges with clear control flow and replayable runs.
AI + tools
Combine LLM nodes, tool calls, routing, transforms, human gates, and validation.
Daemon + persistence
Persist workflows, tool registrations, schedules, and run events in SQLite.
Production observability
Stream runtime events and export traces/metrics with OpenTelemetry.
Petal Flow supports two authoring formats:
.yaml, .yml, .json) for high-level authoring.json) for runtime-oriented node/edge definitionsAgent/Task workflows compile to Graph IR before execution.
version: "1.0"schema_version: "1.0.0"kind: agent_workflowid: research_workflowname: Research Assistantschema_version with normalized kindwebhook_trigger, webhook_call) for inbound and outbound webhook automationUse Iris providers inside Petal Flow nodes for LLM calls while Petal Flow handles orchestration.
providers, _ := hydrate.ResolveProviders(nil)factory := hydrate.NewLiveNodeFactory(providers, llmprovider.NewClient)graph, _ := hydrate.HydrateGraph(definition, providers, factory)