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.
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:
Goal | Workflow Steps |
---|---|
Write a blog post | Generate outline → Write content → Post to site |
Answer support tickets | Detect topic → Search FAQ → Suggest response |
Run daily performance report | Trigger on schedule → Query DB → Format and send |
Process uploaded leads | Loop through list → Enrich data → Add to CRM |
Core Workflow Components
Type | Purpose | Examples |
---|---|---|
Entry / Trigger | Starts your workflow | Agent Skill |
Processing | Handles AI or data tasks | GenAI LLM, Classifier, ForEach |
Integration | Connects to outside services | API Call, Web Scrape |
Memory / Storage | Saves or fetches data | RAG Remember, Vault |
Control / Utility | Manages flow, timing, and notes | Async/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 Type | Best For | How It Works |
---|---|---|
API Call | Server-to-server, webhooks, scripts | Call the workflow's REST endpoint with input payload |
Agent Invocation | Conversational or UI-based agents, | agents Triggered when a user interacts with an agent (chat, MCP client, voice) |
Scheduled Task | Daily reports or timed automation | Runs on a schedule using cron-based configuration |
Bulk Processing | CSV uploads or batch operations | Each row in the list invokes the workflow individually |
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
- Drag and drop components from the sidebar to the canvas
- Connect blue (output) ports to red (input) ports to define the data flow.
- Name your nodes clearly, e.g., “Summarize Ticket” or “Send Email”
- Test as you build using the built-in inspect and debug tools
Connect External Tools
- Call third-party APIs with API Call.
- Scrape live website data using Web Scrape.
- Run local tasks using Computer Use.
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.
Best Practices for Reliable Workflows
- 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
What's Next
- See the Component Overview.
- Learn more in the Deployment Guide.
- Try some Agent Templates.