Skip to content
Agentpost robot in sunglasses on a red circleAgentpost

ResourceShark

ResourceShark keeps track of what your product has, what is set aside, and what is still free to take. It fits products that manage stock, spend prepaid credits, or book time. Your server records supply, reads availability, and places holds before it commits to an order or booking.

What it takes off your hands

A stockroom, a credit balance, and a calendar all have to handle requests that arrive together. ResourceShark applies the resource’s shortage rule in the same write that places a hold or takes supply. A request to take several items succeeds in full or leaves every balance as it was. Movements record how each balance changed. Totals sum each resource’s on-hand changes by reason over a period.

When it fits

  • Stock that your product counts by place or tracks by individual unit.
  • Prepaid credits that a product gives to each holder and draws down as they use it.
  • Bookings that take capacity in time slots, such as court hours or room nights.
  • Your own rules, such as pricing, booking windows, and cancellations, run on your server before it calls ResourceShark.

Surfaces

SurfaceRuns onStatus
APIAny HTTP clientIn testing
SDKNode, browsers, and React NativeIn testing

The API answers at https://api.agentpost.tools/v1/resources for each project that adopts ResourceShark. Your server writes with the project’s secret key. A signed-in principal’s user token reaches supported reads for their own holder records. The ResourceShark API reference has every operation and who may call it.

Where to start

The ResourceShark quickstart adds stock at a roastery, holds part of it, and commits the hold. It uses the project and dev secret key from the Platform quickstart. The ResourceShark docs index lists every page.