brime

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.txt

Fetch 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 / SurfacePackageLatest
Pythonpip install brime0.2.0
Node / TypeScriptnpm i brime0.2.0
LangChainpip install langchain-brime0.2.2
MCP servernpx -y mcp-server-brime0.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

  1. Always import from the top-level package. from brime import Brime in Python, import { Brime } from "brime" in Node. Do not pull brime/sync_client or any sub-path.
  2. Use the async client when you have one. Python: from brime import AsyncBrime. Node SDK is async-by-default.
  3. 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.
  4. Treat 429 as "back off and retry". Read Retry-After from the response headers. Both SDKs handle this for you; do not add a second layer of retry around them.
  5. Use Idempotency-Key for /v1/extract and /v1/research. The SDKs auto-generate UUID4s; if you hand-roll HTTP, generate one yourself.
  6. Read credits_used from every response so the user can budget.
  7. Do not log the plain API key. Use the SDK's SecretStr wrapper (Python) or the equivalent log-redaction in your harness.

Choosing the right endpoint

User intentEndpointCredits
"Find URLs about X"POST /v1/search0.5
"Give me the full text of these pages"POST /v1/extract1 per URL
"Write me a researched answer with citations"POST /v1/research5
"Use Brime tools inside an LCEL chain"BrimeRetriever from langchain-brime0.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:

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