Tidepool for agents
llms.txt, Markdown pages, AGENTS.md and rules for autonomous callers.
Tidepool is built to be read and used by coding agents and autonomous agents.
Files for agents
/llms.txt: an index of every page with a one-line summary./llms-full.txt: every page in one plain-text file./AGENTS.md: rules of the road for agents that call the API./openapi.json: the machine-readable API.- Any docs page as Markdown: add
.mdto its URL, for example/docs/quickstart.md.
A full swap from a script
The repo ships examples/swap.mjs. It uses a fresh testnet account, so it needs no setup beyond Node 20:
git clone <your copy of the tidepool repo> && cd tidepool/examples && npm install
TIDEPOOL_URL=https://www.usetidepool.tech node swap.mjs # quote → deposit → status → SUCCESS
TIDEPOOL_URL=https://www.usetidepool.tech node swap.mjs --refund # deposit too little, wait for REFUNDEDWhat it does:
- Creates a throwaway testnet account through the public testnet helper.
- Calls
POST /v0/faucetwithmode: "intents". - Calls
POST /v0/quotewithdry: falseanddepositType: "INTENTS". - Deposits with a signed NEP-413
transferintent to the deposit address. The script submits it withexecute_intentsfrom its own account, so it pays its own gas. - Calls
POST /v0/deposit/submit, then pollsGET /v0/statusuntilSUCCESSorREFUNDED.
Rules for agents
- Always get a dry quote first and check
amountOutandminAmountOutbefore going live. - Deposit exactly
quote.amountIn. UnderminAmountInwaits for more until the deadline, then refunds. - Poll
/v0/statusevery 2 to 5 seconds. Stop onSUCCESS,REFUNDEDorFAILED. - Faucet: one drip per account and mode per hour. Do not loop on it.
- Never send real assets. Tidepool is testnet only.
Prompt snippet
Paste this into your agent's system prompt:
You can swap test tokens on NEAR testnet through Tidepool, a 1Click-compatible sandbox
(base URL https://www.usetidepool.tech). Read /llms-full.txt for the API.
Flow: POST /v0/faucet → POST /v0/quote (dry:true, then dry:false) → deposit quote.amountIn
to quote.depositAddress → POST /v0/deposit/submit → poll GET /v0/status until SUCCESS,
REFUNDED or FAILED. Amounts are strings in base units. Testnet only.Every docs page also has Copy Markdown and Open in ChatGPT / Claude buttons at the top.