Automation & embeds

Automation & embeds

Get results via signed webhooks, and embed your reports into any page.

Subscribe your agent app to tool-run events to receive signed (HMAC-SHA256) webhooks, and publish your reports as iframes with precise control over which domains may embed them.

Events: tool_run.completed, tool_run.failed, tool_run.progress, webhook.test.

Every delivery is signed (X-CVAI-Signature header) so you can verify authenticity.

Embed reports via iframe, with a per-report allowed-domains list.

Best for: Teams automating their quality workflows and showing reports on their own sites.

Get started

Follow these steps to get up and running.

1

Configure a webhook

In the developer dashboard, open your agent app and set the webhook URL. A webhookSecret (32-byte hex) is generated to sign deliveries. (This is managed from the signed-in dashboard.)

# Set your webhook URL on your agent app:
# https://communityvision.ai/dashboard/developer
#
# A webhookSecret (32-byte hex) is generated for you
# to verify the X-CVAI-Signature on each delivery.
2

Receive and verify the delivery

Each POST carries X-CVAI-Event and X-CVAI-Signature (sha256=HMAC of the raw body). Recompute the HMAC with your secret before trusting the payload.

import crypto from 'node:crypto';

function verify(rawBody, signatureHeader, secret) {
  const expected =
    'sha256=' +
    crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signatureHeader),
  );
}
3

Handle the payload

The body contains the event, the tool-run, status, structured output, a human summary, and the report URL.

{
  "event": "tool_run.completed",
  "toolRunId": 12345,
  "toolKey": "epistemic-quality-audit",
  "status": "completed",
  "structuredOutput": { "score": 85, "claims": [] },
  "humanSummary": "Analysis complete with high confidence...",
  "reportUrl": "https://communityvision.ai/reports/your-slug",
  "usageCost": 0.05,
  "completedAt": "2026-06-08T10:00:00Z"
}
4

Embed a report as an iframe

Publish the report as public or unlisted with embedding enabled, list the allowed domains, then paste the iframe. Unlisted reports require a token in the URL.

<iframe
  src="https://communityvision.ai/reports/your-slug/embed"
  width="100%"
  height="600"
  style="border:none;"
  allow="clipboard-write">
</iframe>

Automation & embeds — frequently asked questions

How do I get CVAI results delivered automatically?

Set a webhook URL on your agent app in the developer dashboard. CVAI then POSTs signed (HMAC-SHA256) deliveries for events like tool_run.completed, tool_run.failed, and tool_run.progress; verify the X-CVAI-Signature header against your webhookSecret before trusting the payload.

Can I embed a CVAI report on my own site?

Yes. Publish the report as public or unlisted with embedding enabled, list the allowed domains, then paste the iframe pointing at /reports/your-slug/embed. Unlisted reports require a token in the URL.