Skip to main content

Building Workflows

A workflow in SmythOS is a visual, modular sequence of components that defines how your agent processes data, integrates with tools, and takes action, like summarizing a support ticket, sending a report, or calling an external API.

Workflows are reusable, composable, and configurable. To make a workflow available to an agent, you connect it using an Agent Skill, which acts as the unified entry point for all trigger types: chat, REST API, schedules, or batch tasks.

Workflows are actions your agent performs

Workflows are visual programs made up of components. Each one accepts input, applies logic, and returns results to guide your agent to take meaningful action.

Each workflow is composed of components, each designed to do one thing well. These might include:

  • Fetching data from APIs or web pages using API Call and scraping tools
  • Applying logic through branching, loops, or conditional flow
  • Running AI tasks with LLMs, classifiers, and file processors
  • Transforming data and passing it between steps using flexible inputs and outputs
  • Storing context or results using memory components or the Vault

What Workflows Look Like

Every workflow is built visually in the Studio Canvas. You can design the flow just by connecting components.

Here are some example needs and the workflows that match them:

GoalWorkflow Steps
Write a blog postGenerate outline → Write content → Post to site
Answer support ticketsDetect topic → Search FAQ → Suggest response
Run daily performance reportTrigger on schedule → Query DB → Format and send
Process uploaded leadsLoop through list → Enrich data → Add to CRM

Core Workflow Components

TypePurposeExamples
Entry / TriggerStarts your workflowAgent Skill
ProcessingHandles AI or data tasksGenAI LLM, Classifier, ForEach
IntegrationConnects to outside servicesAPI Call, Web Scrape
Memory / StorageSaves or fetches dataRAG Remember, Vault
Control / UtilityManages flow, timing, and notesAsync/Await, Sleep, Note

How Workflows are Triggered

SmythOS workflows are flexible and can be triggered in multiple ways, depending on how you plan to use them.

Trigger Methods

Trigger TypeBest ForHow It Works
API CallServer-to-server, webhooks, scriptsCall the workflow's REST endpoint with input payload
Agent InvocationConversational or UI-based agents,agents Triggered when a user interacts with an agent (chat, MCP client, voice)
Scheduled TaskDaily reports or timed automationRuns on a schedule using cron-based configuration
Bulk ProcessingCSV uploads or batch operationsEach row in the list invokes the workflow individually
One trigger, many uses

Once you connect a workflow to an agent via Agent Skill, it becomes available across all inputs: chat, REST API, scheduled tasks, or batch operations.

Example REST API Request

You can trigger a workflow programmatically using a REST API. Here's a sample request using cURL:

curl -X POST \
"https://api.smythos.com/v1/agent-skills/<skill-id>/startTrigger?apiKey=$SMYTH_KEY" \
-H "Content-Type: application/json" \
-d '{"orderId":1234,"amount":49.99}'

Replace skill_id and $SMYTH_KEY with your actual Agent Skill ID and API key.

Build Your Workflow Visually

  1. Drag and drop components from the sidebar to the canvas
  2. Connect blue (output) ports to red (input) ports to define the data flow.
  3. Name your nodes clearly, e.g., “Summarize Ticket” or “Send Email”
  4. Test as you build using the built-in inspect and debug tools
Keep it clear

Add a Note to explain complex parts, as it helps when you revisit your workflow later. You can also You can preview your workflow’s inputs using Form Preview.

Connect External Tools

Keep your secrets secure

Store keys and passwords in Vault instead of pasting them into your workflow.

Debugging and Deployment

  • Open the Inspect Panel to watch inputs and outputs in real time.
  • Enable Debug mode and step through or run the workflow
  • Check Logs for errors and background tasks.
  • Press Deploy at the top right of the canvas. If you need a custom domain, an on premises setup, or container export, see the Deployment Guide.
Run sample inputs as you go
Testing with real examples helps catch issues before you ship.

Best Practices for Reliable Workflows

Add Logic, Loops, and Memory to Workflows

If you want to loop through data, run tasks in parallel, pause steps, or store info, see all options in the Logic, Flow & Memory Tools section.

  • Start small and expand gradually
  • Use clear names and add Notes to explain complex logic
  • Store secrets in Vault rather than inside components
  • Use memory sparingly and only when the agent really needs context
  • Test small chunks before running the full workflow

Workflow FAQ

Common Questions

Do I need every component?
No. Use only what fits your needs.

Why is Agent Skill the only trigger?
Because every way to start your workflow uses the same endpoint, you only need to set it once.

How do I debug errors?
Use the Inspect panel and Logs to find where data is breaking. Test smaller parts first.

Can I change my workflow after deployment?
Yes. Edit it in Studio and deploy again to update.

Can I use workflows for multiple agents? Yes. A single workflow (Agent Skill) can be reused across multiple agents or triggered in different contexts.

What's Next

OSZAR »