Logo AgentPay

The account is the owner/repo.

Agents do not register. A GitHub-style repository id is the ledger name. The first transfer that touches it opens the balance.


Format

One string. That is the account.

Valid ids look like GitHub repository paths. They are not emails, wallet addresses, or KYC names.

No create-account call. The first successful fund or receive that uses an id opens its ledger row.


Setup

Bind once. Spend many times.

A human signs in once, attaches a default repo, and issues keys. After that, machines settle under that id.

1

Sign in

GitHub session opens the dashboard. No separate AgentPay account form.

2

Bind default repo

Set owner/repo as the ledger name for this session.

3

Issue API key

Create a Bearer key. Agents call pay and fund against the bound id.


Callers

Same ledger. Two ways in.

A browser session and a machine key both spend under the bound repo. They never share credentials.

Human

Dashboard session

Cookie after Google or GitHub sign-in. Used only in the browser to bind the repo and manage keys.

  • Bind default_repo
  • Create / revoke API keys
  • Read balances & ledger UI
Agent

Bearer key

Machine-to-machine only. Header is the whole auth story — no cookie, no browser.

  • Authorization: Bearer a2a_…
  • Pay, fund, hold, release
  • Scoped to the bound agent id

Lifecycle

No create-account API. Movement opens the row.

Empty

The string is only text. The ledger has no balance row for it yet.

First credit or debit

Fund, receive, or pay that touches the id writes the D1 row. That write is account creation.

Readable after

GET /api/balance and the live ledger show the agent under the same owner/repo.


Pay body

When bound, from_repo can stay out.

The key already knows which agent it belongs to. Send from_repo only when the caller must act as a different agent under policy.

POST /api/pay
{
  "to_repo": "ops-bot/invoice-runner",
  "amount": 0.05,
  "task": "scrape-batch-12"
  // from_repo omitted → uses default_repo
}
1 Bound default_repo → from_repo is optional on pay.
2 Unbound or multi-agent key → from_repo required and must match policy.
3 Mismatch with allow / deny lists → rejected before any balance moves.

Credentials

Keys authorize. They are not the agent.

Revoking a key stops calls. It does not erase the owner/repo balance or rename the agent.

Label

Human name for the key only

Create once

Secret shown a single time

Suspend

Soft block without delete

Revoke

Permanent · balance stays

Losing every key does not delete the agent. Bind again from the dashboard and issue a new key under the same owner/repo.

Governance

Rules sit on the agent, not the login.

Allow lists, caps, and task prefixes attach to the bound owner/repo. Switching humans does not reset them.

max_amount allow_to deny_to require_task_prefix blocked

Policy is evaluated before every debit. A key cannot override a deny list on its own agent id.


Isolation

Limits are keyed by agent, not by human.

One runaway repo cannot burn another. Caps, velocity, and locks are per owner/repo.

Daily cap

Spend ceiling resets each UTC day

Velocity

Windowed rate so bursts stay bounded

Wallet lock

Freeze debits without deleting the id

Key suspend

Stop one credential; leave others live


Identity

Bind the repo. Machines settle under that name.

One string is the account. Keys come and go. The ledger keeps the agent.

Open AgentPay

│

Join now
AI Assistant