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).
- Non-deterministic (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, perform a lookup, retrieve context, or complete a multi-step task before responding).
Only workflows that include an agent can exhibit agentic behavior. A workflow that chains retrieval and generation in a fixed path is still 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, applying logic or transformations, 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 structure makes workflows easy to understand, review, and reuse.
Once defined, the workflow can be launched and invoked repeatedly as a secure, policy-governed service.
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.
If your work is primarily batch-oriented—for example, transforming datasets or running training jobs—you’ll typically use analytics workloads instead.
Getting started¶
To begin:
- Set up your local environment.
- Learn how to build, review, and launch a basic workflow.
- Explore available node types and learn when and how to use agent nodes.
- Create or use preconfigured shared model and data integrations.