Skip to content

Build a Workflow

A Workflow is one of the two Agent Business Capability types. Choose it when one Single Agent is not enough and you need explicit steps, branching, Tools, or structured intermediate results.

Open the Agent Business in the creator console, select Capability, and choose Workflow. A native Workflow opens the DAG editor. A Dify-backed Workflow opens Provider Configuration because its graph remains owned by Dify.

The native editor provides six v1 node types:

  1. Input exposes invocation inputs after Schema validation.
  2. Agent invokes an immutable Single Agent Capability Release.
  3. Tool invokes one catalog or custom operation.
  4. Condition chooses one true or false branch with a restricted operator.
  5. Transform creates structured data without running arbitrary JavaScript.
  6. Output returns a value that matches the Workflow output Schema.

Use the Canvas to connect and inspect the graph. Add a step from the node palette, from a node output, or directly on an edge. Contextual insertion preserves the selected path; adding from the palette intentionally creates a disconnected draft node.

Disconnected draft nodes show Needs connection while you are composing. That state is non-blocking during visual editing, so choosing a component does not immediately interrupt you with a global error. Save Draft and Preview remain blocking until every executable node is reachable from Input. Validation issues name the affected node or edge and can move focus to it.

Create exactly one Input and at least one Output. Connections that duplicate an edge, use incompatible ports, reuse a Condition branch, or introduce a directed cycle are rejected.

Opening a Tool insertion shows the searchable Tool Catalog. Choose a built-in, connected, or MCP operation. The Inspector provides Schema-generated parameter controls using the Catalog’s Schema and defaults, then creates a materialized v1 execution binding containing only the endpoint, Tool name, optional credential reference and mode, and structured inputs. The Workflow Definition does not store Catalog ID or revision, source input Schema, Catalog defaults, or risk metadata. A later Catalog change does not silently rewrite the materialized binding.

Tools that need credentials use a server-managed Workspace Connection. Create the Connection, test it, rotate its secret when required, and delete it when it is no longer trusted. If a create response is lost, the console uses the original idempotency key to recover the created Connection instead of submitting an ambiguous duplicate. Responses expose only status, credential reference, timestamps, and sanitized capabilities—never the secret, ciphertext, IV, or encryption key.

Use Custom Tool · Advanced only when the endpoint is not in the Catalog. It requires an exact HTTPS endpoint, Tool name, structured input mapping, and an optional server-side credential reference. Never paste API keys, passwords, cookies, Authorization Headers, or tokens into the Workflow Definition.

Open Definition to view the complete current authoritative editor Definition synchronized with the Canvas, including unsaved Canvas changes. You can fold layout, copy the Definition, or download it.

Choose Edit JSON for a safe text-editing session. Visual graph mutations pause while the JSON draft is open, but Canvas navigation and selection remain available. Apply JSON checks syntax, bounded structure, Schemas, references, ports, and DAG semantics before replacing the visual Definition. Invalid JSON keeps its draft and reports paths such as /nodes/2/config; it never partially applies.

If the visual Definition changes outside the JSON session, Apply stays blocked and both versions are preserved. Reload the current Definition or keep and download the JSON draft for reconciliation. Applying a valid JSON draft creates one editor history entry, so one-step Undo restores the previous Definition. Discard JSON leaves the visual Definition unchanged.

Save Draft validates and persists the editable Definition. Saving does not publish it and does not change the active Capability Release. A stale base Revision returns a conflict while the browser keeps the local Definition for copy or deliberate reload.

Preview runs the Definition currently visible in the editor, including unsaved changes. Enter an input JSON Object, resolve all blocking validation, then review and confirm every Tool for that Preview attempt. A changed Tool or Retry requires confirmation again. The result contains a sanitized per-node trace; credentials, authentication headers, and provider response bodies never appear.

After Preview succeeds, create and activate a Capability Release through the Release workspace. The Release freezes the validated Definition, pinned Single Agent Releases, and materialized Tool execution bindings. Production executes that exact active Release, not the latest Draft.

Invoke the published Workflow at:

POST https://api.agentaab.com/api/app/{business-slug}/workflows/run

See the Runtime Client guide for authentication and error handling, then use the Runtime API reference for request and response Schemas.

Workflow v1 executes deterministically in topological order. It excludes cycles, parallel scheduling, nested Workflows, arbitrary JavaScript, general automatic retries, and realtime collaborative editing.

Skill management is not currently available. There is no Skill Library or Skill node; use current Tool operations and Workflow composition instead.

Activate the issue to select the affected graph item. A disconnected draft can remain while composing, but connect or remove it before Save Draft or Preview.

Open the Tool, repair or rotate the Workspace Connection, run its test, and select the refreshed ready Tool. Failed tests expose stable error codes, not provider credentials or raw failure bodies.

Production still runs the previous behavior

Section titled “Production still runs the previous behavior”

Check the active Capability Release. Save Draft and Preview never replace production behavior by themselves.