Full-stack

How to deploy an AI bug triage workflow on Rock8Cloud

Deploy Bugtriage to Rock8Cloud in one click - Mastra agents that check every bug report for duplicates, analyse it against your repository, and hand small fixes to a coding agent that opens the pull request.

Updated 14 September 2026
The Bugtriage board with reports closed by the process, including a linked duplicate, waiting on a person, shipped as a pull request, and shelved

A bug triage process that runs on agents and stops before it does something nobody approved. Mastra workflows on Bun, a TanStack Start web app and Mastra Studio, managed as a single Turborepo monorepo. Rock8Cloud provisions the database and wires the services, so the first report can be filed minutes after deploy.

Bugtriage example
rock8-cloud/ai-bug-triage-workflow

Or ask an agent instead of clicking. With Rock8Cloud connected over MCP, deploy_blueprint with the bugtriage slug forks the same template into your GitHub account, creates the project with its services, and starts the first build.

Deploy in one click#

The blueprint clones the monorepo into your GitHub account, then builds three services from it - the Mastra server (port 4111), the web app (port 3000) and Mastra Studio (port 3001). A managed PostgreSQL database with pgvector is provisioned and passed to the server as DATABASE_URL.

The web app reaches the server over the internal network. Studio runs in the browser, so it gets the server public URL, and the server allows Studio’s origin for CORS. Nothing about that is yours to wire.

How a report moves#

Every stage costs more than the one before it, and each stage exists to stop work reaching the next:

  1. Duplicates - one embedding against past reports. A match is linked and closed.
  2. Standing rules - a policy agent recalls rules your team taught it and closes reports they cover.
  3. Analysis - a read-only Rock8Cloud agent reads your repository and the product docs.
  4. Policy - a plain rule sends the report to one of three branches: not a bug, simple fix, or needs a person.

A simple fix goes to a coding agent that implements it and opens a pull request. Anything else suspends the workflow with a drafted brief, and a person approves, backlogs or declines it from the review page.

What is in the box#

LayerTechnology
AgentsMastra workflows, Memory and evals, port 4111
WebTanStack Start, port 3000
StudioMastra Studio, port 3001
ModelsAny model on rock8router, one OpenAI-compatible key
Coding agentsRock8Cloud agent sessions over the REST API
DatabasePostgreSQL with pgvector

Before the first report#

Set three values on the server service, then redeploy it:

  • GATEWAY_API_KEY - an r8_ token for rock8router, the model gateway the app reasons with
  • ROCK8CLOUD_API_KEY - a vhk_ Rock8Cloud API key, used to start the coding agents
  • ROCK8CLOUD_SERVICE_ID - the repo-backed service the agents read and change

Then open the web app, go to Setup and run the docs index once. It loads the product documentation into pgvector so the analysis can tell intended behaviour from a bug. The same page shows whether each key actually works.

Pro tip:

The server, the web app and Studio have no authentication. Anyone with the server URL can start workflows that spend your gateway budget and task coding agents with your key. Treat the URLs as private and add auth before putting anything real behind them.

Tuning the policy#

The decision is a pure function in apps/server/src/mastra/classify.ts. Its thresholds - DUPLICATE_THRESHOLD, MAX_AUTOFIX_FILES, ANALYSIS_CONFIDENCE_FLOOR and DOCS_INTENT_THRESHOLD - are env vars on the server service. Change one, file the same report again, and watch the branch flip.

Deciding from Slack#

Set SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET and SLACK_CHANNEL_ID on the server service and every report opens a thread. Reports waiting on a person get Build, Backlog and Won’t do buttons, and the button calls the same decision as the review page.

Frequently asked questions

What does the workflow do with a bug report?
It files the report, checks it for duplicates, recalls any standing rule your team taught it, has a read-only agent analyse your repository, and applies a plain policy rule. A simple fix goes to a coding agent that opens a pull request. Anything else waits for a person.
What do I need to set after deploying?
Three values on the server service: GATEWAY_API_KEY for the rock8router model gateway, ROCK8CLOUD_API_KEY to start coding agents, and ROCK8CLOUD_SERVICE_ID for the repo-backed service the agents work on. Everything else, including the database, is wired on deploy.
Which model does it use?
Any model on rock8router. CHAT_MODEL picks the model the app reasons with and EMBEDDING_MODEL the embeddings. ROCK8CLOUD_AGENT_MODEL_ID optionally picks the coding agent model, which is billed separately.
Where is the state stored?
In one PostgreSQL database with pgvector - suspended workflow runs, reports, decisions, standing rules, traces and the vector indexes. A run waiting on a person survives a restart.
Can I change when it acts on its own?
Yes. The policy is a pure function in apps/server/src/mastra/classify.ts, and its thresholds such as DUPLICATE_THRESHOLD and MAX_AUTOFIX_FILES are env vars on the server service.

More guides

Ship today

Triage bugs with agents.A person decides the rest.

A Mastra server, a web app, Mastra Studio and PostgreSQL - provisioned together, wired to each other, live on the first deploy.

30 days free. No credit card required to start.