AI Workflow Open Spec
A common language for weaving together modular programmatic steps with agentic intelligence.
⚠️ This specification is a work in progress and subject to change.
1. Preface
Scope, terminology, and document structure for AI workflow automation specifications.
AI agents are increasingly capable at sense-making, decision support, and narrative generation, yet production workflows still depend on programmatic nodes to guarantee determinism, compliance, and repeatable side effects. Without a shared specification bridging these worlds, teams either overfit to bespoke agent stacks or sacrifice innovation to keep predictable code paths intact. This document establishes that connective tissue: it shows how deterministic nodes and agentic AI steps can co-exist in the same automation, each playing to its strengths while sharing common guardrails for reliability, governance, and extensibility.
1.1 Scope
This specification defines an implementation-agnostic contract for describing, executing, and governing AI-driven workflow automations. In plain terms, it is a common reference playbook that explains what information a workflow must declare, how automated and human steps interlock, and which safeguards keep runs dependable, regardless of the underlying tooling. It favors declarative intent over imperative scripts, capturing the semantics of modular steps, typed interfaces, and probabilistic AI behaviors in a portable artifact that can be interpreted by heterogeneous runtimes. The intended audience includes platform architects, workflow designers, and implementers who must translate workflow intent into reliable automation across low-code builders, programmable frameworks, or custom orchestration engines.
The scope encompasses the normative core of workflow execution—definition envelopes, step capability catalogs, data and state propagation rules, and safety guarantees—alongside informative annexes offering examples and schema templates. The specification is language-, framework-, and platform-neutral: it codifies patterns such as type-safe contracts, deterministic error propagation, and modular node composition without prescribing a particular technology stack, so adapters can project the same specification into diverse execution environments.
1.2 Terminology and Conventions
- Must / Should / May — We adopt RFC 2119-style keywords so readers know which rules are mandatory, preferred, or optional; “Must” marks requirements that every conforming implementation needs to satisfy.
- Workflow Definition Envelope — Think of this as the outer wrapper for a workflow: it gathers metadata, versioning, capability declarations, and the execution graph that engines ingest before they can run anything.
- Node / Step — Nodes describe reusable execution blueprints, while steps are the instances placed in a specific workflow graph; each carries input/output schemas and handler semantics so engines know how to execute them.
- Data Contract — A data contract spells out the exact shape of information entering or leaving a step, expressed with machine-verifiable schemas such as JSON Schema or Zod, so different runtimes exchange data without ambiguity.
- Result Pattern — We package every step outcome in a discriminated union (e.g.,
Ok/Err) to make success, recoverable errors, and terminal failures propagate predictably throughout the workflow. - Human-in-the-Loop (HITL) — These are the steps where people step in to review, approve, intervene, or override, complete with state transitions and escalation hooks so automated runs pause gracefully.
- Observability Trace — This is the structured telemetry trail—logs, spans, metrics—that lets operators debug, audit, and correlate what happened during execution.
- Capability Catalog — The catalog lists the operation types a runtime knows how to perform (e.g., language-model inference, HTTP requests, datastore mutations), helping workflow authors declare their needs and engines advertise support.
Terms appear in their capitalized form when used normatively. Informative examples or analogies may reference familiar implementation patterns, but they remain non-binding.
1.3 Document Structure
The specification progresses from foundational principles to extensibility considerations:
- Specification Fundamentals — Establishes design goals, core workflow model, and normative language usage.
- Core Workflow Abstractions — Defines the workflow definition envelope, step catalog, data contracts, and orchestration patterns.
- AI Interaction Model — Describes how AI-powered steps declare prompts, manage context, interpret outputs, and mitigate nondeterminism.
- Integration and Connectivity Layer — Details connector metadata, external API interactions, credential handling, and operational constraints such as rate limits.
- Human-in-the-Loop Mechanisms — Formalizes review flows, exception handling, and communication channels for human collaboration.
- Reliability and Safety — Covers observability, policy enforcement, error handling, retries, and validation strategies.
- Lifecycle and Governance — Explains versioning, deployment targets, runtime profiles, monitoring, and compliance expectations.
- Extensibility Framework — Defines extension points, capability negotiation, modular packaging, and deprecation policy.
- Annexes (Informative) — Provides example workflows, schema samples, glossary entries, and references to support adoption across ecosystems.
Each numbered clause is intended to be independently referenceable, enabling diverse automation engines to interpret the same workflow specification while preserving consistent outcomes. Readers can move from core sections to annexes depending on whether they need normative requirements or informative guidance, with normative clauses using RFC keywords and annexes offering illustrative material.
Curious about this specification? Reach out at ai-workflow@crca.fyi