Skip to content

Instance

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 produced (each LLM call, tool invocation, or sub-agent execution), the agent version that was running, the 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.

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