Pipeline Builder: Chain Tools into Reusable Workflows
A repeated task often has more than one step: resize an image, convert its format, or scrape a public page and transform the resulting text. Agent Media Tools’ Pipeline Builder lets signed-in users save those sequences and run them consistently from the Toolbox Workspace.
Current scope: Pipeline Builder is a bounded, synchronous workflow engine with six supported step types. It does not execute arbitrary Agent Media Tools endpoints, upload files through JSON, or expose dedicated MCP pipeline controls today.
What the shipped builder supports
| Step | Inputs | Output passed forward |
|---|---|---|
image-resize | File path, width, height | file_path |
image-convert | File path, JPEG/PNG/WebP, quality | file_path |
text-transform | Text; uppercase, lowercase, trim, or slugify | text |
json-format | Current data; pretty-print or minify | formatted |
hash-calculate | Text; MD5, SHA-256, or SHA-512 | hash |
web-scrape | A public HTTP(S) URL | Bounded extracted text |
Steps execute sequentially. Each successful output is merged into the working data for the next step. A step can also include a simple condition—equals, contains, or not-empty—and an on_error policy.
Start with the browser
- Sign in and open the Pipeline Builder.
- Choose a template or create a blank pipeline.
- Add steps, configure their parameters, and save.
- Run the pipeline and inspect the result for every step.
The current templates cover Image to WebP, Scrape & Slugify, JSON Beautifier + Hash, Text Cleaner, and Image Optimizer. Templates are starting points: cloning one creates an editable pipeline under your account.
The session-authenticated REST API
The same human account session used by the Toolbox can manage pipelines through these routes:
| Method | Route | Purpose |
|---|---|---|
| GET | /api/pipelines | List your pipelines |
| POST | /api/pipelines | Create a pipeline |
| GET | /api/pipelines/:id | Read an owned or public pipeline |
| PUT | /api/pipelines/:id | Update your pipeline |
| DELETE | /api/pipelines/:id | Delete your pipeline and run history |
| POST | /api/pipelines/:id/run | Run your pipeline synchronously |
| GET | /api/pipelines/:id/runs | Read up to 50 recent runs |
| GET | /api/pipeline-tools | List the supported step registry |
These management and execution routes require a signed-in browser session. For scripts, establish a session through the login endpoint and keep the returned cookie. They are not advertised as API-key or MCP pipeline routes.
Create a text workflow with curl
💡 Windows users: Run these commands from Git Bash or WSL. PowerShell aliases curl to Invoke-WebRequest.
curl -c cookies.txt \
-H "Content-Type: application/json" \
-d '{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD"}' \
https://agentmediatools.com/api/login
curl -b cookies.txt \
-H "Content-Type: application/json" \
-d '{
"name":"Clean and hash text",
"description":"Trim text, create a slug, then hash it",
"config":{"steps":[
{"id":"trim","name":"Trim","tool":"text-transform","params":{"action":"trim"}},
{"id":"slug","name":"Slugify","tool":"text-transform","params":{"action":"slugify"}},
{"id":"hash","name":"SHA-256","tool":"hash-calculate","params":{"algorithm":"sha256"}}
]}
}' \
https://agentmediatools.com/api/pipelines
The create response contains the pipeline ID. Use it with the owned execution route:
curl -b cookies.txt \
-H "Content-Type: application/json" \
-d '{"input":{"text":" Product Launch Notes "}}' \
https://agentmediatools.com/api/pipelines/YOUR_PIPELINE_ID/run
The response includes a run ID, overall status, ordered step results, and the merged final output. Runs are synchronous: the HTTP request remains open until the steps complete or fail.
Conditions and failure behavior
A condition controls whether a step runs. This example hashes text only when the working text field is not empty:
{
"id":"hash",
"name":"Hash non-empty text",
"tool":"hash-calculate",
"params":{"algorithm":"sha256"},
"condition":{"type":"not_empty","field":"text"},
"on_error":"stop"
}
With on_error: "stop", an error stops the remaining sequence and marks the run failed. Without it, the engine records the failed step and continues, so choose the policy deliberately.
Pipeline webhooks
Runs started through the owned session route can emit pipeline.completed or pipeline.failed to active account webhooks subscribed to those events. The payload contains the pipeline and run IDs, pipeline name, status, step count, duration, and a bounded error field—not the full run result.
Webhook delivery failures do not change a completed pipeline response. Use Webhooks to configure destinations, and use the run-history route when you need detailed step results.
Practical patterns
- Image optimization: resize an existing server-side file, then convert it to WebP or JPEG.
- Public-page normalization: scrape a public URL, then trim or slugify the extracted text.
- Deterministic text processing: normalize text and calculate a repeatable hash.
- JSON inspection: format current working data before hashing or reviewing it.
Security boundary: web scraping uses the platform’s public-network guard with time and response-size limits. Pipeline file parameters are intended for files already available to the server-side workflow; a local path on your laptop or phone is not uploaded automatically.
Build a bounded workflow
Open the Toolbox, choose Pipeline Builder, and start from one of the five shipped templates.