Agent monetization

View as Markdown

When an agent uses your product through a person's seat, you can offer it a better route: an API or an agent seat, metered by usage. This guide shows the pattern in three steps: detect, offer, meter. Telltale measures and reports; it never charges anyone. Billing stays in your own system.

1. Detect

Two signals matter, and they come from different places.

Generic automation does not show which AI model, or whether any AI model, is driving. Make the offer only for an agent verdict whose agent is named as Verified or Unconfirmed, and always show the name together with how you know it.

2. Offer

Show your own offer in the page with the SDK's opt-in agent handler. Fetch the strength from your backend: /api/agent-attribution below is a route in your own application that calls Telltale's verify with the session token and returns its attribution ({ strength, controller }):

JavaScript
const resolveAttribution = async ({ sessionToken }) => {
  const r = await fetch('/api/agent-attribution', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ sessionToken })
  });
  return r.ok ? (await r.json()).attribution : null; // { strength, controller }
};

client.onAgent(({ attribution }) => {
  showOffer(`${attribution.controller} (${attribution.strength === 'signed' ? 'verified' : 'unconfirmed'}) is working here for someone. ` +
    'Agents can use our API with an agent access plan.');
}, { pages: ['/', '/reports'], attribution: ['signed', 'weak-marker'], resolveAttribution });

Keep the offer short and point it at your API documentation. Do not block the person whose session it is: the agent works for them. If you also want to stop a risky action, see "Interrupt agents in the page" in the Browser SDK guide. Either way, the browser UI is not security. Your server still verifies every protected action and applies its policy.

A typical pattern: an "Agent access plan" card for Verified or Unconfirmed agent names that links to its Reports API page. It sells nothing by itself: the card only points the agent at the route you offer.

3. Meter

Once an agent works through your API or an agent seat, report the completed work from your backend:

Shell
curl -sS -X POST https://app.trytelltale.dev/api/v1/usage \
  -H "Authorization: Bearer $TELLTALE_SERVER_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"sessionToken":"TOKEN","eventId":"export_000001","actionId":"export_report","units":1}'

See the Usage metering guide for idempotency, periods, retention and reconciliation.

Checklist