# Testing, delivery, and install

> What the test card tells you, what the saved draft is, and how an admin turns a request into a running agent.

Source: https://openap.org/docs/agent-builder-deliver

A build ends in three things: a test you watched, a draft you keep, and — if you ask — a request an admin
decides. This page is the second half of [Your first custom agent](https://openap.org/docs/agent-builder-first-agent),
for when you want to know exactly what each of those means.

## The test card

The **Test** stage runs the new agent as a real session, the same way it would run after install, under the
same guards. The card on the page is the builder's own reading of that session:

| The card says | What is true |
| --- | --- |
| **Not started** · a start button | No test session yet. The button (**Start the test**, or the builder's own wording for it) opens one, embedded on the page, with a few example requests to try. |
| **Running since** *time* | The test is live and the builder is watching it. Below the chat, when the builder put them up: **Done testing**, **That's not right**, **Stop the test** — each of which you can also just say. |
| **Waiting on you since** *time* | The agent under test asked you something and is parked until you answer, in its chat. |
| **Still running; I stopped watching at** *time* | The builder's watch timed out but the session is still up. **Keep watching** picks the same test back up. |
| **Ended at** *time* | The session finished or was stopped. The first line says how many messages you sent and which tools it called; **Start a fresh test** opens a new one. |

**Done testing** is a report, not a verdict: the builder reads the test's log — what tools were called, with
what, and what came back — and tells you what the agent actually did before asking whether that looked right.
**That's not right** starts from what you expected versus what happened and routes the fix to the stage that
owns it (a missing tool, a permission that was too tight, a prompt that read the request wrong), then offers
another test.

![Test: a real session of the new agent embedded on the page, with the builder watching what it does.](https://openap.org/media/builder-test.png)

## The saved draft

**Deliver** always exports the draft first, whether or not it is installed. What you get is a `.oap` bundle —
the same [packaging](https://openap.org/docs/packaging-oap) every agent here ships as — attached to the conversation and offered on
the page as a download. It carries the agent's definition, its tools, its skills, and the questions an install
must answer. It carries **nothing of your accounts**: a bundle declares the credentials it needs and never their
values.

Because it is a complete bundle, it is portable in the ordinary sense. **Hand the draft to someone** is exactly
that — send them the file; they can install it with `oap agent install`, or ask an admin to. The workshop it
was built in is not part of the draft and does not need to exist any more.

![Deliver: a saved copy of exactly what was tested, and three choices — install for real, hand the draft to someone, test again.](https://openap.org/media/builder-deliver.png)

## Install for real

**Install for real** records a request; it does not install anything. The request carries a suggested name
for the agent and the digest of the draft as tested, and it waits for a platform admin. The builder tells you so
in plain terms — it is someone else's decision to make — and marks the Deliver stage accordingly.

The admin sees the request under **Workshops** in the [admin console](https://openap.org/docs/admin-activity) alongside the other
open workshops: who started the build, what phase it is in, and the state of the request.

![The admin console lists every open workshop — who started it, its phase, and any install request waiting on it.](https://openap.org/media/admin-workshops.png)

**Install** asks for the namespace the agent should land in — plus any install-time questions the draft
declares, the same ones `oap agent install` would ask — and applies the draft there:

![Install asks for the namespace the agent should land in, plus any install-time questions the draft declares.](https://openap.org/media/admin-workshops-install.png)

**Decline** ends the request instead. Either way the person who asked is told, and either way the saved draft
stays theirs. Once installed, the row records where the agent landed:

![Installed: the row records where the agent landed; the person who asked is told.](https://openap.org/media/admin-workshops-installed.png)

> **Security: The install boundary**
>
> Installing is the one action that crosses from the workshop into the cluster, and it is the one action the
> builder cannot take. The request is decided by whoever holds the console's install permission, against the
> draft exactly as it was tested — the digest in the request is the digest of the export. A rehearsed hand-off
> to another agent (a practice double in the workshop) works after install only if a real agent of that name
> exists where the new one lands; the builder says so before you confirm.

## After a decision

An installed agent lives in its target namespace like any other; the workshop that built it is released. A
declined request ends the same way — the workshop is released once the session ends and the request has a
decision, and the draft is still on the page and in the conversation for as long as the session's records
are kept. See [Workshops and limits](https://openap.org/docs/agent-builder-workshops) for what "released" means and when it happens.
