Getting Started

Your first design with an agent

This article makes the same card as Your first design, but you describe it and an agent draws it. The agent works in the document you have open, you watch the card appear, and nothing is final until you accept it. The skill to learn is not the tools but the brief: the more exact your words, the less you fix afterwards.

Before you start#

  • Nox Pro. The tools an agent uses are part of it.
  • A connected agent. Claude Code, Claude Desktop, Gemini CLI or another MCP client, set up once with Nox › Copy MCP Setup or Nox › Copy Claude Code Command. See Connect an agent. Or ask from the pill with your own key: see Claude inside Nox.
  • A screen. Make the 390 × 844 Home frame of step 1 of the first design, fill it with F4F5F8, and select it. The agent reads your selection, so "the selected frame" means this one.

A good first prompt#

Say what to make, its size and place, its structure, and every value you care about. Ask for a check at the end.

With an agent
In the selected Home frame, make a card at x 24, y 120, 342 wide, its height hugging its content.
White, radius 20, a column with 24 padding and a 12 gap, and a shadow of 0, 8, blur 24 in #0F172A at 12%.
Inside, from the top:
- "Weekly summary" in Inter 20 semibold, #111827
- "You closed 12 tasks this week, 3 more than last week." in Inter 15 on a 22 line, #5B6472, filling the card's width
- a "View report" button that hugs its label: padding 12 by 20, radius 12, fill #2563EB, label in Inter 15 semibold white.
Name the layers Card, Title, Body, Button and Label. Run check_design on the card when you are done.

The agent answers with the calls below, then tells you what it made and what the check found.

Why this works:

  • A size and a place in numbers. "A card" gives the agent nothing to answer to. 342 at x 24 sits inside the 390 screen with 24 on each side.
  • Structure, not positions. "A column with 24 padding and a 12 gap" makes auto layout, so the card grows with its text. Children of a layout need no x and y.
  • Type and color as values. A family, a weight, a size and a hex for each text. Leave them out and the agent picks for you.
  • Names. Named layers are easy to find, to review and to ask about later ("make the Button full width").
  • A check. check_design finds text that is hard to read, things too small to tap and layers cut off, before you look.

What the agent does#

First it asks where you are, with get_context. The reply names the page, the view and what you have selected:

{
  "active_page": "2075604986:1",
  "document": {"nodes": 2},
  "pages": [{"id": "2075604986:1", "name": "Page 1", "top_level_nodes": 1}],
  "selection": [{"id": "2075604986:2", "kind": "frame", "name": "Home"}],
  "view": {"center_x": 195, "center_y": 422, "zoom": 0.5}
}

Then it draws the whole card in one call to create_nodes, with the selected frame as parent. The ids in your document will differ.

{
  "parent": "2075604986:2",
  "nodes": [
    {
      "kind": "frame", "name": "Card", "x": 24, "y": 120, "width": 342, "height": "hug",
      "fill": "#FFFFFF", "corner_radius": 20,
      "layout": {"direction": "vertical", "gap": 12, "padding": 24},
      "shadow": {"x": 0, "y": 8, "blur": 24, "color": "#0F172A1F"},
      "children": [
        {"kind": "text", "name": "Title", "text": "Weekly summary", "font_family": "Inter", "font_size": 20, "font_weight": 600, "fill": "#111827"},
        {"kind": "text", "name": "Body", "text": "You closed 12 tasks this week, 3 more than last week.", "font_family": "Inter", "font_size": 15, "line_height": 22, "fill": "#5B6472", "width": "fill"},
        {
          "kind": "frame", "name": "Button", "fill": "#2563EB", "corner_radius": 12, "width": "hug", "height": "hug",
          "layout": {"direction": "horizontal", "padding": [12, 20], "align": "center", "cross_align": "center"},
          "children": [
            {"kind": "text", "name": "Label", "text": "View report", "font_family": "Inter", "font_size": 15, "font_weight": 600, "fill": "#FFFFFF"}
          ]
        }
      ]
    }
  ]
}

The reply lists the five new layers and their ids. Last, it calls check_design with the card as root, and the card passes:

{"checked": "2075604986:3", "counts": {}, "findings": [], "total": 0}
Note

An earlier draft of this card used a brighter blue, #2F6BFF. check_design flagged its white label at a contrast just under the 4.5 to 1 that ordinary text needs. #2563EB passes with room to spare. This is what the check is for.

What the review shows#

The card appears on the canvas as the agent makes it. When the agent stops, the turn waits for you:

The card the agent made, tinted until it is reviewed, with the review bar in the pill
The card the agent made, tinted until it is reviewed, with the review bar in the pill
  • On the canvas, what the turn made has a soft warm tint and a thin outline.
  • In the pill, the review bar counts it: 5 made, the card and the four layers in it. When a turn also changes or removes layers, the bar counts those too.
  • On the rail, History has a dot. Open it to see the agent's steps listed as Claude, with Show to select what each touched.

Look at the card at 100% before deciding. Check what a check cannot: that the hierarchy reads at a glance, that the shadow is soft and not muddy, that the button looks like the most important thing on the card.

Accept or Revert#

The review bar: 5 made, Revert all and Accept
The review bar: 5 made, Revert all and Accept
  • Accept (or Return) keeps the turn. The tint goes, and the card is part of your design like anything you drew.
  • Revert all (or ⌘Z) takes the whole turn back, however many calls it was.

Even after you accept, the agent's last step can be taken back from History with Revert. And before an agent's first change in a sitting, Nox keeps a version named Before Claude in History, so you can always restore the document as it was. See How agents work in Nox.

Iterate in small turns#

Once the card is accepted, ask for one change at a time, each its own turn to accept or revert:

Make the Button fill the card's width, and center its label.
Add a 12 pt uppercase label "THIS WEEK" above the Title, in #5B6472 with 0.5 letter spacing.

Small turns are easy to judge and cheap to undo. One long prompt that changes ten things gives you one turn to accept or revert as a whole.

Next#