Design and build multi-step agentic workflows on AgentPMT that chain tool calls, prompts, loops, and human notifications into reusable automation skills. Use when the user wants to create automated pipelines, chain multiple tools together, build no-code agent workflows, or publish reusable workflow skills.
Design and build multi-step agentic workflows on AgentPMT that chain tool calls, prompts, loops, and human notifications into reusable automation skills. Use when the user wants to create automated pipelines, chain multiple tools together, build no-code agent workflows, or publish reusable workflow skills.
author
agentpmt
version
1.0.0
Build Agentic Workflows -- Chaining Tool Calls
Design and build production-ready multi-step automation workflows on the AgentPMT platform. Workflows are directed acyclic graphs (DAGs) that chain tool nodes, prompt nodes, branch/merge conditional paths, for_each loops, and human notification gates into reusable, publishable skills.
When to Apply
Reference these instructions when:
Building automated multi-step workflows that chain tool calls
Creating agent pipelines (research, content, outreach, data processing, monitoring)
Publishing reusable workflow skills to the AgentPMT marketplace
Remixing or forking existing public workflows
Designing DAG-based automation with branching, looping, and human approval gates
Tool Reference: workflow_skills_manager
All workflow operations use the workflow_skills_manager handler. Call get_instructions first if you need the full schema reference.
Actions
Action
Purpose
Required Params
fetch_tools
Discover available tools for building workflows
none (use tool_search to filter)
create_new
Create a new workflow
name, description, nodes, edges
update_existing
Modify a workflow you own
skill_id + fields to change
fetch_existing
List your workflows or fetch one by ID
optional skill_id, query
search_public
Browse public published workflows
optional query
publish
Freeze and version a workflow for use
skill_id
remix
Copy a public workflow for editing
skill_id
delete
Remove a workflow you own
skill_id
get_instructions
Get full schema reference
none
Workflow Design Process
Step 1: Understand the Task
Before building, determine:
What repetitive task is being automated?
What is the expected input and output?
What tools are needed? (Use fetch_tools with tool_search to find them)
Where does a human need to be involved vs. where can automation handle it?
Step 2: Discover Available Tools
Use fetch_tools to search the tool catalog by keyword:
_id: Product ObjectId (use as product_id in tool nodes)
name: Product name (use as product_name in tool nodes)
vendor_id: Vendor ObjectId
is_private: Whether the tool requires special access
description: What the tool does
input_schema / parameters: The tool's parameter schema
Search multiple times with different keywords to find all relevant tools. If a tool exists for a task, use it instead of asking a human.
Step 3: Design the Workflow Graph
A workflow is a directed acyclic graph (DAG) of nodes connected by edges. There are six node types:
Type
Purpose
Inputs
Outputs
tool
Execute a marketplace product
1
1 (next)
prompt
AI reasoning/data transformation
1
1 (next)
for_each
Iterate over a collection
1
2 (loop, next)
branch
Split into conditional paths
1
up to 8 (path_1..path_8)
merge
Rejoin parallel paths
N (merge_in_1..N)
1
notify_human
Request human intervention
1
1 (next)
Node Types
Tool Node -- Execute a vendor product/tool:
{"id":"node-1","type":"tool","label":"Search News Articles","tool":{"product_id":"507f1f77bcf86cd799439011","product_name":"News Search","parameters":"{\"query\": \"industry trends\", \"limit\": 10}","instructions":"Search for the latest articles relevant to the user's industry."},"position":{"x":100,"y":100}}
product_id and product_name: Required. Get these from fetch_tools.
parameters: Optional JSON string of default parameter values.
instructions: Optional guidance for the AI agent executing this step.
Prompt Node -- AI reasoning/processing step:
{"id":"node-2","type":"prompt","label":"Analyze and Summarize","prompt":{"mode":"structured","goal":"Summarize the news articles into a concise briefing","inputs":"Raw news article data from the previous step","outputs":"A structured briefing with key takeaways, trends, and action items","constraints":"Keep the summary under 500 words. Focus on actionable insights.","success_criteria":"The briefing contains at least 3 key takeaways with supporting evidence"},"position":{"x":300,"y":100}}
Two modes:
freeform: Single text field for simple instructions.
structured: Fields for goal, inputs, outputs, constraints, success_criteria, notes. Use structured mode for complex reasoning steps.
For Each Node -- Iterate over a collection:
{"id":"node-3","type":"for_each","label":"Process Each Article","for_each":{"item_alias":"article","instructions":"For each article, extract the title, summary, and sentiment."},"position":{"x":200,"y":200}}
Child nodes are nested inside by setting their parentId to the for_each node's id.
Has two outgoing handles: "loop" (enters the loop body) and "next" (continues after the loop completes).
Branch Node -- Split the workflow into conditional paths (up to 8):
{"id":"node-branch","type":"branch","label":"Evaluate Risk Level","branch":{"description":"Route based on the risk assessment from the previous step","option_count":3,"options":{"path_1":{"name":"High Risk","description":"Score above 80"},"path_2":{"name":"Medium Risk","description":"Score 40-80"},"path_3":{"name":"Low Risk","description":"Score below 40"}}},"position":{"x":400,"y":100}}
option_count: Number of outgoing paths (default 2, max 8).
options: Metadata for each path, keyed by handle ID ("path_1", "path_2", etc., or "true"/"false" for binary branches).
Each outgoing edge should have a condition string describing when that path is taken.
Always pair with a merge node downstream to rejoin paths.
Merge Node -- Rejoin parallel paths back into a single flow:
{"id":"node-merge","type":"merge","label":"Continue After Risk Evaluation","merge":{},"position":{"x":800,"y":100}}
Has multiple input handles ("merge_in_1", "merge_in_2", etc.) matching the number of incoming branch paths.
Has a single output handle to continue the flow.
Use after every branch node to reconverge the paths.
Notify Human Node -- Request human intervention:
{"id":"node-4","type":"notify_human","label":"Request Approval","notify_human":{"request_type":"other","request":"Please review the generated report before it is sent to stakeholders."},"position":{"x":500,"y":100}}
Request types: add_funds, enable_tool, enable_workflow, other.
Use sparingly -- only when human judgment or approval is genuinely required.
condition: Optional string describing when this path is taken. Used on branch node outgoing edges.
sourceHandle: Which output handle the edge originates from. Common values: "next" (tool, prompt, notify_human, merge), "loop" or "next" (for_each), "path_1"/"path_2"/"true"/"false" (branch).
targetHandle: Which input handle the edge connects to. Usually "default", or "merge_in_1"/"merge_in_2" for merge nodes.
Graph Rules
No cycles. The graph must be a DAG. Use for_each nodes for iteration.
Tool, prompt, and notify_human nodes have one input and one output.
For_each nodes have one input and two outputs ("loop" for the body, "next" for after the loop).
Branch nodes have one input and up to 8 outputs ("path_1" through "path_8", or "true"/"false").
Merge nodes have multiple inputs ("merge_in_1", "merge_in_2", etc.) and one output.
Every branch node should have a corresponding merge node downstream.
All node IDs must be unique. Use descriptive IDs like "fetch-data", "analyze-results", "send-report".
All edge references must point to existing nodes.
Step 4: Build and Create
Call create_new with the complete workflow definition:
{"action":"create_new","name":"Daily Industry News Briefing","description":"Searches for industry news, analyzes key trends, formats a briefing, and emails it to the team.","time_saved_minutes":30,"visibility":"private","nodes":[],"edges":[]}
name: Clear, descriptive name (what the workflow does).
description: Explain the workflow's purpose, inputs, outputs, and value.
time_saved_minutes: Honest estimate of manual time this replaces.
visibility: Start with "private". Set to "public" when ready to share.
Step 5: Test and Iterate
After creation, use fetch_existing with the returned skill_id to verify the full graph. Use update_existing to fix issues.