Bruin Academy
Guide
Build a Self-Healing Pipeline Agent
Give an AI agent the context and Cloud access it needs to investigate pipeline failures, run allowed fixes, and check the result.
What
Use this guide with an existing Bruin pipeline. A self-healing pipeline agent reads the failure and your project context, finds the likely cause, runs a recovery step you allow, and checks the result. It can only do what you configure it to do.
How
- Set the agent's job and the actions it may run automatically.
- Add context: asset descriptions, checks, ownership, lineage, and any tests you have.
- Set up local MCP and CLI access, or a Cloud agent, then test the access.
- Handle an incident: find the cause, run the allowed fix, check the result, and report what happened.
Before you start
- Bruin CLI installed and a Bruin project with at least one pipeline
- A Bruin Cloud project that can run the pipeline
- Permission to create a limited Bruin Cloud API token or configure a Cloud agent
- A Git-based review workflow for proposed pipeline fixes
Guide overview
- 1Understand the Self-Healing LoopSet the agent's job, recovery steps, automatic actions, and when it must ask for help.
- 2Create the Context LayerAdd asset descriptions, checks, ownership, tags, lineage, and useful project notes.
- 3Set Up Agent AccessSet up the local CLI path or a Cloud agent, then test the access before it handles failures.
- 4Run the Self-Healing LoopCapture a failure, find the cause, run an allowed fix, check the result, and report what happened.
Get help & contribute