# Pages

> Write Markdown pages with frontmatter, edit them safely alongside agents, and restore any of their last 50 revisions.

A page is a Markdown file under `wiki/`. You and your agents edit the same
files, and Cozy keeps their history.

## Create a page [#create-a-page]

In **Wiki**, choose **+ New page**. Enter a **Title**, a **Path** such as
`wiki/projects/billing.md`, and the **Markdown**, then choose **Create**. If a
page already lives at that path, Cozy asks you to open it or choose another
path.

Paths can't contain invisible or direction-changing characters, and two pages
can't have paths that differ only in letter case.

## Frontmatter [#frontmatter]

Start a page with frontmatter so people and agents know what it is:

```markdown
---
type: project
description: The billing rewrite. Read before changing invoices.
aliases: [Billing v2, Ledger]
tags: [finance]
status: active
as_of: 2026-11-01
owner: "[[wiki/people/ann.md]]"
---
# Billing
```

| Key | Meaning |
| --- | --- |
| `type` | What kind of page it is, such as person or project |
| `description` | One line saying what the page is |
| `aliases` | Other names that should find this page |
| `tags` | Labels you can filter the graph by |
| `status` | Where the thing the page describes stands |
| `as_of` | When the content was last known to be true |

Cozy also reads these keys from a nested `metadata:` block. Any other key
whose value is a wikilink, like `owner` above, becomes a typed relation. See
[Links and graph](/docs/wiki/links-and-graph).

Health flags pages without a `type` or `description`.

## Edit a page [#edit-a-page]

Open the page and choose **Edit page**, then **Save changes**. Every edit is
checked against the revision it started from, so two people or agents can't
silently overwrite each other. If someone saved first, Cozy keeps your draft
and says so. Review the newer revision in **History**, then choose **Use
latest revision** to save your draft over it.

Agents work the same way: a write sends the `expectedRevision` it read, `0`
for a new file, and gets a conflict if the page changed. They can also
replace exact pieces of text with `cozy_edit`, or add to the end of a page or
section with `cozy_append`, without resending the whole page.

## History and restore [#history-and-restore]

Choose **History** on a page to see its last 50 revisions. **Restore** brings
an earlier revision back as a new revision, so nothing is lost.

## Move a page [#move-a-page]

Choose **Move page** and enter the **New path**. The page keeps its history.
Links to the old path aren't rewritten: update the pages that link to it.
Agents moving a page with `cozy_move` get back the links that need repair.

## Delete a page [#delete-a-page]

Choose **Delete**. The page leaves the wiki, but Cozy keeps a tombstone and
its last 50 revisions, so an agent can bring it back with `cozy_history` and
`cozy_restore`. Agents can't erase anything for good.

## Export a page [#export-a-page]

Choose **Export** to download the page as a Markdown file.

## Size limits [#size-limits]

- A page, skill or agent note can be up to 90,000 bytes.
- A source can be up to 1,500,000 bytes.

For long material, import it as a source and write a shorter page that cites
it. Health flags oversized pages.

