Skip to main content

Building Your First Workflow

This tutorial walks you through building a complete workflow from scratch — a web research pipeline that takes a topic, searches the web, and produces a structured research brief.

What you'll build:

Prerequisites:

  • A TARX account with a project
  • At least one LLM API key added in Settings → Keys & Secrets
  • Two agents created: researcher (with web_search capability) and writer

If you haven't created agents yet, create them now — see Creating Agents.


Step 1: Create a New Workflow

  1. Click Workflows in the left sidebar.
  2. Click New Workflow (top right).
  3. A dialog appears: enter Name = "Research Pipeline".
  4. Click Create.

You land on the visual canvas editor with a blank canvas.


Step 2: Configure the Trigger Node

Every workflow starts with a Trigger node. The canvas already has one — click it to open the inspector panel on the right.

Inspector settings:

  • Trigger Type: Manual
  • Default Input: "artificial intelligence in healthcare" (this is the test value when you run manually)
  • Input Label: "Research Topic" (shown in the run modal)

The trigger node now shows the label "Manual Trigger" on the canvas with your default input displayed.


Step 3: Add the Researcher Agent Node

  1. In the Node Palette (left sidebar), find Agent node.
  2. Drag it onto the canvas and drop it to the right of the Trigger node.
  3. Click the Agent node to open its inspector.

Inspector settings:

  • Node Label: "Step 1: Research" (display name on canvas)
  • Agent: Select your researcher agent from the dropdown
  • Input: Type: {{trigger.output}}

This tells the researcher agent to take whatever the trigger received as its input.

Connect Trigger → Researcher

  1. Hover over the Trigger node — a small circle appears on its right edge (output handle).
  2. Click and drag from that circle.
  3. Drop the connection onto the Researcher Agent node's left edge (input handle).
  4. A green connecting line appears between the two nodes.

Step 4: Add the Writer Agent Node

  1. Drag another Agent node from the palette.
  2. Drop it to the right of the Researcher node.
  3. Click it to open inspector.

Inspector settings:

  • Node Label: "Step 2: Write Brief"
  • Agent: Select your writer agent
  • Input: Type this multi-line instruction:
Please format the following research notes into a professional research brief.

Research notes:
{{researcher.output}}

Format as:
## Research Brief: [Topic]

### Executive Summary
[2-3 sentences]

### Key Findings
[Bullet points]

### Implications
[2-3 sentences on why this matters]

### Recommended Next Steps
[Numbered list of 3 actions]

Notice how {{researcher.output}} injects the researcher agent's output into the writer agent's input.

Connect Researcher → Writer

  1. Hover over the Researcher Agent node — drag from its right handle.
  2. Drop onto the Writer Agent node's left handle.
  3. Connection line appears.

Step 5: Add an Output Node

  1. Drag an Output node from the palette.
  2. Drop it to the right of the Writer node.
  3. Click to open inspector.

Inspector settings:

  • Label: "Research Brief"
  • Value: {{writer.output}}

This captures the writer's formatted brief as the workflow's final output.

Connect Writer → Output

  1. Drag from the Writer Agent node's right handle.
  2. Drop onto the Output node's left handle.

Step 6: Review the Canvas

Your canvas should now show:

[Manual Trigger] ──→ [Step 1: Research] ──→ [Step 2: Write Brief] ──→ [Output]

Verify connections by checking that each node has a connecting edge. Nodes without connections to the trigger won't run.


Step 7: Save the Workflow

Click Save in the top toolbar (or Cmd+S / Ctrl+S).

A success toast: "Workflow saved" appears. The URL updates to /workflows/{workflow_id}/edit.


Step 8: Run the Workflow

  1. Click the Run ▶ button in the top toolbar.
  2. A Run Modal appears with:
    • Input: Shows your default value ("artificial intelligence in healthcare")
    • Change it to any topic you want to research
  3. Click Execute.

Watch the Live Execution

The modal closes and you see the canvas come alive:

  • Trigger node flashes blue → turns green (immediate)
  • Researcher node starts pulsing orange — the researcher agent is calling the LLM and using web_search to find information
  • After 5-15 seconds, researcher turns green
  • Writer node starts pulsing orange — formatting the research
  • Writer turns green
  • Output node turns green
  • A result banner appears at the bottom of the canvas

The "Live" indicator in the topbar shows you're watching a live execution stream.


Step 9: View the Results

In the Result Banner

After the workflow completes, a banner at the bottom of the canvas shows the Output node's value — your formatted research brief.

In Execution Details

  1. Click Executions in the left sidebar.

  2. Click the most recent execution (top of the list).

  3. You see a detail view with:

    • Overall status (✅ Completed)
    • Duration (total time)
    • List of nodes with their status, input, and output
  4. Click on "Step 1: Research" to expand:

    • Input: the topic string
    • Output: the raw research notes from the researcher agent
    • Duration: how long the LLM call took (+ web search)
    • Tool calls: each web_search call made
  5. Click on "Step 2: Write Brief" to expand:

    • Input: the formatted prompt with research notes injected
    • Output: the final formatted brief
    • Duration: the writer's LLM call time

Common Issues

"Agent not found" error

The agent referenced in the node was deleted or renamed. Open the node inspector and re-select the agent from the dropdown.

Output shows {{researcher.output}} literally

The expression wasn't resolved — usually because:

  1. The upstream node (researcher) failed before completing
  2. The expression variable name doesn't match the agent's name (case-sensitive)

Check: Does the researcher agent's name in the Agents page exactly match researcher? Expressions are case-sensitive.

Researcher produces no results

The agent might not be calling web_search. Check:

  1. Does the researcher agent have web_search capability enabled?
  2. Is the agent's system prompt instructing it to search?
  3. Check execution details → researcher node → tool calls

Workflow is slow

Web search + two LLM calls takes time. Expected durations:

  • Trigger: < 1 second
  • Researcher (with web_search): 5-20 seconds
  • Writer: 3-10 seconds
  • Total: 10-30 seconds

This is normal. For faster workflows, pick a faster/smaller model from your key's model list (for example a "mini" or "haiku" tier model instead of a flagship one).


Enhancing the Workflow

Once the basic workflow is working, try these enhancements:

Add a Branch for Long vs. Short Responses

After the Researcher, add a Branch node:

  • True path (long research): Feed to the Writer
  • False path (short research): Feed directly to Output without reformatting

Condition: len(str(output)) > 500

Add a Loop for Multiple Topics

Before the Researcher, add a Loop node that iterates over a list of topics. Each iteration runs the full research pipeline. See Loops.

Add Human-in-Loop for Review

Before the Output, add a Human-in-Loop node. The workflow pauses and sends you a notification. You review the brief and either approve (publishes it) or reject (re-runs the writer with feedback). See Human-in-Loop.

Add HTTP Output

Instead of a plain Output node, add an http_request node to POST the research brief to your Slack channel, Notion database, or CMS API. (HTTP calls are a workflow node, not an agent capability.)