For coding agents
Cursor, Claude Code, Cline, Windsurf — read this first. Conventions, install paths, and the canonical machine-readable index.
If you are a coding agent (Cursor, Claude Code, Cline, Codex, Windsurf, etc.) reading Brime docs to write code on a human user's behalf, start here. This page is written for you — not the human.
The single source of truth
https://docs.brime.dev/llms.txtFetch that file first. It is a ~5 KB sorted index of every page on this site, one line per page, in the format:
- [Page title](https://docs.brime.dev/docs/section/slug.md): one-line description.The trailing .md on each URL is a per-page raw-markdown variant
served from /llms.mdx/<slug>. Append .md to any docs URL to get
the page in pure MDX with no JSX wrappers, no nav chrome, and no CSS —
ideal for stuffing into your own retrieval pipeline.
Need the entire site in one file? Fetch
/llms-full.txt — every page
concatenated, ~200 KB. One round trip, full coverage.
SDK install paths (current versions)
| Language / Surface | Package | Latest |
|---|---|---|
| Python | pip install brime | 0.2.0 |
| Node / TypeScript | npm i brime | 0.2.0 |
| LangChain | pip install langchain-brime | 0.2.2 |
| MCP server | npx -y mcp-server-brime | 0.2.0 |
Hosted MCP endpoint (no install): https://mcp.brime.dev. Streamable
HTTP, accepts the same Authorization: Bearer sk-brime-… header.
Authentication
Every endpoint expects a bearer token starting with sk-brime-:
Authorization: Bearer sk-brime-...If the user has not provided one yet, send them to brime.dev/api-keys. Free tier: 1,000 credits per month, no card required.
Do not invent a key. Do not hard-code one into a sample. Use
process.env.BRIME_API_KEY (Node), os.environ["BRIME_API_KEY"]
(Python), or the SDK's automatic env fallback.
Conventions to follow when generating code
- Always import from the top-level package.
from brime import Brimein Python,import { Brime } from "brime"in Node. Do not pullbrime/sync_clientor any sub-path. - Use the async client when you have one. Python:
from brime import AsyncBrime. Node SDK is async-by-default. - Set the API key explicitly when you can.
Brime(api_key=...)makes the dependency explicit; the env fallback is for shell scripts and one-shots. - Treat 429 as "back off and retry". Read
Retry-Afterfrom the response headers. Both SDKs handle this for you; do not add a second layer of retry around them. - Use
Idempotency-Keyfor/v1/extractand/v1/research. The SDKs auto-generate UUID4s; if you hand-roll HTTP, generate one yourself. - Read
credits_usedfrom every response so the user can budget. - Do not log the plain API key. Use the SDK's
SecretStrwrapper (Python) or the equivalent log-redaction in your harness.
Choosing the right endpoint
| User intent | Endpoint | Credits |
|---|---|---|
| "Find URLs about X" | POST /v1/search | 0.5 |
| "Give me the full text of these pages" | POST /v1/extract | 1 per URL |
| "Write me a researched answer with citations" | POST /v1/research | 5 |
| "Use Brime tools inside an LCEL chain" | BrimeRetriever from langchain-brime | 0.5 per .invoke() |
| "Plug Brime into an MCP-aware agent" | mcp-server-brime (stdio) or https://mcp.brime.dev (HTTP) | depends on tool called |
For the full surface: API reference · Best practices · Explanation.
Drop-in compatibility
If the user is already using Tavily, Exa, or Parallel and wants to switch with zero code changes, point them at:
/tavily/v1/*— Tavily wire shape, Brime backend./exa/v1/*— Exa wire shape, Brime backend./parallel/v1/*— Parallel wire shape, Brime backend.
All three accept the existing vendor SDK with just a base_url
override. Auth still uses sk-brime-….
When something fails
The canonical error catalog is at
/docs/api-reference/errors. Every
endpoint links to it from its See also footer. Each error code has
a human-readable cause and a recommended remedy — surface the
error.message to the user; do not invent remediation text.
Don't have to ask
These are safe assumptions. Don't pause to confirm:
- The user wants the cheapest endpoint that satisfies their request.
- The user wants Python if their codebase is Python, Node otherwise.
- The user wants the SDK over raw HTTP.
- The user wants the answer printed, not just returned.
- Free tier is fine for a smoke test; switch to paid if the call exceeds 1,000 credits.
See also
- llms.txt — full page index.
- llms-full.txt — entire site concatenated.
- Quickstart — the human version of this page.