Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ
Browse docs

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ

Docs for agents

Let an agent set Expand up from start.md, and give an agent Expand's docs as Markdown, one page or all of it.

Every Expand doc is readable by an agent. Hand it the file for the job: a setup guide, an index, the whole docs bundle, or one page as Markdown.

Which one should I use?

NeedUse
Set up Expand in a coding agent/start.md
First orientation
/llms.txt
The docs table of contents/docs/llms.txt
Every docs page, in one pull/docs/llms-full.txt
One docs pageThe page's URL with .md added
One API reference page, with exact schemasThe page's URL with .md added, under /api-reference/
Note
These files are for agents and tools you point at Expand's docs: coding agents, IDE assistants, and MCP clients. They are not a signal to AI search engines.

start.md

https://expand.ai/start.md is the setup guide for coding agents. It holds the whole procedure in one document, served as text/markdown and never cached, so an agent fetches it once and starts. Paste this into any coding agent:

Read https://expand.ai/start.md and set up Expand. Fetch it as raw text with curl. A summarizing web-fetch tool drops the exact commands.

The same prompt is at the end of /llms.txt. The Copy setup prompt button in the app produces it too, with a fresh single-use setup token attached, so the agent can authorize setup without a browser step.

Warning
The second sentence matters. Some web-fetch tools return a summary of a page instead of its text, and a summary of a procedure loses the commands.

What the guide walks the agent through:

SectionWhat the agent does
Fastest pathAdds the hosted MCP server, https://api.expand.ai/v1/mcp, when the user only wants fetches. Then stops.
SetupNames the agent it is running in, runs expandai init --detect --json, asks which agents to configure, and runs one expandai init with --harnesses, --scope, and --json.
AuthorizationPasses the setup token when the prompt carried one. Otherwise relays the browser URL and code from , and runs the same command again once the user approves.

The exact commands live in the guide. init configures only the agents the user picks and leaves the rest alone. What each agent receives is on CLI: Commands.

Use the guide whenever you want Expand set up in a coding agent. Use Connect your agent (MCP) when you would rather add the hosted server by hand.

Note
expand://start is an MCP resource that points at /start.md and carries the same prompt. The hosted MCP server always serves it. A local expandai mcp run serves it only with --docs. See MCP tools & resources.

llms.txt

/llms.txt is a short, hand-written entry point. It links the start guide, the docs, the API reference, and the full docs bundle, and ends with the setup prompt above. Give it to an agent that needs to find its way around before it does anything.

/docs/llms.txt is a different file. It is generated from the docs and lists every docs page as a Markdown link with the page's title and one-line description. Give it to an agent that needs a table of contents. It does not list API reference pages.

llms-full.txt

/docs/llms-full.txt is every docs page as Markdown, one after another. Each page opens with a heading that carries its title and canonical URL, then the page body, then a --- rule before the next page, so an agent can cite or revisit the source page.

# Quickstart (https://expand.ai/docs/quickstart)

...

---

# Fetching a URL (https://expand.ai/docs/fetch/fetching-a-url)

...

Use it when the agent needs the docs as a whole and has the context budget for them. It does not contain the API reference, and it can be too large for a small context window.

Recommendation
For one topic, give the agent that page's .md URL instead of the bundle.

Any page as Markdown

Every docs page and every API reference page is available as Markdown. Append .md to the URL.

PageMarkdown
/docs/quickstart/docs/quickstart.md
/api-reference/fetch/fetch.fetchJson/api-reference/fetch/fetch.fetchJson.md
curl https://expand.ai/docs/quickstart.md

The response is text/markdown. It opens with the page title and its canonical URL, then the content with code blocks, tables, links, and all tab examples in plain Markdown. Interactive examples have static instructions in the Markdown export. API endpoint pages include request and response schemas from the OpenAPI document. .mdx in the URL returns the same thing.

# Quickstart (https://expand.ai/docs/quickstart)

...

A tool that can set request headers can ask the human URL for Markdown instead, with Accept: text/markdown. This works for /docs and /api-reference pages, not for every route on the site.

curl -H "Accept: text/markdown" https://expand.ai/docs/quickstart

On every docs page, the Copy as Markdown button copies the same Markdown the .md URL serves, and its menu opens the page in ChatGPT or Claude, or shows the Markdown itself.

Giving pages to an agent

One .md page when the agent needs help with one feature. Two or three when the task spans a workflow. The full bundle only when it needs everything.

Read these Expand docs before answering:

- https://expand.ai/docs/fetch/fetching-a-url.md
- https://expand.ai/docs/highlights/two-ways-to-highlight.md

Then explain how to build a research agent whose answers carry citation links.

The docs explain how to use Expand. The API reference holds the exact request and response schemas, parameters, and errors. When the agent needs that precision, give it the API reference page's .md URL.

Guidance for agents

  • Prefer the current Markdown docs over memorized behavior.
  • Use the API reference for exact request and response shapes.
  • Read one .md page before pulling the full bundle.
  • Do not assume an endpoint, CLI flag, SDK method, or schema exists unless the docs show it.
  • Cite and revisit a page by the canonical URL in its Markdown heading.

Next steps

  • Connect your agent (MCP): add the hosted MCP server to a coding agent by hand.
  • CLI: Skill & hooks: what start.md installs, and what the Skill teaches.
  • Quickstart: run one Fetch.
  • API reference: the exact endpoint schemas, parameters, and errors.
PreviousMCP tools & resources
NextErrors & retries

On This Page

Which one should I use?start.mdllms.txtllms-full.txtAny page as MarkdownGiving pages to an agentGuidance for agentsNext steps
authorization_required
Confirm Expand worksRuns one expandai fetch --highlights against a live page and answers with the exact captured sentence and its citation link.
Next stepsSays which agents to restart, offers a first fetch, and offers to set up the TypeScript SDK when the conversation is inside a project.
Beyond agent setupThe SDK, the HTTP API, and the CLI, for callers that are not coding agents.