---
url: https://script-ui.runio.dev/guide/ai-assistant.md
description: >-
  How to let an AI assistant write tools: the page that the package brings for
  it, the lines for AGENTS.md, Laravel Boost and Symfony AI Mate, and what a
  trial with ten tasks showed.
---

# With an AI assistant

An assistant has not seen this library when it was trained, so it has to read before it writes. The package brings what it needs: [`docs/on-one-page.md`](https://script-ui.runio.dev/reference/on-one-page.md) has the rules, every function with its arguments and one whole tool. The tests of the library hold that page against the code, so it names no function and no argument that is not there.

**Tell the assistant that the page is there.** Put these lines into the file that your assistant reads in every session, such as `AGENTS.md` or `CLAUDE.md`:

```markdown
## Internal tools

The scripts in `tools/` are internal tools made with runio/script-ui. Before you write or change one, read `vendor/runio/script-ui/docs/on-one-page.md`. It has the rules and every function. A function that is not on that page does not exist.
```

Then ask for a tool as you would ask a colleague: "Write a tool that finds the orders of a customer and refunds the ticked ones."

**Laravel Boost** tells the assistant the same by itself. The package has lines for it in `resources/boost/guidelines/core.blade.php`: they point at the page too, and they add the rules that matter most. `php artisan boost:install` lists `runio/script-ui` among the third-party guidelines. Tick it, and Boost writes the lines into the instruction file of your assistant.

**Symfony AI Mate** asks nothing. The `composer.json` of the package names the same text under `extra.ai-mate`, and `vendor/bin/mate discover` writes it into `mate/AGENT_INSTRUCTIONS.md`.

Both were tried with a fresh application: Laravel 13 with Boost 2.10, and Symfony 8.1 with AI Mate 0.15.

**Read what it wrote.** A tool is short, so that takes a minute. Look at three things: that data changes only inside `if (button(...))`, that a button asks first when its work cannot be undone, and who may open the tool (`allow:`).

**How much the page helps was tried**, with ten small tasks and two models. [`e2e/assistants/README.md`](https://github.com/RunIO-dev/runio-script-ui/blob/main/e2e/assistants/README.md) has the tasks, the checks and the counts.

## What a trial showed

Ten small tools were asked of an assistant that had never seen the library: a form that says what is wrong under its fields, a CSV import, a page with tabs, a task that takes long and six more. Each task went to two models in three ways: without the help, with the page in the package, and with the page and the lines above. A browser used every tool that came back. A tool counts when it passes every test of its task.

| Model | The help | Tools that work | Tokens read | Cost of a tool |
|---|---|---|---|---|
| Sonnet 5.5 | none | 10 of 10 | 146,000 | $0.19 |
| Sonnet 5.5 | the page | 10 of 10 | 82,000 | $0.10 |
| Sonnet 5.5 | the page and the lines | 10 of 10 | 48,000 | $0.07 |
| Haiku 5.5 | none | 8 of 10 | 157,000 | $0.012 |
| Haiku 5.5 | the page | 10 of 10 | 142,000 | $0.012 |
| Haiku 5.5 | the page and the lines | 9 of 10 | 43,000 | $0.004 |

* With the help, 39 of 40 tools worked at the first try. Without it, 18 of 20. That difference is small, and with one run for each cell it can be chance.
* The stronger model wrote ten working tools either way. What the help changed for it is the effort: with the lines it read a third of the tokens, and a tool cost 7 cents where it had cost 19.
* The three tools that failed have the same mistake: a function that is called and not imported with `use function`. It is the first thing to look for when a tool of an assistant ends in an error.

The trial ran on 2026-11-28 with Claude Code, and the assistants could run nothing: a tool had to be right as it was written. Tokens and cost are the median of ten runs. [The notes of the trial](https://github.com/RunIO-dev/runio-script-ui/blob/main/e2e/assistants/README.md) have the tasks, the checks, every run, and what such a trial cannot say.

## On the web

An assistant that reads the web finds the same texts here, as plain markdown:

* [`/llms.txt`](https://script-ui.runio.dev/llms.txt) lists the pages of this site, and names the page to read first.
* /reference/on-one-page.md is that page: [Script UI on one page](https://script-ui.runio.dev/reference/on-one-page.md).
* [`/llms-full.txt`](https://script-ui.runio.dev/llms-full.txt) holds every page of the site in one file.
* Every page is there as markdown too. Put `.md` in the place of `.html`.

The page in the package is the one that fits the version you installed. This site describes the newest one.
