Workflows

A Workflow is a durable orchestration of Agent Nodes toward a shared goal. Each Agent Node gets a new Pontia Session, reads declared Handoff inputs, writes one Handoff output, and explicitly submits when its assigned work is ready.

Use a Workflow for a repeatable process whose stages, inputs, outputs, and completion points are known in advance. Use a Bot for an open-ended goal where the agent decides how to delegate and adapts the plan through conversation. Both can reuse Agent Profiles: a Workflow assigns them to Nodes, while a Bot selects them for specialist helpers.

Create a definition

Workflow definitions use TOML. Paths are resolved relative to the definition file:

title = "Implement search"
cwd = "."

[[handoffs]]
name = "requirements.md"
source = "./requirements.md"

[[nodes]]
type = "agent"
phase = "Discovery"
title = "Research"
instructions = "Inspect the current search implementation and propose a plan."
execution_profile_id = "researcher"
inputs = ["requirements.md"]
output = "research.md"

[[nodes]]
type = "agent"
phase = "Delivery"
title = "Implement"
instructions = "Implement and verify the accepted plan."
inputs = ["research.md"]
output = "result.md"

Set cwd to an existing directory that you have activated as a Workspace. Every Agent Client in the Workflow launches there.

Use type = "agent" for each Node. Nodes execute in definition order. Each input names an initial Handoff or an earlier Node output. Give every output a unique file name without directory components.

Set execution_profile_id to an existing Agent Profile ID when a Node should use that Profile’s Client, model, reasoning effort, permissions mode, and system prompt. The Node instructions and Handoff inputs are added for that specific task. A Profile update applies to Nodes that start afterward.

Run and inspect

Start the Workflow from a Pontia Session while pontiad is running.

pontia workflow run ./workflow.toml

The command prints the new Workflow ID. Workflows shows phases, Agent Node states, elapsed time, and the Session created for each active Node.

Show compact context from the CLI:

pontia workflow show wf_...

Inside a Workflow-managed Agent Session, PONTIA_WORKFLOW_ID supplies the current target, so pontia workflow show can omit the ID.

Complete an Agent Node

Write the complete result to the output-file path provided by Pontia, then submit it from the Agent Node’s Session:

pontia workflow submit

A successful submission marks the Node’s output ready. If the Turn completes before submission, the Workflow becomes idle and awaits intervention.

Pause, resume, and retry

Use the Workflow detail page to pause a running Workflow or resume a paused one. Pausing requests interruption of a busy current Turn when supported. Resuming an interrupted current Session sends a continuation before scheduling proceeds.

When a failed Workflow is recoverable, pontia workflow retry ID FAILURE_EVENT_ID continues the same Agent Node conversation. Earlier submitted Nodes remain complete, existing Workspace changes remain in place, and unsubmitted output is archived. The recovering Node reviews the existing changes and submits a fresh complete output.

Report a blocking problem

Write the reason to the termination.md path in the Node instructions and run pontia workflow terminate. Stop work after the command succeeds. Pontia sends the reason to the initiating Session. The command leaves the Workflow state unchanged.

The initiating Session also receives a report when the Workflow fails, becomes idle, or completes. Reports include the Workflow ID, Handoff directory, and submitted output paths. Use pontia workflow show ID to inspect the Workflow and find the Retry command for a recoverable failure.