---
title: Instance
description: What an agent instance is in Prefactor, its lifecycle states, how
  it relates to spans and versions, and where to see it.
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

An instance is a single run of an agent from start to finish — one discrete execution, tracked by Prefactor as a unit.

Every time your agent runs, we create an instance record. That record collects everything that happened during that run: the [spans](/platform/concepts/span) produced (each LLM call, tool invocation, or sub-agent execution), the [agent version](/platform/concepts/agent#versions) that was running, the [environment](/platform/concepts/environment) it ran in, and the lifecycle state the run reached. The instance is the level at which risk is assessed — if the agent has a risk profile, the peak data-risk classification for that run is attributed to the instance, derived from its spans.

An instance moves through a set of states as it runs. It starts as **Pending**, becomes **Active** once running, and finishes as **Complete**, **Failed**, **Cancelled**, or **Terminated** depending on how it ends.

Each instance contains exactly the spans that were recorded during that run. The spans it contains and how detailed they are depend on the choices made by the team building the agent — what they chose to instrument and at what granularity.

## In the Admin UI

- [Agent › Instances tab](/admin-ui/agent/instances) — the per-agent table of every run, filterable by environment and status.
- [Agent › Instance › Details tab](/admin-ui/agent-instance/details) — lifecycle timestamps and metadata for a single run.
- [Agent › Instance › Activity tab](/admin-ui/agent-instance/activity) — the full span hierarchy for a single run.
- [Agent › Versions tab](/admin-ui/agent/versions) — each instance records the agent version it ran under.

## Related concepts

- [Agent](/platform/concepts/agent) — every instance belongs to one agent.
- [Activity schema](/platform/concepts/activity-schema) — each instance is tied to the activity schema version supplied when that run was registered.
- [Span](/platform/concepts/span) — the individual steps recorded within an instance.
- [Environment](/platform/concepts/environment) — instances are attributed to the environment the agent reported when the run started.
- [Risk profile](/platform/concepts/risk-profile) — risk classification is calculated and displayed at the instance level.