Bruin AI Step 3 of 4

Build a Self-Healing Pipeline Agent

Configure the local API token

This is the local workflow: an AI coding tool connects to bruin mcp, then uses the local bruin cloud CLI in its terminal. You do not need the hosted Cloud MCP URL.

What to do

  • In Team Settings → Team Access → API Tokens, create a token for this agent, such as local-self-heal-agent.
  • Start with pipeline:list, pipeline:show, pipeline:run:list, pipeline:asset:list, and pipeline:asset:show.
  • Add pipeline:run:trigger only if the agent may start a named verification or recovery run.
  • Do not give this workflow delete or pipeline-update permissions.
  • Copy the plaintext token when you create it. It is shown once.

mcp:token is for the separate hosted Bruin Cloud MCP. It is not needed for the local bruin cloud workflow in this guide.

Why the agent needs this: these permissions let the agent read runs, pipelines, and assets. Keeping them limited prevents a token for investigation from becoming broad Cloud admin access.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Accept cookies to load it.