Report a Problem

Send one line on what you were trying to do, with the request_id of a failed call, and the server attaches its own record of that call.

$curl -X POST "$SECONDLAYER_API_URL/v1/feedback" \
-H "Authorization: Bearer $SECONDLAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"request_id":"req_3f9a1c0b7d2e4a6f8b1c2d3e","intent":"list aeUSDC swaps for one sender since block 165000"}'
Optional fieldHolds
kind_hintmissing_capability, bug, schema_gap, docs_mismatch or perf
expectedWhat you wanted back, as a sentence or JSON
evidenceAn object with only tx_id, block_height, contract_id, event_type, subgraph, table
  • The server keeps its record of the call for 24 hours.
  • Any other field is a 400 naming the allowed ones.
  • An Idempotency-Key header makes retries safe.
  • Every JSON error carries request_id and feedback.url: Cursors and Pages.
Edit on GitHub

Quick Start

Copy this prompt into your agent.

Set up Secondlayer Index in this project. It reads Stacks chain data, decoded, from block 1.

1. Install `@secondlayer/sdk` with the project's package manager. If a release-age policy blocks the install, stop and ask me instead of changing it.
2. Ask me for a Secondlayer API key (`sk-sl_...`, from https://www.secondlayer.tools/signin) and put it in `.env` as `SECONDLAYER_API_KEY`. Never commit it. If I self-host, use `INSTANCE_TOKEN` and my instance URL instead. Until I give you one, read with a free trial key: `curl -X POST https://api.secondlayer.tools/api/public/trial-key` returns `{ key }`, read-only for Streams and Index, good for 24 hours and 100,000 rows. Keep it out of git too.
3. Add a note to `AGENTS.md`, creating it if needed: before using Secondlayer, follow the secondlayer skill if it's installed, and read https://www.secondlayer.tools/llms.txt. Before writing code, read https://www.secondlayer.tools/docs/index.md. Any docs page opens as Markdown when you add `.md` to its URL.
4. If you support skills, run: `bunx skills add ryanwaits/secondlayer --skill secondlayer -y`