Google Analytics, Vercel Web Analytics, Leadsy and the TikTok Pixel stay off until you accept. The help chat starts once you have chosen. The scheduling button starts once you have chosen. Read our Privacy Policy.

Skip to content
StellarFirmStellarFirm

Guides

AGENTS.md and llms.txt: make your code and site agent ready

How to write AGENTS.md for your codebase and llms.txt for your website so AI agents and answer engines can read them. StellarFirm is the worked example.

StellarFirm team4 min read

View as Markdown
On this page

Making a codebase and a website agent ready means giving AI systems a clear, short, accurate place to start: AGENTS.md for the repository and llms.txt for the website. This guide shows what each file contains, how to serve Markdown copies of your pages, and how the StellarFirm site does it, so you can copy the pattern.

What is AGENTS.md and what goes in it?#

AGENTS.md is a plain Markdown file at the root of a repository that tells coding agents how to work there. It is documented at agents.md and read by tools such as OpenAI Codex, and Cursor documents support for it too. Think of it as a README written for an agent.

Keep it short and verifiable. A reliable layout:

SectionContent
OverviewOne paragraph: what the project is and its main folders
SetupExact install and run commands
ChecksThe commands that must pass before a change is done
ConventionsStyle, naming, structure, patterns to repeat
BoundariesWhat not to touch, and when to ask first
Pull requestsSize, title format, what to put in the description

Nested folders can have their own file for local rules, and the closest file to the code usually applies. Link to deeper docs instead of copying them.

PromptGenerate a first AGENTS.md

Read this repository and write an AGENTS.md with sections for overview, setup, checks, conventions, boundaries, and pull requests. Use only commands you can verify in the repository, keep it under 80 lines, and list anything you could not verify at the end.

PromptAudit an AGENTS.md

Audit our AGENTS.md. Find commands that no longer work, rules that contradict each other, and sections that are too long. Propose a shorter version and show me the changes before saving.

What is llms.txt and what goes in it?#

llms.txt is a proposed convention, described at llmstxt.org, for a Markdown file at the root of your website that gives language models a concise map of the site. It is not a guarantee of visibility, and support varies by system, but it is cheap and it forces you to decide what matters.

The proposal suggests this shape:

  1. A title line with the site or product name.
  2. A short summary in a quote block.
  3. Sections of links, each with a one line description, pointing to the pages an agent should read.

Make every description a fact, not a slogan. An agent deciding whether to open a page reads that line.

PromptDraft an llms.txt

Draft an llms.txt for [website]. Start with the product name and a two sentence summary, then add sections for the main pages, documentation, pricing or plans, and contact. Give each link a plain one line description. Use only pages that exist, listed here: [list of URLs].

Why serve Markdown copies of pages?#

Agents read Markdown cleanly and HTML poorly. A Markdown copy strips navigation, scripts, and layout, so the answer to a question is a few hundred clean tokens instead of a noisy page.

Two common ways to serve it:

  • A parallel address, such as the same path with a .md ending.
  • Content negotiation: when a request sends an Accept header asking for text/markdown, answer with the Markdown version of the same page.

Do the two if you can. Keep the Markdown identical in substance to the page, because answer engines compare what they read with what is shown.

How does StellarFirm do it?#

StellarFirm's public site is made for agents, and every piece below is a stable, public address.

PieceWhat it gives an agent
/llms.txtA map of the site for AI systems
/agents.mdInstructions on when to use StellarFirm and how to reach it
/openapi.jsonThe public API as an OpenAPI file
/docsDocumentation pages, also available as Markdown
/mcpA public, read only MCP server

The public API is JSON with one error shape, so a program can tell what went wrong without reading a web page. See the API docs, and the MCP server page for how an agent can search the docs directly. Everything public is for reading and checking: anything that sends, deploys, or charges waits for a person's Approve inside the app.

How do I write for answer engines too?#

Answer engines quote pages that answer a question directly and clearly. A few habits help, and they help human readers as well.

  • Put a direct answer in the first two sentences under each heading.
  • Use question style headings that match how people ask.
  • Prefer tables and short lists for facts and steps.
  • State names, versions, and limits exactly, and cite official sources.
  • Date your pages and keep them current.

What is a good rollout order?#

Do the cheap, high value steps first.

  1. Write AGENTS.md and test it by giving an agent a small task.
  2. Write llms.txt from the pages you already want read.
  3. Add Markdown copies of your key pages.
  4. Add content negotiation for Accept: text/markdown.
  5. If you have an API, publish an OpenAPI file and one error shape.
PromptPlan agent readiness

Look at [website or repository] and give me a prioritized plan to make it agent ready. Cover AGENTS.md, llms.txt, Markdown copies of key pages, and API documentation. For each step say what to write, how to test it, and how long it should take.

If you work with a coding agent daily, pair this with Cursor and Codex tips and Claude Code tips.

Frequently asked questions

What is AGENTS.md?

AGENTS.md is a plain Markdown file in a repository that tells coding agents how to work there: setup, checks, conventions, and boundaries. It is documented at agents.md and read by several tools.

What is llms.txt?

llms.txt is a proposed convention, described at llmstxt.org, for a Markdown file at the root of a website that gives language models a concise map of the site with links to the key pages.

Do I need two files?

They solve different problems. AGENTS.md guides agents that work inside your code, and llms.txt guides AI systems that read your public site. A product with a website and a repository benefits from each.

Does llms.txt guarantee AI search visibility?

No. It is a convention, not a guarantee, and support varies by system. Clear content, good structure, and accurate facts matter most. Treat llms.txt as a helpful extra.

Sources