> ## Documentation Index
> Fetch the complete documentation index at: https://docs.within.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate, run and maintain an agent

> Test an agent before release, run it until people rely on it, and keep it current as the work changes.

Finishing the build is half the job. After it, an agent has to pass its tests, get through a pilot and be adopted in real work, then stay current as the work changes. This page covers all three.

## Validate before release

An agent is ready when the evidence says so, not when the build is finished.

**Set the bar first.** Before the first test runs, write these into the agent specification so the results are judged against a bar nobody moved:

* **The evaluation threshold** the agent has to meet.
* **Autonomy for each action**: what it may do on its own, what it drafts for a person, and what it never does.
* **Red lines**: actions it must refuse.

**Test against the work it will meet**, using approved test data, and keep the evidence for every result:

* **Ordinary cases.** Real, resolved cases from the process. Their history becomes the evaluation set.
* **Edge cases.** The exceptions and variations your Work Brain shows actually happen.
* **Missing, late or changed inputs**, and **malformed inputs** it can't parse or that contradict each other.
* **Requests it should refuse.** Anything past its red lines or its authority.

**Pilot it on real work**, with a person in control:

**1. Shadow**

The agent runs on real work alongside the people doing it. Its output is compared, not acted on.

**2. Assisted**

The agent prepares the work and a person approves it before anything happens. Anything customer-facing stays draft-with-approval.

Measure the pilot on a scoped version of your target metric, and agree in advance what would make you pause it.

**Release when quality, controls, acceptance and operation all pass**, and let the accountable approvers decide. If anything fails, hold the release, fix what's blocking it and run the acceptance tests again.

### Skills built by business users

Skills follow a lighter version of the same discipline:

* The builder approves the outline before the package is written.
* The package is tested with ordinary cases, missing inputs, conflicting evidence and requests it should refuse, and the builder reviews that evidence before installing it.
* A small review group decides what's safe to share and names an owner.
* Every shared skill records its owner, version and evaluation set.

How to build one is in [Build a skill](https://docs.within.ai/user-docs/deliver/within-mcp.md#build-a-skill).

## Run in production

Deployed isn't the same as adopted. An agent counts as live when real, eligible work succeeds through it again and again, people know how to work with it, and every exception has somewhere to go.

Agree these six conditions with the people who'll accept them, and set the thresholds and the observation window before release:

1. **Real work reaches the agent.** An authorized live scope, the production version, and real cases you can trace. *Accepted by the AI Builder & Deployer, with the Functional Champion.*
2. **Authority is clear.** Action limits, enforced human approvals, and release authorization. *Accepted by the release or control authority.*
3. **Outputs are usable.** Representative live quality, provenance, corrections and completion evidence. *Accepted by Process Performers, with the Functional Champion.*
4. **Exceptions have an owner.** A named queue, a response window, a tested takeover, rollback and reconciliation. *Accepted by the operator, with the process owner.*
5. **People can sustain it.** People do the task and handle exceptions on their own, with a job aid, support and repeat use. *Accepted by the Functional Champion, with Process Performers.*
6. **The customer sees the benefit.** A comparable baseline and live measures, adoption, full costs and limitations. *Accepted by the business outcome owner or Executive Sponsor.*

The first five make the agent **live and adopted**. The sixth is **value verified**: the customer accepts the measured benefit. See [Measure the value](https://docs.within.ai/user-docs/deliver/measure-the-value.md).

**Raise autonomy step by step.** Start with more human review than you think you need, and reduce it only when testing and production evidence support it. Keep a person's approval for any action that's irreversible, regulated or expensive to correct, keep monitoring on, and keep a way to switch the agent off.

**When it isn't sticking**, because live work isn't succeeding repeatedly or people are working around the agent, fix the workflow, the practice or the support route first, and send the risky work back to people until it's fixed. A bypass report is a finding, not a failure.

> [!TIP]
>
> Adoption is a habit, not a launch. [Group rituals](https://docs.within.ai/group-rituals) has run scripts a champion can use to keep the team in rhythm.

## Keep it current

An agent relies on assumptions about the process, its source material, the tools it calls and the controls around it, and all of them change. Your Work Brain keeps learning from the work as people use Companion, so maintenance starts the day the agent ships: compare what the agent was built on with what the work looks like now.

**Record the baseline** with the agent's code and evaluations, so every later review has something to compare against: the process and version it was built from, the evidence behind its behavior, the policies, dependencies, tools and model configuration it relies on, the evaluation set and release result, and the owner and next review date.

**Review it** on that date, when the process, its owner or its systems change, and as new Companion capture comes in. The Within MCP also returns recent process changes. It's a bounded set with no date cutoff, so it doesn't prove nothing changed before its window.

**Classify each change.** Pull the current details of each process the agent uses and compare them with the baseline. Look at current observations too: the documented process can stay the same while the way people run it, its exceptions or its systems change.

| Change | What to do |
| - | - |
| **Presentation**, such as a rename that doesn't change the meaning | Update references and rerun the affected evaluations |
| **Behavioral**: a rule, exception, input or handoff changed | Revise the build and rerun the full evaluation set |
| **Structural**: the objective, owner, system boundary or a required approval changed | Go back to the use case and the design before you rebuild |

The classification is your decision, not the tool's. Confirm material changes with the process owner before you change how the agent behaves in production.

```text Maintenance review theme={null}
Compare [agent]'s recorded baseline with the current evidence in Within for the processes it uses. List what changed, classify each change as presentation, behavioral or structural, and propose an update and the evaluations to rerun. Do not modify the agent until I approve the proposed response.
```

**Then decide what's next:**

* **Sustain** when nothing material changed. Keep monitoring, and keep ownership active.
* **Update** when the work changed. After an approved update, save the new baseline, run the evaluations and record the release result.
* **Build the next one** when the agent is stable and the next opportunity on the roadmap is ready.
* **Re-agree the objective** when the outcome itself changed. Go back to Define.
* **Scale** when it works where it runs. Qualify the next team or local variant of the process first.
* **Retire** when it no longer fits the work. Reconcile open cases, restore the fallback and close its access.

Keep the previous version available, so you can roll back under your deployment controls.

## Who does what

| Role | Before release | In production | Over time |
| - | - | - | - |
| **AI Builder & Deployer** | Proves the evaluations and rehearses recovery | Deploys, monitors and resolves incidents | Maintains the agent, assesses drift and qualifies changes |
| **Functional Champion** | Secures the procedure, the practice and readiness for rollout | Tracks coverage, friction and exceptions | Refreshes the context and prioritizes improvements |
| **Executive Sponsor** | Makes sure the accountable approvers decide | Protects time and incentives for the rollout | Decides to sustain, update, scale, build again or retire |
| **Process Performers** | Show they can do the task, and handle the exceptions, on their own | Use it, inspect what it did, recover when it's wrong, and report when they work around it | Flag changes in the work and onboard their peers |
| **Within** | Reviews the evidence and coordinates any fixes | Reviews the live signals, and triages and supports | Reviews the value and supports the next cycle |

## Where to go next

> [card] [Measure the value](https://docs.within.ai/user-docs/deliver/measure-the-value.md)
>
> Recalculate against your baseline, and show the agent is still paying off.

> [card] [Keep agents current (developer docs)](https://developers.within.ai/transformation/maintain-agents)
>
> The developer view, with the MCP tools behind each step.

> [!NOTE]
>
> **Need help?** Use the in-app chat — click the chat bubble in the bottom-right corner of Within (staffed 24×5) — or email [support@within.ai](mailto:support@within.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.