Workflows¶
Workflows let you deploy AI-powered behavior as a secure, callable service in OPAQUE. Depending on what you’re building, you can define a workflow as a fixed sequence of steps or as an agent-driven process that chooses actions at runtime.
Types of workflows¶
OPAQUE supports two workflow styles:
- Deterministic workflows run a fixed sequence of steps from start to finish. This is a good fit for predictable pipelines—such as retrieval-augmented generation (RAG)—where you want the same steps to run every time (for example, retrieve → generate).
- Agentic workflows include an agent that decides what to do at runtime. Instead of following one predefined path, the agent evaluates a goal, uses the capabilities you make available, and may take different actions depending on the input—for example, performing a lookup, retrieving context, or coordinating a multi-step task before responding. Agentic workflows are also referred to as non-deterministic workflows.
Note
Only workflows that include an Agent node can exhibit agentic behavior. A workflow that chains retrieval and generation in a fixed path is deterministic, even if it uses powerful models.
How workflows are structured¶
Workflows are defined by connecting nodes—the building blocks that perform individual steps during execution. Instead of writing orchestration code, you assemble workflows visually by arranging and connecting nodes on a canvas.
Each node represents a specific capability, such as calling a language model, retrieving context from a data source, or redacting and restoring sensitive information. By connecting nodes, you define how data flows from input to output and how each step contributes to the final result. This makes workflows easy to understand, review, and reuse.
Once defined, a workflow moves through a review and approval process before it can be launched as a callable service. This lifecycle—draft, review, launch—ensures that workflows meet your organization's policies and governance requirements before they run in production.
How workflows execute¶
Workflows run inside OPAQUE’s confidential execution environment. When a request is sent to a workflow:
- Input enters the workflow through a defined entry point.
- Execution proceeds step by step through the workflow’s nodes.
- Each step runs under the policies and constraints defined for the workflow.
- The final result is returned to the caller.
- Execution details are recorded for audit and review.
This execution model allows workflows to combine AI models, retrieval systems, and utilities while maintaining control over what data is accessed and how results are produced.
When to use workflows¶
Workflows are a good fit when you need:
- Interactive or application-facing AI services
- Retrieval-augmented generation (RAG) over private or governed data
- Reusable AI logic that can be invoked repeatedly
Use deterministic workflows when you want a predictable, repeatable pipeline (for example, a fixed retrieve → generate flow).
Use agentic workflows when you want goal-driven behavior—such as choosing between multiple tools, performing lookups, or coordinating multi-step tasks at runtime.
Tip
If your work is primarily batch-oriented—for example, transforming datasets or running training jobs—you’ll typically use analytics workloads instead.
Getting started¶
If you're new to OPAQUE workflows, we recommend working through the guides in order, starting with Local setup and Get started, which walk you through the full lifecycle from your first workflow to invoking it programmatically. The remaining guides are organized as references you can return to as your workflows grow in complexity.
- Local setup — configure your local environment and install the OPAQUE Python SDK.
- Get started — build, review, and launch your first workflow.
- Working with nodes — understand how nodes work, how to connect them, and how to apply guardrails.
- Configuring nodes — field-level configuration reference for every node type.
- Working with agents — design and configure agentic workflows.
- Using test mode — inspect and validate workflow behavior before launch.
- Using integrations — create or use preconfigured shared model and data connections.
- Invoking workflows — trigger a running workflow programmatically using the OPAQUE Python SDK.