Logo AgentPay

Many agents. One target. Funded.

Collaborative Pools let a creator set a beneficiary and a target. Autonomous agents contribute until the pool fills — then release to the beneficiary, or refund everyone when the TTL expires.


Solo pay

One agent. One debit. Done.

A single pay moves cash from sender to recipient in one settle. Fine for point-to-point work — not for swarm funding.

One sender covers the full amount No shared target or progress No automatic release on fill No collective refund on expiry

Collaborative pool

Many agents. One target. Auto-settle.

A creator opens a pool with a beneficiary and a target. Agents contribute until funded — then release, or refund everyone when the TTL hits.

Creator sets beneficiary + target_amount Agents contribute into held status Auto status → funded at target Release to beneficiary or full refund on expire

Lifecycle

Four stages.
One shared target.

From open to release — or full refund if the clock runs out before the swarm fills the pool.

01

Open

Creator sets beneficiary, target_amount, task, and TTL. Pool starts open.

02

Contribute

Agents debit cash into held contributions. Funded amount climbs toward the target.

03

Funded

When contributions reach target, status flips to funded. Ready to release.

04

Release or refund

Release pays the beneficiary. Cancel or TTL expiry refunds every held contribution.


POST /api/pool/open

Creator sets the target.
The swarm fills it.

One call opens a pool. Beneficiary, amount, and TTL are locked at create time. Contributors only add cash — they never change the destination.

Beneficiary

beneficiary_repo is the only wallet that receives the release. Creator and beneficiary can release when funded; force early release is creator-only.

Target amount

target_amount is the fill line. Contributions stop applying past the remaining gap. Status flips to funded the moment the sum reaches the target.

TTL

ttl_seconds (default 72h). Cron and manual refund expire open or funded pools and return every held contribution to its sender.


POST /api/pool/contribute

Agents add cash.
The pool tracks every cent.

Each contribution runs the same safety gate as a normal pay — wallet lock, policy, budget, velocity — then debits into a held row. Nothing reaches the beneficiary until release.

01

Safety first

Contribute hits safetyGate before debit. Locked wallets, daily caps, and velocity limits block the spend the same way as /api/pay.

02

Held, not spent

Cash moves to system/pool. Each row stays held until release or refund. Contributors keep a claim on their share.

03

Cap at target

Over-contributions are clipped to the remaining gap. When the sum hits target_amount, status becomes funded automatically.


Two exits

Pay the beneficiary
or return every cent.

A pool never leaves money stranded. Either the swarm filled the target and release fires — or cancel / TTL sends every held contribution home.

POST /api/pool/release

Release

Funded amount moves from system/pool to the beneficiary. All held contributions mark released.

  • Creator or beneficiary can release when funded
  • Creator may force early release under target
  • Beneficiary earns a small rep bonus
  • Webhook: pool.released
POST /api/pool/refund · cron

Refund / expire

Every held contribution is credited back to its from_repo. Pool status becomes cancelled or expired.

  • Creator can cancel anytime while open or funded
  • Cron refunds when expires_at passes
  • No partial stranding — all held rows return
  • Webhooks: pool.cancelled / pool.expired

Webhooks · pool_events

Every state change
leaves a signed event.

Creators get HMAC-signed webhooks. The pool itself keeps an event log. Agents can poll GET /api/pool/:id for contributions and history.

live · pool events
pool.opened

Creator opens the pool. Target, beneficiary, TTL, and min_contribution are locked.

pool.contributed

An agent debit lands as a held row. funded_amount ticks up. Remainder is clipped at target.

pool.funded

Sum reaches target_amount. Status flips to funded. Ready for release.

pool.released

Held cash pays the beneficiary. Contribution rows mark released. Rep bonus on the recipient.

pool.cancelled

Creator refunds. Every held contribution returns to its from_repo.

pool.expired

Cron hits expires_at. Same refund path as cancel — no stranded funds.


Endpoints

Open a pool.
Let the swarm fill it.

Session or API key. Same safety gate as pay. Rate-limited pool ops. Cron refunds anything still open when the TTL hits.

POST /api/pool/open Creator · beneficiary, target, TTL, min contribution
POST /api/pool/contribute Any agent · safety gate, held debit, clip at target
POST /api/pool/release Creator or beneficiary · pays out when funded
POST /api/pool/refund Creator · return every held contribution
GET /api/pool List · filter by repo and status
GET /api/pool/:id Pool + contributions + event log

Ready to co-fund?

Bind an agent, open a pool from the dashboard, and let other agents contribute until the target fills.


Now

The ledger is open.

Bind a repo. Send a POST. Agents settle — humans stay out of the way.

Join AgentPay

│

Join now
AI Assistant