Get started¶
Agentic workflows help you build secure, end-to-end AI pipelines using modular agents, visual components, and structured inputs. This tutorial walks you through building your first agentic workflow in Opaque, configuring how it behaves, and calling it from an external system with a Python script.
Before you begin¶
You’ll need access to an agentic AI workspace and a local environment with Python 3.10+ and the Opaque Python SDK installed. If you haven’t set that up yet, start with the local setup guide.
You’ll also need the REST URL of your Opaque deployment to trigger the SDK. This is the API domain configured during deployment through Azure Marketplace. If you’re not sure where to find it, ask your workspace admin.
Step 1. Build your first workflow¶
Start by navigating to the workspace where your workflow will live.
-
Go to Workspaces, select an agentic AI workspace from the list, and open the Workflows tab. This tab lists all workflows created in the selected workspace. If none exist yet, the page will be blank.
Go to Workspaces > Workflows to create agentic workflows.
-
Click Create workflow.
- Enter a name (max 50 characters) and optional description (max 150 characters), then click Create workflow again.
When the workflow builder opens, you’ll see a new canvas with a Start and End node already placed. The Start node defines where inputs enter the workflow (typically via API), and the End node collects the response that gets returned to the caller.
A new workflow canvas with start and end nodes.
On the left, you’ll see the Components panel—this is where you’ll find the agents used to build your workflow. Expand the Agents section to get started.
-
Add agents to the canvas.
Drag agents onto the canvas to define the steps of your workflow. Your options include:
- Azure AI Retriever: Search enterprise content using Azure Search
- OpenAI Service: Call GPT-4 or GPT-3.5 via OpenAI
- vLLM Service: Run private models with high-throughput inference via vLLM
(More agents will be added soon.)
Tip
Combine a Retriever (like Azure AI) and a Model (like OpenAI or vLLM) for a basic RAG workflow.
-
Configure agents and guardrails.
Click an agent to reveal its toolbar. Click the
icon to configure the agent’s behavior—such as which model it uses, how it responds, and what task it performs. Use the icon to add guardrails that enforce safety, context, or compliance rules.
These settings ensure each step in your workflow performs the right task, with the right constraints, every time it runs.
Note
For a deeper look at each agent type and configuration options, see Working with agents.
Use the toolbar to configure agents.
-
After entering the required fields, click Save changes.
-
Connect your workflow nodes.
Now it’s time to connect your workflow’s logic: which agent should run first? What comes next?
To define the flow of data through your workflow:
- Click the output port (small circle on the right) of the
Start
node and drag a line to the input port (circle on the left) of the first agent. - Repeat this process to connect each agent node in the desired sequence.
- Finally, connect the last agent’s output port to the input port of the
End
node.
This flow defines the execution order—data moves through each connected step when the workflow runs.
Connect your workflow nodes.
- Click the output port (small circle on the right) of the
Step 2. Prepare for review¶
The steps in this section apply to members in a multiparty workspace. If you're in a single-party workspace, you can skip this section.
In multiparty workspaces, workflows must be reviewed and approved according to the approval policy defined in the workspace settings before they can be launched.
Submit your workflow for review
Click Request approval in the top right corner of the canvas. This submits the workflow for review.
Note
If you don’t see this option, check that all required nodes are configured and connected.
- The status of your workflow changes from Draft to Under Review. You’ll see this reflected next to the workflow name, in a status pill at the top of the page. It also appears on the Workflows list view under the name and description.
- Workspace members can begin reviewing and and approving the workflow.
- Use the Review Status link to track who has approved or rejected.
Known limitation
When you mark a workflow as ready for review, others can see its status—but they won’t be notified automatically. You may want to let reviewers know directly.
Revise and resubmit (if rejected)
If a reviewer rejects the workflow:
- Click Review Status icon, locate the Declined row, and read the reviewer’s comment.
- Select Return to draft from the Actions button menu..
- Make your changes, then click Request approval again.
Review a workflow
To review an agentic workflow:
- Go to the Workflows tab in your workspace and click the workflow name to open it.
- Review the full workflow on the canvas. Open each agent’s configuration panel (
) and guardrails () to make sure everything looks reasonable.
- When you're ready, click Accept workflow or Reject workflow in the reviewer toolbar.
- In the dialog box, you can optionally add a comment before confirming your selection.
Note
While comments are optional when rejecting a workflow, we recommend adding one. This helps the workflow creator understand why it wasn’t approved and what needs to be fixed.
Step 3. Launch your workflow¶
Once approved, click Launch workflow to make it active and ready to receive requests.
You can stop or restart the workflow using the same button. However, once approved, you won’t be able to modify the workflow.
Step 4. Trigger your workflow via the SDK¶
Once your workflow is ready, you can trigger it using the Opaque Python SDK.
This lets you connect your workflow to external systems or applications — for example:
- A web app that submits user queries
- An internal service that triggers workflows on a schedule
- A notebook that submits structured inputs to a deployed agentic workflow
Collect the required values¶
You’ll need to collect the following information before you can trigger the SDK:
- Your API key: Click API keys in the left-hand nav.
- Your workflow service UUID and domain: Click the icon above your canvas to open the Trigger the SDK drawer.
- The REST URL of your Opaque deployment: This is the API domain used when deploying Opaque via Azure Marketplace. Ask your workspace admin if you don't have it.
Trigger the SDK¶
Submit a request using the SDK via a Python script.
The following script:
- Sets the necessary environment variables
- Initializes a connection to your workflow
- Submits a request (in this case, a simple prompt)
Each part is annotated for clarity.
# Import the standard libraries used
import os
import uuid
from opaque.workflow import WorkflowService
# Set the environment variables used by the SDK
os.environ["OPAQUE_DATAPLANE_DOMAIN"]="<your_workflow_service_domain>"
os.environ["OPAQUE_REST_URL"]="<opaque_domain_url>"
os.environ["OPAQUE_API_KEY"] = "<your_api_key_here>"
# Define the UUID of the workflow you want to call
WORKFLOW_SERVICE_UUID = "<your_UUID>"
# Create a workflow client using that UUID
workflow_service = WorkflowService(workflow_uuid=uuid.UUID(WORKFLOW_SERVICE_UUID))
# Define the input payload — this must match the expected input schema
# for the nodes connected to the start node in your workflow.
rag_request = {"prompt": "Is the claim eligible for reimbursement?"}
# Submit the request and capture the response
workflow_response = workflow_service.submit(rag_request)
# Print the result to the terminal
print(workflow_response)
When you submit a request, Opaque runs your input through the full agentic workflow—from Start to End—and returns a structured response based on the final connected node(s). In most cases, that means getting a model-generated output or decision.
For example, if the last node before the end node is a language model, your response might look like:
This response is returned as a dictionary and printed to your terminal when using the example script.
You can reuse this same pattern to trigger any approved workflow you've built. Just update the UUID and adjust your input payload to match the schema expected by the Start node and its connected agents.
That’s it—you’ve built and deployed your first agentic workflow. You can now invoke it as a secure, callable service from any AI-driven system or automation.