Support CenterHow-ToAdd the Status Badge to Your Site
Back to How-To

Add the Status Badge to Your Site

Show your agent's live status on your website with an embeddable badge.

Quick Start

Add this script to your HTML:

<script
  src="https://api.agentstatus.dev/static/widget/agentstatus.js"
  data-agent-id="YOUR_AGENT_ID"
></script>

Replace YOUR_AGENT_ID with your agent's ID (found in dashboard URL or API).

Options

Position

PositionDescription
inlineBadge appears at script location
top-rightFixed to top-right corner
top-leftFixed to top-left corner
bottom-rightFixed to bottom-right corner
bottom-leftFixed to bottom-left corner

Clickable Link

<script
  src="https://api.agentstatus.dev/static/widget/agentstatus.js"
  data-agent-id="abc123"
  data-status-url="https://status.yourcompany.com"
></script>

Theme

ThemeBest For
lightLight backgrounds (default)
darkDark backgrounds

Full Example

<script
  src="https://api.agentstatus.dev/static/widget/agentstatus.js"
  data-agent-id="abc123-def456-789"
  data-position="bottom-right"
  data-status-url="https://status.example.com"
  data-theme="light"
></script>

Multiple Badges

Show status for multiple agents by adding multiple script tags with different data-agent-id values.

API Alternative

fetch('https://api.agentstatus.dev/api/v1/agents/YOUR_AGENT_ID/status/public')
  .then(res => res.json())
  .then(data => {
    const status = data.verdict; // UP, DEGRADED, DOWN
    const uptime = data.uptime_24h;
  });

Troubleshooting

  • Badge shows "Unknown" — Agent hasn't checked yet, ID incorrect, or agent paused
  • Badge not appearing — Check console for errors, verify script URL, check CSP
  • Badge shows wrong status — Updates every 60 seconds, hard refresh to see latest

Need more help?

Our support team is available to assist you

Contact Support