Bruin AI Step 4 of 5

Cloud AI Agent

Deploy an AI Analyst to Bruin Cloud & Slack

Build a stock market AI analyst in Bruin Cloud and connect it to a Slack AI agent so your team can query data from any channel.

Deploy the analyst

1) Initialise the Bruin project

  • Run bruin init empty <pipeline-name>. If the current folder is already git-initialised, this creates <pipeline-name> unless you pass --in-place.
  • If the current folder is not a git repo, Bruin creates a bruin/ folder first and then creates the project and pipeline inside it.
  • For more context, see Bruin project docs and video walkthrough.

2) Build the pipeline

  • Use Claude to extract stock data from Yahoo Finance and Wikipedia.
  • Build assets that clean and join the data.

3) Enhance metadata

  • Run bruin ai enhance across the assets.
  • See AI enhance command for flag options.
  • Confirm descriptions, column metadata, quality checks, and lineage look correct.

4) Add the repo to Bruin Cloud

  • Go to Bruin Cloud, open Team settings, then Projects.
  • Add the repo to the workspace.
  • Enable the pipeline and run it.
  • Confirm backfill runs and daily schedule work as expected.

5) Create the AI agent in Bruin Cloud

  • Go to Agents and create a new agent.
  • Select the repo and pipeline.
  • Add Slack credentials.
  • Name the agent and select the target Slack channel.

6) Add agent instructions

  • Create an AGENTS.md file in the project root with pretext, context, rules, and instructions.
  • Require bruin query for all data access, and use --dry-run while testing.

7) Test in Bruin Cloud UI

  • Ask a few questions to verify the agent can query the data.
  • Confirm it can self-correct when the first query is not correct.

8) Test in Slack

  • Mention the agent in a Slack channel.
  • Ask a stock market question.
  • Open the generated SQL to validate the logic.
  • Request a PDF report and confirm it is generated.

Sign up to our newsletter

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