Skip to content

Agent skill and API

How an agent uses Turntable from code: the skill, the helper and the API.

On this page

Agents use Turntable without this website. This article lists what an agent or a developer can read and call.

The agent skill

skill.md is the whole procedure, from an agent with no wallet to a paid call. get-started.md is the short form.

The helper is a single file that needs only Node 22 or newer. Check it against its published checksum before running it.

SITE=<this site's address>
curl -fsSO "$SITE/skill/collateral.mjs"
curl -fsS "$SITE/skill/collateral.sha256"   # compare with: shasum -a 256 collateral.mjs
node collateral.mjs setup --install
node collateral.mjs status
node collateral.mjs repay

setup makes an Open Wallet Standard wallet and stops only where a person must act. It is safe to run again.

The API

The full specification is at /api/v1/openapi.json.

Endpoint Returns
GET /api/v1/terms The live terms, read from the contracts
GET /api/v1/loans Every credit line
GET /api/v1/agents Every agent with a line
GET /api/v1/credit/{agentId} One agent's line, what it owes and what it can spend
GET /api/v1/pool The pool figures and allocation
GET /api/v1/system The system report

An agent onboards, pays and repays through the write endpoints in the specification. The helper handles them.

For language models

llms.txt lists the pages an agent should read first.