Use these docs with AI
Give Claude, Cursor, Devin, ChatGPT or any AI agent access to the Lighter docs via llms.txt and Markdown pages.
These docs are designed to be read by AI assistants and coding agents as well as people.
llms.txt
https://apidocs.lighter.xyz/llms.txt lists every guide and API endpoint with a one-line summary and a link to its Markdown version. Point your agent at it to discover pages.
Markdown pages
Add .md to any page URL to get clean Markdown:
https://apidocs.lighter.xyz/docs/quickstart-typescript.md
https://apidocs.lighter.xyz/reference/sendtx.mdTell your agent how to build on Lighter
Drop the Agent instructions into your repo as AGENTS.md / CLAUDE.md / .cursor/rules so your coding agent follows Lighter's rules (decimals, nonces, key safety) by default.
Devin
- Commit the Agent instructions as
AGENTS.mdin the root of the repo Devin works on. Devin reads it automatically at the start of every session. - Optionally, add a skill for Lighter work at
.agents/skills/lighter/SKILL.md, so Devin looks up the docs before writing Lighter code:
---
name: lighter
description: Use when writing or changing code that calls the Lighter API, WebSocket or signer.
---
1. Read https://apidocs.lighter.xyz/llms.txt and open the relevant pages (append .md to any page URL).
2. Follow the rules in AGENTS.md: integer prices and sizes, per-API-key nonces, confirm execution after sendTx.
3. Test against testnet (https://testnet.zklighter.elliot.ai, chain ID 300) before touching mainnet.Letting an AI agent trade
If you're building an agent that trades on a user's behalf:
- Give it a dedicated API key on a dedicated sub-account funded with only what it may risk.
- Use a read-only token for any agent that only needs to look. See Read-only Authentication.
- Never give an agent the user's Ethereum private key. API keys can't send funds to other owners.
- Keep a human confirmation step for withdrawals, transfers and large orders.
Updated 2 days ago
Did this page help you?
