agentpayment/build-agentic-workflows-chaining-tool-calls/SKILL.md
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.
npx skillsauth add AgentPMT/agent-skills build-agentic-workflows-chaining-tool-callsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Reference these instructions when:
All workflow operations use the workflow_skills_manager handler. Call get_instructions first if you need the full schema reference.
| 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 |
Before building, determine:
fetch_tools with tool_search to find them)Use fetch_tools to search the tool catalog by keyword:
{
"action": "fetch_tools",
"tool_search": "email",
"limit": 20
}
Each returned product includes:
_id: Product ObjectId (use as product_id in tool nodes)name: Product name (use as product_name in tool nodes)vendor_id: Vendor ObjectIdis_private: Whether the tool requires special accessdescription: What the tool doesinput_schema / parameters: The tool's parameter schemaSearch multiple times with different keywords to find all relevant tools. If a tool exists for a task, use it instead of asking a human.
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) |
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:
text field for simple instructions.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}
}
parentId to the for_each node's id."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).condition string describing when that path is taken.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}
}
"merge_in_1", "merge_in_2", etc.) matching the number of incoming branch 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.
Edges connect nodes in execution order:
{
"id": "edge-1",
"from": "node-1",
"to": "node-2",
"sourceHandle": "next",
"targetHandle": "default"
}
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."loop" for the body, "next" for after the loop)."path_1" through "path_8", or "true"/"false")."merge_in_1", "merge_in_2", etc.) and one output."fetch-data", "analyze-results", "send-report".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.After creation, use fetch_existing with the returned skill_id to verify the full graph. Use update_existing to fix issues.
When the workflow is ready:
{
"action": "publish",
"skill_id": "<skill_id>",
"version_bump": "minor"
}
1.0.0.major (breaking changes), minor (new steps/features), patch (fixes).If a tool exists that can perform a task, use it. Reserve notify_human nodes for:
Every step must add value. Do not pad workflows with unnecessary steps.
Insert prompt nodes between tool nodes when the AI needs to:
Calculate time_saved_minutes based on how long the equivalent manual process takes.
Before building from scratch, search for existing public workflows:
{
"action": "search_public",
"query": "email report"
}
If a relevant workflow exists, remix it:
{
"action": "remix",
"skill_id": "<source_skill_id>",
"name": "My Custom Version"
}
This creates a private copy you can modify.
{"x": 100, "y": 100}.fetch_tools.visibility to "public" on a workflow that hasn't been tested.tools
Image Generation Agent: Google Gemini-powered image generation tool (Nano Banana / Gemini 2.5 & 3 Flash Image). Use when an agent needs image generation agent, ai image generation, nano banana image creation, google gemini image api, text to image, generate budget image, prompt, aspect ratio through AgentPMT with either an account Bearer Token or the no-account AgentAddress/x402 flow. Discovery terms: image generation agent, ai image generation, nano banana image creation.
tools
Use AgentPMT external API to run the Zoho CRM Connector tool with wallet signatures, credits purchase, or credits earned from jobs.
tools
Use AgentPMT external API to run the Zoho Books tool with wallet signatures, credits purchase, or credits earned from jobs.
tools
Use AgentPMT external API to run the Zip / Unzip - File Compression < 10MB tool with wallet signatures, credits purchase, or credits earned from jobs.