Build a public live-stats widget for your marketing site

Publish real product metrics to your homepage in 30 seconds. Social proof that updates itself, no backend, no auth, embed-friendly.

Published

difficulty beginner · time to value 2 minutes · tools used 2

Just say this

Publish a public dashboard showing total customers, errors caught this month, and active investigations. Give me the embed URL — should work in an iframe, no auth needed.

Why this matters

Marketing wants “live, real numbers.” Engineering doesn’t want to ship a backend for it. So the marketing site stays static, with hardcoded testimonials and a “10,000+ users” badge that hasn’t updated since 2023.

Agentry’s public dashboards solve this: you publish a query, get a URL with an embeddable agp_ key, drop it in an iframe. The numbers are live. The key is read-only AND scoped to only the queries you explicitly published — even if the URL leaks, the worst case is people see a query you already chose to make public.

Plausible Analytics did this for their own public dashboard and it directly contributed to their growth. Every developer-tool startup should have one.

What you get

  • A public URL like agentry.sh/q/pub_xxx?key=agp_xxx
  • CORS-open, ratelimited, no signups required
  • Embed-friendly: drop in an <iframe> or render server-side with fetch
  • Updates every time your data changes (no caching headaches)

Walk through it

You

Publish a public dashboard showing: total customers, errors caught this month, and “active investigations” (open cases). I want to embed it on agentry.sh/about.

Agent

Three metrics, one dashboard. Let me publish each as a separate query so you can place them individually if you want.

agentry_publish_query {
  recipe_id: "headline_count",
  description: "Total customers",
  params: { metric: "distinct_users_ever" }
}
{ "publication_id": "pub_count", "public_url": "https://agentry.sh/q/pub_count?key=agp_xxx" }
agentry_publish_query {
  recipe_id: "headline_count",
  description: "Errors caught this month",
  params: { metric: "event_count", event: "error.captured", window_days: 30 }
}
{ "publication_id": "pub_errors", "public_url": "https://agentry.sh/q/pub_errors?key=agp_xxx" }
agentry_publish_query {
  recipe_id: "headline_count",
  description: "Active investigations",
  params: { metric: "case_count", status: "open" }
}
{ "publication_id": "pub_open", "public_url": "https://agentry.sh/q/pub_open?key=agp_xxx" }
Agent

Three URLs published. Here’s the embed-ready snippet for your About page:

<div class="live-stats">
  <iframe src="https://agentry.sh/q/pub_count?key=agp_xxx"
          width="200" height="120" frameborder="0" loading="lazy"
          title="Customers"></iframe>
  <iframe src="https://agentry.sh/q/pub_errors?key=agp_xxx"
          width="200" height="120" frameborder="0" loading="lazy"
          title="Errors caught"></iframe>
  <iframe src="https://agentry.sh/q/pub_open?key=agp_xxx"
          width="200" height="120" frameborder="0" loading="lazy"
          title="Active investigations"></iframe>
</div>

For Notion / Markdown contexts where iframes don’t render, server-side fetch works too — see Setting it up below.

Want a single combined dashboard URL instead of three? I can publish one that renders all three numbers in a row.

The output

✅ 3 public dashboards published

  pub_count    "Total customers"         → 1,247
  pub_errors   "Errors caught this month" → 18,392
  pub_open     "Active investigations"   → 47

URLs (each is iframe-embeddable, CORS-open, no auth):
  https://agentry.sh/q/pub_count?key=agp_xxx
  https://agentry.sh/q/pub_errors?key=agp_xxx
  https://agentry.sh/q/pub_open?key=agp_xxx

Embed code copied to clipboard. Ratelimit: 60 req/min per IP.

Security notes:
  • agp_ key is read-only AND only auths these 3 publications
  • If URL leaks, max exposure = these 3 numbers (which are public anyway)
  • Revoke any time: agentry_revoke_publication pub_xxx

Setting it up

The agp_ public key is auto-minted at signup. To see yours:

agentry_status

It shows up under public_api_key_prefix: agp_xxx. Use it as the ?key= query param when embedding.

Iframe embed (simplest — works in any HTML context):

<iframe src="https://agentry.sh/q/PUB_ID?key=agp_xxx"
        width="240" height="100" frameborder="0" loading="lazy"></iframe>

Server-side render (for Notion-friendly markdown, static-site templates, RSS feeds):

// In your page loader
const res = await fetch(`https://agentry.sh/q/PUB_ID?key=agp_xxx&format=json`);
const data = await res.json();
return `<div class="metric"><strong>${data.value.toLocaleString()}</strong> customers</div>`;

Custom-styled (fetch JSON, render however you want):

fetch(`https://agentry.sh/q/${PUB_ID}?key=${AGP_KEY}&format=json`)
  .then(r => r.json())
  .then(data => {
    document.querySelector("#customer-count").textContent =
      data.rows[0].count.toLocaleString();
  });

Variations

  • “Publish a chart instead of a single number — error rate over the last 30 days as a sparkline.”
  • “Build a ‘who’s using Agentry’ wall — recent signups (just first name + city if you have it).”
  • “Publish a ‘last incident resolved’ timer for the marketing site — like Linear’s status page.”
  • “For my newsletter, publish ‘this week’s new features’ as a JSON feed I can include in my emails.”
  • “Revoke the dashboards from last quarter’s campaign — they’re not needed anymore.”

Try this recipe in your own agent.

Paste the prompt above into your agent. It'll set up Agentry against your data, then run the recipe and show you the real output.

Install https://agentry.sh/agentry.md and set it up