What is the Guardian Agent?
The Guardian Agent brings self-healing capabilities to your workflows. When a workflow fails, the Guardian Agent automatically diagnoses the problem, determines the root cause, and generates a concrete fix — then hands that fix to the Workflow Builder Agent to apply the repair. The entire cycle from error detection to code fix happens through AI, with you approving each step. This means workflows don’t just fail and wait for someone to debug them. The Guardian Agent reads the error analytics, inspects the code, figures out what went wrong, and writes the repair — you just review and approve.Prefer to watch on LinkedIn? Open the post in a new tab.
How It Works
The Guardian Agent operates in a three-stage pipeline: diagnose → propose → repair.1. Diagnose
When you start a Guardian analysis, the agent:- Queries error analytics to find failure patterns, counts, and categories
- Reads the workflow structure and code to understand what each node does
- Compares draft vs. published versions to see what changed since the last deployment
- Inspects recent run results to see what data each node received and produced
2. Error Categorization
The Guardian Agent classifies each error and determines whether it can be fixed automatically or requires manual action.Code errors (auto-fixable via Workflow Builder Agent)
Since workflows must be working before they can be published, production errors are almost always caused by real-world conditions that weren’t accounted for during development. The Guardian Agent identifies these and writes targeted fixes:| Type | Examples |
|---|---|
| Unexpected data shapes | An API starts returning a new field format, an upstream node produces null where it didn’t before, an array is empty when it was always populated during testing |
| Unhandled edge cases | A user record has no email, a currency field contains a string, a list has 10,000 items instead of the expected 50 |
| External API changes | A third-party API changes its response structure, adds required parameters, or deprecates an endpoint |
| Volume and scale issues | Payloads larger than expected, rate limits hit at production traffic levels, timeouts on operations that were fast in testing |
| Code configuration drift | A tool name or server name was renamed, parameter requirements changed after an MCP server update |
Resource and connection errors (user action required)
These errors require manual intervention — the Guardian Agent identifies them and tells you exactly what to do:| Type | Examples | Recommended action |
|---|---|---|
| Missing connections | ”PCID not found”, connection doesn’t exist | Create the connection, or switch to an existing one (Guardian checks for alternatives) |
| Expired OAuth tokens | ”Token expired”, “Invalid token” | Refresh the connection’s OAuth credentials |
| Missing collections | Collection ID not found in datastore/filestorage/vault | Create the collection or fix the resource binding |
| External API outages | Service unavailable, persistent timeouts | Wait for the external service to recover |
Draft vs. published comparison
The Guardian Agent also compares your current draft code against the published version. If a fix has already been made in the draft but not yet published, it will tell you — so you don’t duplicate work.3. Propose and Repair
For code-fixable issues, the Guardian Agent writes a detailed repair prompt — including the root cause, the affected nodes, and the specific code changes needed. Multiple issues are combined into a single prompt so everything can be fixed in one pass. With your approval, the Guardian Agent then hands this repair prompt directly to the Workflow Builder Agent, which opens the workflow and applies the fixes automatically. You stay in control — the Guardian Agent always asks before invoking the Workflow Builder Agent, and you can review the proposed changes before they’re applied. For issues that can’t be fixed by code (expired tokens, missing connections), the Guardian Agent tells you exactly what manual steps to take.See It In Action — A Real-World Walkthrough
The easiest way to understand the Guardian Agent is to watch it close the loop on an automation that is actively failing. This walkthrough takes you from “my workflow just broke in production” to “it’s fixed and running again” without leaving the Pinkfish app.Build an automation that touches real-world data
Create a workflow that calls an external API and transforms its response. In development, every record the API returns looks the same — so a snippet like
items.map(x => x.email.toLowerCase()) passes testing and gets published.Typical shapes that later cause failures in production:- A field you expected to always be present (
email,name,id) isnullor missing on some records - An upstream API adds a new field format, changes casing, or returns a string where it previously returned a number
- A list you tested with 50 items arrives with 10,000
- An MCP tool or connection is renamed after the workflow is published
Publish and let it fail
Publish the workflow and let it run against real production traffic — either on a schedule, via a trigger, or through a live integration. A record eventually comes through where
email is null, the transform throws Cannot read property 'toLowerCase' of null, and the run fails.One failed run on its own is a blip. A pattern of failing runs is what the Guardian Agent picks up on.Guardian surfaces the problem in Notifications
You don’t have to go looking for errors. The Notifications bell in the top navigation bar shows an unread count the moment a workflow starts accumulating failures from triggered runs.
Open the bell and you’ll see a card for each affected workflow — the workflow name, a short summary, an error count, and a Review button:

Click Review. The Guardian Agent panel opens docked beside your workflow, with the affected workflow already selected and its error summary pre-loaded — “30 errors in the last 30 days”, plus the Top Errors list grouped by pattern:




Start a new analysis
Inside the Guardian Agent panel, click How to fix it, then Start New Analysis:
The button label changes to “Starting Analysis…” while the session spins up, then the chat panel opens alongside a status card that reads “Analysis in progress… The Guardian Agent is analyzing your workflow.”
During this phase, the Guardian Agent pulls the workflow’s error analytics, reads the published and draft code, and inspects recent run inputs and outputs. When it’s done, the session moves to Ongoing and the panel populates with:


- Errors analyzed — the total number of error patterns it found
- Top Errors — the patterns that matter most
- Coding prompt — a detailed repair instruction for any code-fixable issues
- User actions — manual steps if anything requires your attention (expired tokens, missing connections, etc.)
Chat with the Guardian Agent
The Guardian Agent isn’t just a one-shot analyzer — it’s a chat agent you can talk to. The chat panel opens with:
When you ask it to fix the issue, the Guardian Agent asks for your approval before doing anything:
Guardian Agent I analyze workflows for errors and recommend fixes.Ask it anything about what it found. Good prompts:
- “Why is this failing?”
- “Show me the exact records that triggered the error.”
- “What’s different between the draft and the published version?”
- “Can you fix this?”

I’ve generated a repair prompt for these issues. Would you like me to send it to the Workflow Builder Agent to fix the workflow?The Guardian Agent never modifies your workflow without this explicit confirmation.
Approve the fix — the Workflow Builder Agent takes over
Reply Yes (or click the approval action) and the Guardian Agent hands the repair prompt to the Workflow Builder Agent. The Workflow Builder Agent opens the workflow, applies the code changes — typically adding the null check, adjusting the data shape, renaming the tool, whatever the fix requires — and saves a new draft.In the Guardian panel, the fix status transitions through Pending → In Progress → Applied. You can review the draft that the Workflow Builder Agent produced before publishing.
Publish and watch it succeed
Once you’re happy with the repaired draft, publish it. The next triggered run picks up the new version and completes successfully — the loop is closed.Back in the Guardian panel, mark the session Resolved (or let it auto-resolve once the fix status reaches Verified). The Previous Analyses list keeps the full history, so the next time someone asks “what changed?”, the answer — diagnosis, proposed fix, approval, repair, and outcome — is all in one place.
Why the loop matters
Without the Guardian Agent, the path from a failing production run back to a fix is: someone notices the red alert, opens the workflow, scrubs through run history, hypothesizes a cause, edits the code, republishes, and hopes. With the Guardian Agent, the diagnosis and the fix are generated for you, the Workflow Builder Agent applies them, and you stay in control of the approval — the whole cycle happens inside Pinkfish, in minutes, without leaving chat.Using the Guardian Agent
Starting an Analysis
- Open a workflow that has errors — or open the Notifications bell and click Review on a workflow’s error card
- In the Guardian Agent panel, click How to fix it
- Click Start New Analysis
- The Guardian Agent begins analyzing the workflow’s error patterns
Reviewing Results
After analysis, you’ll see:- Errors analyzed — Total number of error patterns found
- Error summary — List of error patterns with categories
- Proposed fixes — Count of recommended fixes
- Coding prompt — The repair prompt for code-fixable issues
- User actions — Manual steps you need to take
Approving Repairs
When the Guardian Agent has a fix ready, it will ask for your approval:“I’ve generated a repair prompt for these issues. Would you like me to send it to the Workflow Builder Agent to fix the workflow?”Once you approve, the Guardian Agent sends the repair prompt to the Workflow Builder Agent, which opens the workflow and applies the code changes. This is where the self-healing loop closes — diagnosis, fix generation, and repair all happen through AI, with your approval as the gate between each step. The Guardian Agent will never invoke the Workflow Builder Agent without your explicit permission.
Continuing Previous Sessions
Each analysis creates a session that persists your results. You can:- View previous analyses for any workflow
- Continue a session to ask follow-up questions
- Track fix status across sessions (pending, in progress, applied, verified)
Session Status
Guardian sessions track the lifecycle of an analysis:| Status | Meaning |
|---|---|
| Active | Analysis is in progress |
| Ongoing | Analysis complete, fixes pending |
| Resolved | All fixes applied and verified |
| Abandoned | Analysis discontinued |
What the Guardian Agent Can and Cannot Do
Can do:- Diagnose workflow errors from analytics, code, and run results
- Compare draft vs. published code to detect regressions or pending fixes
- Check for alternative connections when one is missing
- Write comprehensive repair prompts with specific code changes
- Hand off repairs to the Workflow Builder Agent (with your approval)
- Track analysis sessions so you can pick up where you left off
- Modify workflow code directly — all code changes go through the Workflow Builder Agent
- Create or change connections — it will tell you what to do
- Execute workflows
- Take any action without your approval

