Skip to main content

Using Workflows in Your Agent

Once you've built a workflow under Workflows in the main sidebar, you enable it on individual agents from that agent's Workflows tab. This is where you decide which of your reusable workflows a specific agent is actually allowed to use.

Haven't created a workflow yet? See Workflows first.


Opening the Workflows tab

  1. Open the agent you want to configure.
  2. Click the Workflows tab at the top of the agent dialog.

You'll see how many workflows are currently enabled for this agent, and two buttons: Preview Prompt and + Add Workflow.


Adding a workflow

  1. Click + Add Workflow.
  2. Workflows are listed grouped by when they run — Pre-Call, During-Call, and Post-Call — matching the category each workflow was created under.
  3. Use the search box to filter by name or action type if you have a lot of workflows.
  4. Click Add next to the workflow you want this agent to use.

The workflow now appears in the agent's Enabled Workflows list, grouped under the same Pre-Call / During-Call / Post-Call sections.


Removing a workflow

Find the workflow in the Enabled Workflows list and click Remove. This only disables it for this agent — the workflow itself, and its use on other agents, is unaffected.


Previewing what the agent will do

Because a workflow can contain technical details (API endpoints, required fields, and so on), HuskyVoice automatically translates each enabled workflow into plain-language instructions the agent follows during a call — when to use it, what information to collect from the caller first, and what to say once it's done.

  • Click Preview next to a single workflow to see the instructions generated for just that one.
  • Click Preview Prompt at the top of the tab to see the combined instructions for every workflow currently enabled on this agent.

Adding the preview to your agent's prompt

If you want the agent's own instructions to explicitly reference a workflow (for example, to add extra guidance around it), open a preview and click Add to Agent Prompt. This appends the generated instructions to the agent's prompt field, and switches you to the Basic tab so you can review or edit them alongside the rest of your instructions.

You don't have to do this for a workflow to work — enabling it is enough. Use Add to Agent Prompt only when you want to see or fine-tune the exact wording the agent is working from.


How workflow actions are called from the prompt

Whether it's added automatically or you're reviewing it in Preview, every generated instruction follows the same fixed convention — this is what actually shows up in the agent's prompt. It starts with one preamble, shared across every workflow:

IMPORTANT: To call any workflow action, you MUST use call_workflow_api(action_name="...", variables_json="..."). Never call it directly by name.
- action_name must exactly match an action defined in the assigned workflow.
- variables_json must be a JSON object containing only the variables that action needs — nothing extra, nothing missing.
- Get each variable's value from call context, from what the caller said, or from a previous action's response — never invent a value.

Followed by one block per action. For example, an action named SaveContact that collects a caller's name and phone number:

Use "SaveContact" when the caller's contact details need to be recorded.
Ask for the caller's name and phone number early in the conversation if not already known from call context.

Once you have everything needed:
- Say a brief filler phrase, e.g. "Let me note that down for you."
- Call:
call_workflow_api(action_name="SaveContact", variables_json={"name": "<caller's name>", "phone_number": "<caller's phone number>"})
- On success, say: "Great, I've got that saved."
- On failure, say: "I'm having trouble saving that right now, but let's continue."

Why it's written this way

  • action_name must match exactly the Action Name you gave the action when creating the workflow — case-sensitive, no typos. This is how the agent tells HuskyVoice which action to run.
  • variables_json only includes what that action actually needs — nothing extra, nothing invented. If a value hasn't come up in the call yet, the agent asks for it first rather than guessing.

If you're writing this by hand

You shouldn't normally need to write this yourself — Preview generates it for every enabled workflow, and Add to Agent Prompt inserts it for you. But if you're adding extra guidance around a workflow, or writing an agent that references an action directly, keep the exact call_workflow_api(action_name="...", variables_json="...") format — that's the only way the agent is able to invoke it correctly.


A few things to keep in mind

  • Workflows are shared. Enabling a workflow on this agent doesn't create a private copy of it — if someone edits the workflow itself (under Workflows in the main sidebar), every agent using it changes too. If you need different behavior for this agent only, duplicate the workflow first and enable the duplicate instead.
  • Category matters. A workflow created under "Pre-call" will always show up in this agent's Pre-Call section, and runs at that point in the call — you can't reassign it to a different stage from the agent side.
  • Save the agent after adding or removing workflows to keep your changes.

Next Steps