Data model
Account├── Environments (one or more named delivery stages)├── Risk profiles (reusable, assignable to agents)└── Agents (one or more; each spans all environments) ├── Versions (created automatically on new runs) ├── Activity schema (one per agent, versioned automatically) │ └── Span type definitions (payload + result per type) ├── Agent deployments (one per environment; points to a version) └── Instances (one per run) └── Spans (one per instrumented step)The account is the outer boundary. Everything in Prefactor belongs to an account — agents, environments, risk profiles, and all the runtime data they produce. Nothing crosses that boundary.
The agent layer
Section titled “The agent layer”Agents belong to the account, not to any particular environment. An agent is a stable identity that persists across environments and versions.
Three further concepts describe the configuration of an agent — what version it is on, what schema governs its spans, and where it is deployed:
Versions are created automatically. When a run arrives with a combination of metadata not seen before for that agent, Prefactor creates a new version record.
The activity schema belongs to one agent and accumulates versions by the same mechanism. Each version declares the span types the agent emits and the expected shape of their payloads and results.
Agent deployments record which version is the current release in each environment. There is at most one active deployment per agent per environment. Environments can be on different versions simultaneously.
The runtime layer
Section titled “The runtime layer”Environments are named stages — development, staging, production, or whatever your organisation uses. Each instance is attributed to the environment the agent reported when the run started.
An instance is a single run from start to finish. It is stamped with the agent, the version, the activity schema version, and the environment. If the agent has a risk profile, the instance also carries the peak risk classification for that run.
Spans are the individual steps recorded within an instance. Each span has a type, a payload, a result, a duration, and a status. Spans belong to exactly one instance and are created by the SDK as the agent runs.
The risk layer
Section titled “The risk layer”A risk profile belongs to the account and can be assigned to any number of agents. Prefactor uses the profile’s weights, multipliers, and thresholds to calculate a risk classification for every instance that agent produces. One profile can cover many agents; individual agents can each have their own.
Further reading
Section titled “Further reading”- Instrumentation strategy — how instrumentation choices shape the runtime layer.
- The audit trail — how the connections between records support compliance review.