Guide: make an explainer page
Agents can build pages that explain something at a glance: steps in cards, a Mermaid flowchart, a key number. This guide shows one prompt and every tool call an agent made for it, with Lyra’s real answers.
The prompt
Section titled “The prompt”Make a Lyra page for new engineers that explains how a change gets from a pull request to production. Show the three steps as cards, add a flowchart, and show that the median time from merge to production is 9 minutes.
What the agent does
Section titled “What the agent does”| Step | Tool | Why |
|---|---|---|
| 1 | blocks_guide |
Learn the Markdown for Lyra’s cards, columns, arrows, numbers and diagrams |
| 2 | create_page |
Create the page from Markdown in one call |
| 3 | edit_blocks |
Fix anything the answer warns about, by block id |
| 4 | export_page |
Download the page as HTML to see how it looks |
| 5 | Give you the link |
1. Read the blocks guide
Section titled “1. Read the blocks guide”blocks_guide takes no inputs. It answers with the rules for rich pages, including this table:
| What you need | Markdown |
|---|---|
| A box around a few blocks | :::card ... ::: |
| A numbered step, or an option with a name | :::card{label="1" color="blue"} ... ::: |
| Blocks side by side | :::columns, then one :::column ... ::: per column, then ::: |
| An arrow down to what comes next | ::arrow, or ::arrow[after the bank confirms] |
| What happened when | :::timeline, then one ::item[What happened]{label="3 Nov"} per row, then ::: |
| One big number with what it counts | ::stat[bills stuck]{value="5" color="red"} |
| A flowchart or sequence diagram | A ```mermaid code block |
| Anything else: a custom diagram, animation or simulation | A ```html-block code block |
Markdown and directives has the full syntax, Blocks shows how each block looks, and HTML blocks covers what an HTML block can hold.
2. Create the page
Section titled “2. Create the page”The agent calls create_page with a title, an icon and this Markdown:
How a pull request gets to production, in three steps.
:::columns:::column:::card{label="1" color="blue"}**Review.** A teammate reads the change and leaves comments.:::::::::column:::card{label="2" color="blue"}**Checks.** Tests and lint run on every push.:::::::::column:::card{label="3" color="green"}**Deploy.** Merging to main ships it within 10 minutes.:::::::::
::arrow[once it's merged]
```mermaidflowchart TD A[Pull request] --> B{Review and checks pass?} B -- yes --> C[Merge to main] B -- no --> D[Fix and push again] D --> B C --> E[Deploy]```
::stat[median time from merge to production]{value="9 min" color="green"}{ "title": "How a change gets to production", "icon": "🚀", "markdown": "How a pull request gets to production, in three steps.\n\n:::columns\n..."}With no parentId or teamspaceId, the page goes in your private pages. Lyra answers:
{ "id": "01a2380b-adac-7754-8269-801be96f84aa", "title": "How a change gets to production", "expiresAt": null, "built": { "columns": 1, "column": 3, "card": 3, "arrow": 1, "mermaid": 1, "stat": 1 }, "warnings": []}builtcounts the blocks other than plain text that the Markdown made. The agent wrote three cards, three columns, an arrow, a diagram and a number, and all of them are there.warningsis empty, so Lyra read every line the way the agent meant it.
3. Fix what the answer warns about
Section titled “3. Fix what the answer warns about”Later, the agent adds a card with a color Lyra doesn’t have:
{ "pageId": "01a2380b-adac-7754-8269-801be96f84aa", "edits": [{ "op": "insert", "markdown": ":::card{color=\"teal\"}\n**Rollback.** Revert the merge commit.\n:::" }]}The card is added, but the answer says it isn’t teal:
{ "ok": true, "edits": [ { "op": "insert", "blockIds": ["c326bd1e-16a9-458c-8429-43ac36278bd2"], "built": { "card": 1 }, "warnings": [ { "line": 1, "message": "color=\"teal\" isn't one of default, gray, blue, green, yellow, orange, red, purple, pink, so :::card uses default." } ] } ]}The answer has the new card’s block id, so the agent replaces it without reading the page again:
{ "pageId": "01a2380b-adac-7754-8269-801be96f84aa", "edits": [ { "op": "replace", "blockId": "c326bd1e-16a9-458c-8429-43ac36278bd2", "markdown": ":::card{color=\"orange\"}\n**Rollback.** Revert the merge commit.\n:::" } ]}This time warnings is empty.
4. Check how it looks
Section titled “4. Check how it looks”export_page answers with a link that works for 15 minutes, and a command to download the page:
{ "pageId": "01a2380b-adac-7754-8269-801be96f84aa", "theme": "dark" }{ "downloadUrl": "https://app.lyra-docs.com/api/pages/export?pageId=01a2380b-…&theme=dark&expires=…&signature=…", "expiresAt": "2026-12-02T19:23:50.020Z", "command": "curl -sS --fail-with-body -o page.html 'https://app.lyra-docs.com/api/pages/export?…'"}The file draws the page with Lyra’s styles, Mermaid diagrams included. An agent that can run a browser opens it, takes a screenshot in the light and the dark theme and at a phone’s width, and fixes what looks wrong. When everything has drawn, <html> has data-lyra-ready="true".
5. Share the link
Section titled “5. Share the link”The page’s link is https://app.lyra-docs.com/p/<id>, with the id from create_page. Sharing the page with people is up to you: agents can’t share pages.
Tips for your prompts
Section titled “Tips for your prompts”- Say who it’s for and what they should take away. “For new engineers, so they know who to ask when a deploy fails” gets a better page than “explain deploys”.
- Name the blocks you want if you have a picture in mind: cards for steps, a timeline for what happened when, a number for the one figure that matters.
- Ask for Mermaid for flowcharts and sequence diagrams. A chart shrinks to fit the page, so ask for top-to-bottom flowcharts with short labels.
- Ask for an HTML block for anything Lyra’s blocks can’t draw, such as a chart from your numbers or a small simulation you can click through.
- Long documents go in with
upload_markdown: the agent writes the file on your computer and sends it, up to 1,000,000 characters. See good practices.