paybondpaybond
Sign in

TypeScript example projects

Run the bundled TypeScript sketches for the generic Kit flow and the OpenAI Agents wrapper pattern.

TypeScript example projects

The Paybond repository includes two runnable TypeScript sketches:

  • examples/paybond-kit-typescript/ — generic Kit flow
  • examples/paybond-kit-openai-agents-typescript/ — OpenAI Agents-style tool wrapper pattern

Both are intended as minimal, end-to-end wiring references for the Kit (session open, intent flows, capability verification, evidence submission).

Run it locally

From the repository root:

cd examples/paybond-kit-typescript
npm install
npm run build --prefix ../../kit/ts
npm run build
npm run start

This example is wired for repo-local development against file:../../kit/ts. External consumers should install @paybond/kit in their own app instead of copying these workspace commands verbatim.

If the sketch requires credentials or base URLs, set them in your shell for the tenant you intend to test.

To run the OpenAI Agents-style example instead:

cd examples/paybond-kit-openai-agents-typescript
npm install
npm run build --prefix ../../kit/ts
npm run build
npm run start

What they demonstrate

  • Opening an authenticated Kit session (Paybond.open) bound to a tenant realm returned by the Gateway.
  • Creating intents and reading the funded intent capability token.
  • Verifying capabilities before taking intent-scoped actions.
  • Submitting signed evidence payloads and artifacts for Harbor predicate evaluation.