Skip to content

Studio

Open it: Studio · under Settings in the console menu, or Open in Studio / Edit in Studio on any agent, template, trigger, canvas or resource.

Studio is where you write flows: a series of steps, in CNCF Serverless Workflow YAML. New to either? Read How to read and write YAML and The CNCF Workflow DSL, explained. A flow can run on its own, be started by a trigger, be called by another flow, or run inside an agent’s turn as a hook. Templates, triggers and canvases are edited here too.

Studio: the project explorer, a flow as a graph, the step palette, and the form

AreaWhat it is
ExplorerThe project’s agent templates, agents, resources (flows, databases, models, MCP servers, secrets…), triggers, canvases and runtimes. New in … starts one. Chat beside it talks to the A3T assistant about what is open
EditorThe open item, as a Graph or as Code (YAML). Both edit the same flow
PaletteSteps to add, by kind: Control (switch, for, fork, try), Calls (LLM, MCP, HTTP, ADB, agent), Run (another flow), Events, State, Library
FormThe flow’s name, namespace, version and description, and its steps in order: add, move, remove
SaveSaves the flow as its version. Sync reloads it from the server
RunRuns it; Run with inputs asks for its input first
Runs, VersionsIts recent runs, each opening in Executions; its versions

The example decides what to do about a late refund: escalate one that is 7 or more days late, otherwise ask the customer to wait.

document:
dsl: 1.0.3
namespace: qa-operator-support # the project it belongs to
name: flow_qa_operator_support_refund_decide
version: 1.0.0
title: Decide what to do about a late refund
input:
schema: # what it must be started with
format: json
document:
type: object
required: [order_id, days_late]
properties:
order_id: { type: string }
days_late: { type: integer }
do:
- decide:
switch:
- late:
when: ${ .days_late >= 7 }
then: escalate
- default:
then: wait
- escalate:
set:
order_id: ${ .order_id }
action: escalate
note: ${ "Order " + .order_id + " is " + (.days_late | tostring) + " days late; hand it to a person." }
then: end
- wait:
set:
order_id: ${ .order_id }
action: wait
note: ${ "Order " + .order_id + " is within the normal window; ask the customer to wait." }
then: end

Run with inputs {"order_id": "A-1042", "days_late": 10} gives:

{ "order_id": "A-1042", "action": "escalate", "note": "Order A-1042 is 10 days late; hand it to a person." }

and {"order_id": "A-1042", "days_late": 3} gives "action": "wait".

RuleWhy
Name it flow_<project>_<what it does>So it is found and understood anywhere it is used
Declare its input schemaCallers, and Run with inputs, see what it needs
A released version never changesSaving the same version with other content is refused (version_exists); give it the next version. Runs and agents can stay on the version they use
Every step is checked as it runsA call is a policy decision, as the person the run is for; see Security

A hook is a flow of yours that runs at a fixed point in every turn of an agent, as the caller. Attach hooks on the agent’s Build › Hooks: pick a flow for a phase and click Attach (or New hook flow to start one from a ready-made skeleton), then Save. Several hooks on one phase run in the order listed; ↑ and ↓ reorder them.

Build › Hooks: a before_llm hook attached

PhaseRunsGetsWhat it can return
on_turn_startWhen a message arrivesmessage{ message } replaces it; { refuse: "why" } stops the turn
before_recallBefore it searches its memorymessage, query{ query }: what it searches with
before_llmBefore each model callmessage, iteration, system_prompt{ add_to_prompt } adds to the prompt for this call; { system_prompt } replaces it
after_llmAfter each model calliteration, content, tool_callsObserves only: the text has already streamed
on_tool_callBefore each tool calltool, input{ input } replaces the arguments; { refuse: "why" } blocks it, and the model is told
after_tool_callAfter each tool calltool, input, output{ output }: what the model sees, e.g. redacted
on_tool_errorA tool call failedtool, input, error{ output } is used in place of the error
before_storeBefore the turn is rememberedmessage, reply{ reply }: what is remembered; { skip: true } remembers nothing
on_turn_endThe caller has its answermessage, reply, tool_calls, iterations, outcomeObserves only: log, notify, check

A hook that fails at on_turn_start stops the turn; one that fails at on_tool_call blocks that call.

Example: a refund rule before every model call

Section titled “Example: a refund rule before every model call”
document:
dsl: 1.0.3
namespace: qa-operator-support
name: flow_qa_operator_support_refund_rule
version: 1.0.0
title: Refund rule for the help-desk agent
do:
- add_rule:
set:
add_to_prompt: Refunds not received 7 or more days after approval are escalated to a person; never promise a date.

Attached to the help-desk agent at before_llm, it changes its answers at once. Asked “Order B-2210: my refund was approved 10 days ago and still has not arrived. When will I get it?”, the agent answered:

Since it’s been 10 days since approval — which is past the 7-day threshold — this needs to be escalated to a person on our team who can investigate and resolve it directly. I can’t promise a specific date, but let me hand this over now…