Skip to main content

Monitoring Setup

Store the Slack channels and GitHub repo your triage and fix agents should use. Configuration is through the REST API or the monitoring__* gateway tools; fixes always go through SignedApproval before anything reaches your repo.

Key Concepts

What it does

Monitoring configuration stores, per organization, which Slack channel carries incoming error alerts, which channel your agents should post to, and which GitHub repository fixes target. Two agents use it: AlertTriageAgent reads the error channel through the Slack MCP server and posts structured triage reports; AlertFixAgent reads a triage report, proposes a code fix, and dispatches it to your repo through GitHub Actions only after you approve it in the SignedApproval app. Nothing here runs on a schedule — you (or your own automation) dispatch the agents.

What you need before setup

  • A Slack workspace with a bot connected — install via Integrations → Slack
  • A GitHub repo where your code lives — connect via Integrations → GitHub
  • AlertTriageAgent and AlertFixAgent active in your AI Company
Step-by-Step Guide
1

Connect Slack and GitHub

Connect your Slack workspace and GitHub repository under Integrations first. There is no monitoring setup card in the dashboard — the channel and repo configuration itself is saved through the REST API or the gateway tools described below.

Tip
The quickest path is to let an AI assistant connected to the Clevername MCP gateway do it for you — see step 3.
2

Set up via the REST API

All monitoring config endpoints are under /api/hub/hub/ai-company/monitoring/ and require a Supabase JWT in the Authorization header.

Check current status

Returns which pieces are connected and what is still missing. Always call this first to see what needs to be configured.

GET /api/hub/hub/ai-company/monitoring/status?org_id={org_id}
Authorization: Bearer {supabase_jwt}

// Response
{
  "slack_connected": true,
  "github_connected": false,
  "error_channel_configured": false,
  "notify_channel_configured": false,
  "github_repo_configured": false,
  "setup_complete": false,
  "missing": ["github_repo", "error_channel", "notify_channel"]
}
Response fields:
  • slack_connected — Slack OAuth connection exists for this org
  • github_connected — GitHub OAuth connection exists for this org
  • error_channel_configured — a Slack channel is set to receive error alerts
  • notify_channel_configured — a Slack channel is set to receive agent updates
  • github_repo_configured — a target GitHub repo is saved
  • setup_completetrue when all five are satisfied
  • missing[] — list of keys still needed

List Slack channels

Fetches all channels visible to the connected Slack bot. Use this to find the channel ID you need for the config step — do not guess or hardcode a name.

GET /api/hub/hub/ai-company/monitoring/slack/channels?org_id={org_id}
Authorization: Bearer {supabase_jwt}

// Response
{
  "channels": [
    { "id": "C0XXXXXXXX", "name": "errors" },
    { "id": "C0YYYYYYYY", "name": "clevername-errors" },
    { "id": "C0ZZZZZZZZ", "name": "general" }
  ]
}

Save config

Persists the monitoring configuration for the org. All fields are optional — only the fields you include are updated. The slack_error_channel_name and slack_notify_channel_name fields are for display only; the IDs are what the agents actually use.

PUT /api/hub/hub/ai-company/monitoring/config?org_id={org_id}
Authorization: Bearer {supabase_jwt}
Content-Type: application/json

{
  "slack_error_channel_id": "C0XXXXXXXX",
  "slack_error_channel_name": "#clevername-errors",
  "slack_notify_channel_id": "C0XXXXXXXX",
  "slack_notify_channel_name": "#clevername-errors",
  "github_repo": "owner/repo-name"
}

// Response
{
  "ok": true,
  "setup_complete": true
}
Note
Both channels can be the same Slack channel. The error channel is where your monitoring tools post incoming alerts; the notify channel is where agents post triage reports and fix confirmations. Keeping them separate is recommended for high-volume error environments.
3

Set up via your AI assistant

This is the recommended path for most users. Your AI assistant (Claude or any LLM connected to Clevername's MCP gateway) can check what's missing, look up the right Slack channel ID, and save the config for you — without you touching the UI or calling any APIs yourself.

Example prompt to give your assistant

"Set up my monitoring configuration. My error alerts go to #clevername-errors and I want agents to post updates there too. My GitHub repo is AlexFloyd13/clevername."

The assistant will call monitoring__get_status to see what's missing, then monitoring__list_slack_channels to resolve #clevername-errors to its channel ID, then monitoring__set_config to save everything. You will see each tool call happen in the chat before it runs — you can review and cancel at any step.

MCP tool reference

These tools are exposed through the Clevername MCP gateway. They are available to any LLM session that has the AI Company MCP server active.

monitoring__get_status

Returns the current setup status for the org — which integrations are connected and which config fields are still missing. Use this as the first step in any setup flow.

// Required
org_id: string   // The organization UUID

// Returns
{
  slack_connected: boolean,
  github_connected: boolean,
  error_channel_configured: boolean,
  notify_channel_configured: boolean,
  github_repo_configured: boolean,
  setup_complete: boolean,
  missing: string[]
}
monitoring__get_config

Returns the full saved config object for the org, including current channel IDs and names, GitHub repo, and whether monitoring is enabled.

// Required
org_id: string   // The organization UUID

// Returns
{
  slack_error_channel_id: string | null,
  slack_error_channel_name: string | null,
  slack_notify_channel_id: string | null,
  slack_notify_channel_name: string | null,
  github_repo: string | null,
  monitoring_enabled: boolean
}
monitoring__set_config

Saves the monitoring configuration. All non-org_id fields are optional; only the fields provided are updated. A tool like this is how your assistant saves the config after resolving channel IDs.

// Required
org_id: string                        // The organization UUID

// Optional (include only what you want to update)
slack_error_channel_id: string        // Slack channel ID for incoming error alerts
slack_error_channel_name: string      // Human-readable label (display only)
slack_notify_channel_id: string       // Slack channel ID for agent output posts
slack_notify_channel_name: string     // Human-readable label (display only)
github_repo: string                   // "owner/repo-name" format
monitoring_enabled: boolean           // Enable or pause the monitoring loop

// Returns
{ ok: true, setup_complete: boolean }
monitoring__list_slack_channels

Lists all Slack channels visible to the connected bot for this org. Use this to resolve a channel name like #clevername-errors to its stable channel ID before calling monitoring__set_config. Never hardcode a channel ID without confirming it with this tool.

// Required
org_id: string   // The organization UUID

// Returns
{
  channels: Array<{ id: string, name: string }>
}
4

How triage and fixes flow

Clevername does not schedule these agents. Once setup is complete, the flow runs when you dispatch the agents — from the Dispatch Work panel, the work-item API, or your own scheduler calling the gateway:

  1. AlertTriageAgent, when dispatched, reads your error channel via the Slack MCP server and posts a structured triage report back to your notification channel.
  2. AlertFixAgent reads the triage report, analyzes the error context, and generates a proposed code fix against your configured GitHub repo.
  3. AlertFixAgent requests approval via SignedApproval — you receive a push notification in the SignedApproval app with a diff to review.
  4. You approve or reject the fix in the app. Approval dispatches AlertFixAgent to open a pull request in your GitHub repo via GitHub Actions.
  5. The outcome (PR link or rejection note) is posted back to your notification channel.
Note
Both agents must be active in your AI Company to be dispatched. The fix dispatch itself goes through the fix__dispatch_github gateway tool, which reads the repo from the saved monitoring config and refuses to run until the SignedApproval decision is approved.