# Configuration

> onto.config.ts — every field, the llms.txt it generates, and the JSON-LD page types.

Source: https://docs.buildonto.dev/sdk/configuration
Section: Serve SDK

---

Configuration\[01\]

## Configuration

`onto.config.ts` — written for you by `onto-next init`. It describes your site to agents: it becomes your `llms.txt`, and feeds the JSON-LD OntoProvider adds.

### Try it

\[02\]

Edit the config and watch the llms.txt it builds:

namesummarybaseUrl

routes

\+ route

onto.config.ts

import type { OntoConfig } from '@ontosdk/next/config';

const config: OntoConfig = {
  name: 'Acme',
  summary: 'Payment infrastructure for the internet.',
  baseUrl: 'https://acme.com',
  routes: \[
    { path: '/', description: 'Homepage and product overview' },
    { path: '/pricing', description: 'Plans and what each includes' },
    { path: '/docs', description: 'Developer documentation' },
  \],
  externalLinks: \[{ title: 'Status', url: 'https://status.acme.com' }\],
  sections: \[{ heading: 'Contact', content: 'support@acme.com' }\],
};

export default config;

/llms.txt

\# Acme

> Payment infrastructure for the internet.

### Key Routes

- \[/\](https://acme.com/): Homepage and product overview
- \[/pricing\](https://acme.com/pricing): Plans and what each includes
- \[/docs\](https://acme.com/docs): Developer documentation

### Resources

- \[Status\](https://status.acme.com)

### Contact

support@acme.com

### Every field

\[03\]

FieldTypeBecomes

`name`string · requiredThe llms.txt title, and the AboutPage name

`summary`string · requiredThe llms.txt quote under the title, and the AboutPage description

`baseUrl`string · requiredThe prefix for every route link. The build warns while it's still example.com

`routes`{ path, description, pageType? }\[\]The Key Routes list, and which pages get JSON-LD

`externalLinks`{ title, url, description? }\[\]A Resources list

`sections`{ heading, content }\[\]Extra sections, each under its own heading

`organization`{ name, description?, url?, logo?, foundingDate? }The Organization inside the About page's JSON-LD

Nothing has a default: leave a list out and its section is left out.

### Where it's read

\[04\]

Read byHowWatch for

Build CLIImports it to write `public/llms.txt`If the import fails it falls back to a simpler read that keeps only name, summary, baseUrl and route paths and descriptions

MiddlewareOnly what you pass as `ontoMiddleware(req, config)`Serves a fresh `/llms.txt` to agents, `?onto` and Markdown requests; the scaffolded middleware already passes it

OntoProviderOnly the `config` propUses routes' pageType and organization for JSON-LD

**Don't delete it.** The scaffolded `middleware.ts` imports `./onto.config`, so removing the file breaks the build.

### Page types

\[05\]

pageTypeOntoProvider adds

`about`An `AboutPage`, with your `organization` inside it

`scoring`A fixed `HowTo` describing Onto's own scoring method — only meaningful on an Onto site

`default`Nothing. Also what you get when pageType is left out

Routes match by exact path — `/blog/*` never matches. There's no way to supply your own JSON-LD through the config; for that, write the `<script type="application/ld+json">` yourself. More on [OntoProvider](/sdk/provider).

Copy as Markdown[](/sdk/configuration.md "Open the raw Markdown")

---
## Structured Data (JSON-LD)
```json
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Onto Docs",
  "url": "https://docs.buildonto.dev",
  "description": "How to use Onto: serve AI agents Markdown from your Next.js site, call the Read API, connect over MCP, and read the AIO score.",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Onto",
    "url": "https://buildonto.dev"
  }
}
```