agno docs

Quickstart

Scaffold a new agno site in two commands, edit it with live reload, and produce a production build.

3 min read 578 words

This chapter assumes agno is installed. Creating a site, previewing it and building it for production takes about two minutes.

1. Scaffold a site

agno new blog
cd blog
agno dev

You should see:

Created blog

  cd blog
  agno dev

agno dev → http://localhost:1111  (2 pages, 12 ms)

Open http://localhost:1111 in a browser. agno new writes a working starter site: a home page, an about page, a blog post, the default templates, a stylesheet and agno.toml.

Non-empty directory

agno new refuses to write into a directory that already contains files and leaves it untouched. To overwrite what is there, pass --force: agno new blog --force.

2. Edit with live reload

While the dev server runs, edit anything under content/, templates/ or static/. agno notices the change, rebuilds only the affected pages and reloads the browser.

agno dev --port 3000

The default port is 1111. If it is taken, change it with --port.

First edit

Open content/blog/hello-world.md, change the title and save. The heading updates after a reload. Incremental builds mean only that page is rendered again.

3. Build for production

agno build
# Built 2 pages in 9 ms → ./dist

The output is in dist/ and is self-contained: HTML, CSS, JavaScript, RSS, sitemap, robots.txt and, if enabled, the search index. Upload it to any static host.

agno build --clean      # ignore dist/ and the cache, rebuild everything
agno build --minify     # collapse HTML whitespace and strip comments
agno build --drafts     # include pages with draft = true
agno build --stats      # print per-phase timings

4. Check the result

agno check
# Checked 2 pages and 2 internal links: no problems

agno check resolves every internal link and image against the files the build will produce. A broken link, a missing template or a page without a date exits with code 1, so it works as a CI gate.

What the starter contains

agno new writes:

blog/
├── agno.toml
├── .gitignore
├── content/
│   ├── _index.md
│   ├── about.md
│   └── blog/
│       └── hello-world.md
├── templates/
│   ├── 404.html
│   ├── base.html
│   ├── index.html
│   ├── page.html
│   ├── section.html
│   └── taxonomy.html
└── static/
    └── style.css

Every one of those files is yours to change or delete. templates/ and static/ are optional; agno falls back to the embedded defaults.

Command cheat sheet

GoalCommand
Dev serveragno dev
Different portagno dev --port 3000
Production buildagno build
Clean full buildagno build --clean
Minified HTMLagno build --minify
Preview draftsagno dev --drafts
Check linksagno check
Remove output and cacheagno clean

Ship it

Upload dist/ as-is. Netlify, Vercel, Cloudflare Pages, GitHub Pages or any web server will do. See Deployment for caching, CI and host-specific notes.

base_url

Before deploying, change base_url in agno.toml to your real address. Canonical links, the sitemap and RSS are built from it, and a value that does not start with http(s):// stops the build.

Next

Found a mistake? Open an issue or send a pull request.