Skip to content
RehearsalDocs

Make an agent

Let Rehearsal write an agent for your application, harden it, prove it on jobs it has never seen, and hand it to you as a program you can run.

Time
15 to 60 minutes
Needs:
a published world version

You do not need an agent to start. The Agent Factory writes one for a published world, tests it the way Rehearsal tests any agent, improves it, and packages the best version with the proof that it works.

What it does

  1. Draft. The agent designer writes the agent's instructions and tool guidance from the world itself: its roles and tools, which changes are safe to retry, your policies, the research on how real people use the application, and the mistakes Rehearsal checks for.
  2. Rehearse. The draft runs every train and dev job, with the default stress layer on.
  3. Harden. The fix loop improves it round by round and keeps only versions that verify more without breaking a rule.
  4. Prove. The best version runs the holdout jobs, which nothing above has seen. When a round improved it, the draft runs beside it, so you see the gain.
  5. Package. A zip you download from the console, the CLI or the SDK.

Open the world and choose Make an agent. Give it a name and the number of rounds. The page that opens shows the draft, each round, and the held-out result. When it is done, choose Download the agent.

What is in the zip

FileWhat it is
agent.pyThe agent, as one Python program. It runs on NVIDIA Nemotron through Nebius Token Factory and calls your application's real API
agent.jsonIts instructions, and each tool with the HTTP request it makes
PROOF.mdIts scores on train, dev and holdout jobs, how each round went, and the failure causes that remain
README.mdHow to run it
pip install openai httpx
export NEBIUS_API_KEY=...
export APP_URL=https://your-app.example
export APP_AUTH="Authorization: token ..."
python agent.py

You type as the customer. The agent uses only the tools of its role, and it asks you before every change it makes in your application. Set CONFIRM_WRITES=0 only when you trust it.

It acts on your real application

The agent was proved on a sandboxed copy of your application, with fictional data. The program you download calls the address in APP_URL. Give it an account with only the permissions of its role, start with a staging copy, and keep CONFIRM_WRITES on until you have watched it work.

After that

  • Keep the agent's instructions in your repository and add the CI gate, so a change that makes it worse fails its pull request.
  • When your application has a new release, build a new world version and make or fix the agent again.

Next

Checked against rehearsal-kit 0.1.4 on 27 October 2026.

Was this page helpful?

Edit this page

On this page

Was this page helpful?

Edit this page