Agent Gateway 3 min read

Agent Credits

Credits are the billing unit for agent gateway tool calls. They are workspace-scoped — any API key in your workspace draws from the same balance.

The agent gateway (MCP + A2A at agent.abtestbot.com) is available on any plan. Buy a credit pack to get started. Enterprise plans include unlimited usage — no credits are deducted for Enterprise workspaces.


Enterprise plan — unlimited usage

Workspaces on the Enterprise plan bypass credit deduction entirely. Tool calls on agent.abtestbot.com are unmetered; purchase packs and balance are not shown in the UI. If you're on Enterprise and switch to a lower tier, you'll revert to pay-as-you-go (any unused credits in your balance remain available — they don't expire).


Credit Packs

Pack Credits Price Best for
Starter 100 $9 Evaluation, low-volume automations
Growth 500 $39 Regular agent workflows
Scale 2,000 $129 High-volume or team use

Credits never expire. Unused credits roll over indefinitely.

Purchase: Settings → Agent Credits → Buy Pack (redirects to Stripe Checkout)


Credit Costs Per Tool

Tool Credits
list_sites 1
list_ideas 1
list_experiments 1
get_site_intelligence 2
get_experiment 2
create_experiment 5
generate_ideas 10

How Deduction Works

Credits are checked and deducted atomically before the tool executes. If your balance is insufficient:

  • MCP: Returns JSON-RPC error code -32000 with status 402
  • A2A: Returns HTTP 402 with an error message

No credits are charged for failed tool calls (upstream errors, validation errors). Credits are only deducted when execution begins.


Checking Your Balance

Via the API:

curl -X POST https://[SUPABASE_URL]/functions/v1/manage-agent-credits \
  -H "Authorization: Bearer [USER_JWT]" \
  -H "Content-Type: application/json" \
  -d '{ "action": "balance", "workspace_id": "[WORKSPACE_ID]" }'

Response:

{
  "credits": 487,
  "updated_at": "2025-03-01T12:00:00Z",
  "transactions": [
    { "delta": -10, "tool_name": "generate_ideas", "created_at": "..." },
    { "delta": 500, "tool_name": null, "created_at": "..." }
  ]
}