---
title: Span
description: What a span is in Prefactor, how span types are defined, and where
  to see spans in the platform.
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

A span is the atomic record of a single step inside an agent run — one discrete unit of work that Prefactor captures as its own record within an [instance](/platform/concepts/instance).

Spans are the raw material of governance. When Prefactor records a run, it records each step as a span: the input that went in, the output that came back, how long it took, and whether it completed or failed. Together, the spans form the activity timeline of the instance — you can read the sequence as a narrative of what the agent did and in what order. That timeline is also the basis for [risk scoring](/platform/concepts/risk-profile#how-risk-is-scored): each span contributes to the instance's peak data-risk classification by way of the risk profile assigned to the [agent](/platform/concepts/agent).

Spans can be nested — a parent span can contain child spans, with the hierarchy preserved in the activity timeline. This allows business-level actions to be recorded alongside the lower-level calls that compose them, giving reviewers both the intent and the detail in a single record.

Span types are defined by the agent's [activity schema](/platform/concepts/activity-schema) — they can represent anything the team building the agent decides to instrument: for example `user_message` and `assistant_message` for chat turns, or separate types per tool (such as `web_search` and `read_file`) so each definition matches that tool's inputs and outputs. Each type must have payload and result definitions in that activity schema; those can be strict or broadly permissive. If a span's payload does not match the declared shape, the mismatch is recorded and flagged for review. The span still records regardless.

## In the Admin UI

- [Agent › Instance › Activity tab](/admin-ui/agent-instance/activity) — the full span timeline for a single run, with inputs, outputs, duration, and status.

## Related concepts

- [Instance](/platform/concepts/instance) — spans belong to an instance; the instance is the unit of a run.
- [Activity schema](/platform/concepts/activity-schema) — declares the expected structure for each span type and surfaces conformance gaps.
- [Risk profile](/platform/concepts/risk-profile) — spans drive the data-risk calculation for their instance.