Skip to main content

Layer 4 · agent

harness

blocks/4-agent/harness.yaml

layer 4agent
7entities
17commands
17events
6views
60refusals
7KPIs

The loop that turns a model into an agent: it sends the context to a model, takes the answer, runs tools, compacts the context when it grows, and stops. A harness is of one kind: a vendor's loop run as it ships, a loop driven from outside, or a loop native to this system. A harness session is one agent revision running in a harness for a principal. A sub-agent is a session whose parent is another session, so sessions form a tree with a depth that the harness bounds. Every model call of a session is a turn, with the inference it made and its usage. Every call of a tool by a session is a tool call: requested, decided by the authority (allowed or denied, with who decided), and then completed, failed, or recorded as could not read when its result could not be read; a call of a withdrawn tool, of a tool the agent revision does not list, or for a retired agent revision, is refused, and a call that was not allowed cannot complete. A session opens in a permission mode a field of work or a binding registered; the core names no mode. A mode may name the decider of every call, such as a classifier. A session may open under a named model policy, which ranks routes and names a ceiling: a route above it is refused. The policy may name the route its sessions' sub-agents take. No two open sessions share a name. A session that restarts an ended one names it, and the chain of restarts is its lineage.

Depends on​

  • agent · layer 4 · 11 references
  • tool · layer 3 · 8 references
  • model · layer 2 · 22 references
  • principal · layer 1 · 14 references
  • shared · layer 0 · 34 references

Used by​

  • work · layer 5 · 9 references
  • authority · layer 6 · 10 references
  • channel · layer 7 · 10 references
  • trigger · layer 7 · 6 references

Entities​

Compaction​

The context of a session was replaced by a summary: how large it was and how large it is now. The turn after it writes the model's cache again.

Identified by compaction_id (TurnId).

fieldtype
harness_session_idHarnessSessionId
tokens_beforeinteger
tokens_afterinteger
attimestamp

Relations:

  • session references HarnessSession (one, by harness_session_id)

Lifecycle: one state, Recorded; a recorded Compaction does not change.

Harness​

A loop an agent can run in, with the limits it holds every session to: the size of the context window and the deepest sub-agent nesting.

Identified by harness_id (HarnessId).

fieldtypemeaning
kindHarnessKind
nameName
context_windowintegerThe most tokens of context one turn may carry.
max_depthintegerThe deepest sub-agent level; 0 allows no sub-agent.
registered_attimestamp

Lifecycle of Harness

ActiveRetiredretireActiveRetiredretire
Ends in Retired.

HarnessSession​

One agent revision running in one harness, acting for one principal. Open until it ends. The limits of the harness at the time it opened are kept on the session.

Identified by harness_session_id (HarnessSessionId).

fieldtypemeaning
harness_idHarnessId
agent_revision_idAgentRevisionId
principal_idPrincipalIdThe principal the session acts for; a sub-agent acts for its parent's.
parent_session_idoptional HarnessSessionIdThe session that spawned this one; absent for a main session.
roleSessionRole
depthinteger0 for a main session, the parent's depth plus 1 for a sub-agent.
max_depthinteger
context_windowinteger
permission_modePermissionModeIdThe registered mode the session treats actions in; a sub-agent starts in its parent's.
opened_attimestamp
nameoptional NameThe name other sessions and the owner address this session by; no two open sessions share one, and the name is free again once its session ended. What the session is for is the role of its agent revision; the files it works in are the workspace it holds a lease on (agentic.workspace names the session as the holder).
requested_routeoptional RouteIdThe route the session asked for last (RequestRoute), or the one the spawning session asked for a sub-agent; absent, the agent revision's Primary model binding applies. Which model its turns used is read from their inferences.
model_policy_idoptional ModelPolicyIdThe model policy the session opened under (a sub-agent takes its parent's); a route it asks for with RequestRoute is at or below the policy's ceiling. Absent, no policy limits the route.
decideroptional DeciderThe decider of every tool call of the session, taken from its permission mode when it opened (a sub-agent takes its parent's); absent, any decider decides.
replacesoptional HarnessSessionIdThe ended session of the same principal that this one restarts; its history and KPIs go on in this one. Recorded by RecordRestart, once per session.
lineageoptional HarnessSessionIdThe first session of the chain of restarts this one belongs to, read from the session it replaces; absent for a session that restarts none, which is the first of its own chain. History and KPIs of a restarted session group by it.
briefoptional ContentThe written brief this session starts from when it restarts an ended one. Recorded by RecordRestart; absent for a session that restarts none.
ordered_byoptional PrincipalIdThe principal that ordered the restart, such as the owner a delegate acts for. Recorded by RecordRestart.
requested_byoptional PrincipalIdThe principal that asked for the restart to be recorded: the session's own principal, or a delegate that controls its sessions. Recorded by RecordRestart.

Relations:

  • replaced references HarnessSession (one, by replaces)
  • lineage_root references HarnessSession (one, by lineage)
  • requested references Route of model (one, by requested_route)
  • harness references Harness (one, by harness_id)
  • agent_revision references AgentRevision of agent (one, by agent_revision_id)
  • principal references Principal of principal (one, by principal_id)
  • restart_orderer references Principal of principal (one, by ordered_by)
  • restart_requester references Principal of principal (one, by requested_by)
  • parent references HarnessSession (one, by parent_session_id)
  • mode references PermissionMode (one, by permission_mode)
  • policy references ModelPolicy (one, by model_policy_id)

Lifecycle of HarnessSession

EndedOpenendEndedOpenend
Ends in Ended.

ModelPolicy​

A named limit on the routes a session may ask for, such as standard: the routes it knows, each with a rank, and its ceiling, the highest route a session under it may ask for. A session under the policy that asks for a route ranked above the ceiling's rank, or for a route the policy does not rank, is not opened. It may name the route a sub-agent takes when its spawn names none, one it ranks at or below the ceiling. Which route a turn then uses is applied by the evaluator of the harness, not here.

Identified by model_policy_id (ModelPolicyId).

fieldtypemeaning
nameName
routeslist of RankedRouteThe routes the policy knows, each with its rank; a higher rank is above a lower one.
ceiling_routeRouteIdThe highest route a session under the policy may ask for; one of its ranked routes.
sub_agent_routeoptional RouteIdThe route a sub-agent of a session under the policy takes when its spawn names none; one of its ranked routes, at or below the ceiling. The harness applies it. Absent, a sub-agent names its route itself.
registered_attimestamp

Relations:

  • ceiling references Route of model (one, by ceiling_route)
  • sub_agent references Route of model (one, by sub_agent_route)

Lifecycle: one state, Registered; a recorded ModelPolicy does not change.

PermissionMode​

One registered way a session treats an action that needs a decision (ask every time, plan without acting, take the actions of some kinds without asking). The core names no mode: a field of work or the binding of a harness registers the modes it has as rows here. A mode may name the one decider that decides every tool call of a session in it, such as a classifier. A retired mode opens no new session; sessions already in it keep it.

Identified by permission_mode_id (PermissionModeId).

fieldtypemeaning
nameName
summarystringWhat the mode takes without asking and what it asks for, in a few words.
decideroptional DeciderThe decider of every tool call of a session in this mode (Classifier for a mode in which a classifier decides); a decision by another is refused. Absent, any decider decides.
registered_attimestamp

Lifecycle of PermissionMode

RegisteredRetiredretireRegisteredRetiredretire
Ends in Retired.

ToolCall​

One call of a tool by a harness session. Requested until decided; Allowed or Denied by a verdict that is recorded on the call with who decided and how well that is known; an Allowed call ends Completed or Failed. agentic.authority may later reference a call; the call holds no decision identifier.

Identified by tool_call_id (ToolCallId).

fieldtypemeaning
tool_idToolId
harness_session_idHarnessSessionId
inputContent
verdictoptional VerdictThe recorded decision, Allow or Deny; absent while the call is Requested.
decideroptional Decider
mode_decideroptional DeciderThe decider the session's permission mode names, kept with the call; when it is Classifier, a decision by another is refused. Absent, any decider decides.
attributionoptional AttributionWhether the decider was recorded, inferred or is not recorded.
outputoptional Content
read_failureoptional stringWhy the tool's result could not be read, when it could not (CouldNotRead); the call then has no output, which is not an empty result.

Relations:

  • tool references Tool of tool (one, by tool_id)
  • session references HarnessSession (one, by harness_session_id)

Lifecycle of ToolCall

AllowedCompletedCouldNotReadDeniedFailedRequestedallowdenycompletefailcould_not_readAllowedCompletedCouldNotReadDeniedFailedRequestedallowdenycompletefailcould_not_read
Ends in Completed, CouldNotRead, Denied, Failed.

Turn​

One model call of a session: the inference it made, what it used and how large the context was when it was sent. Recorded once and never changed.

Identified by turn_id (TurnId).

fieldtypemeaning
harness_session_idHarnessSessionId
inference_idInferenceIdThe model block's record of the call.
usageUsage
context_tokensinteger
attimestamp

Relations:

  • session references HarnessSession (one, by harness_session_id)
  • inference references Inference of model (one, by inference_id)

Lifecycle: one state, Recorded; a recorded Turn does not change.

Commands​

CompactContext​

Compact the context. The session replaces its context by a summary. The result must be smaller.

fieldtype
compaction_idTurnId
harness_session_idHarnessSessionId
tokens_beforeinteger
tokens_afterinteger
attimestamp
outcomewhenresult
did-not-shrink refusedtokens_after >= tokens_beforeCompactionDidNotShrink: A compaction leaves the context no smaller than it was.
no-such-session refusedno HarnessSession for harness_session_idUnknownSession: No session of this identity was opened.
session-not-open refusedthe HarnessSession of harness_session_id has state != OpenSessionStateConflict: The session is not in a state this command acts from.
compactedotherwisecreates a Compaction in Recorded; emits ContextCompacted

CompleteToolCall​

Complete a tool call.

Called by: Calling harness.

fieldtype
tool_call_idToolCallId
okboolean
outputContent
outcomewhenresult
unknown refusedno such ToolCallUnknownToolCall: No tool call has this identity.
completedok == truemoves the ToolCall Allowed → Completed; emits ToolCallCompleted
failedotherwisemoves the ToolCall Allowed → Failed; emits ToolCallCompleted
wrong-state refusedthe ToolCall is in a state that does not allow itToolCallStateConflict: The call is not in a state this command acts from. Completing a call that is Requested or Denied is refused with this error: a call completes only after it was allowed.

DecideToolCall​

Decide a tool call.

fieldtype
tool_call_idToolCallId
verdictVerdict
deciderDecider
attributionAttribution
outcomewhenresult
approval-pending refusedverdict == ApprovalRequiredApprovalNotFinal: ApprovalRequired is not a final decision. The call stays Requested until an Allow or a Deny is recorded.
unknown refusedno such ToolCallUnknownToolCall: No tool call has this identity.
wrong-decider refuseddefined(mode_decider) and mode_decider == Classifier and decider != ClassifierDeciderNotOfMode: The session's permission mode names the classifier as decider; a decision of its call by another is refused, and the call stays Requested.
allowedverdict == Allowmoves the ToolCall Requested → Allowed; emits ToolCallDecided
deniedotherwisemoves the ToolCall Requested → Denied; emits ToolCallDecided
wrong-state refusedthe ToolCall is in a state that does not allow itToolCallStateConflict: The call is not in a state this command acts from. Completing a call that is Requested or Denied is refused with this error: a call completes only after it was allowed.

EndSession​

End a session. The session ends. The principal that asks is recorded: the session's own, or a delegate that controls its sessions.

fieldtype
harness_session_idHarnessSessionId
requested_byPrincipalId
attimestamp
outcomewhenresult
no-such-session refusedno such HarnessSessionUnknownSession: No session of this identity was opened.
endedotherwisemoves the HarnessSession Open → Ended; moves each HarnessSession with parent_session_id == subject.harness_session_id to Ended; emits SessionEnded
wrong-state refusedthe HarnessSession is in a state that does not allow itSessionStateConflict: The session is not in a state this command acts from.

NameSession​

Name a session. An open session takes a name. A name another open session has is refused; the name of an ended session is free.

fieldtype
harness_session_idHarnessSessionId
nameName
outcomewhenresult
no-such-session refusedno such HarnessSessionUnknownSession: No session of this identity was opened.
name-in-use refuseda HarnessSession with defined(name) and name == input.name and state == Open and harness_session_id != input.harness_session_idSessionNameInUse: An open session has this name; a second open session does not take it.
namedotherwiseupdates the HarnessSession; emits SessionNamed

OpenSession​

Open a session. Starts an agent revision in a harness for a principal. Default deny: an unknown or retired harness, revision, principal or permission mode is refused.

fieldtypemeaning
harness_session_idHarnessSessionId
harness_idHarnessId
agent_revision_idAgentRevisionId
principal_idPrincipalId
permission_modePermissionModeId
context_windowinteger
max_depthinteger
model_policy_idoptional ModelPolicyIdThe model policy the session opens under; absent, no policy limits its route.
attimestamp
outcomewhenresult
already-opened refusedthe HarnessSession exists alreadySessionExists: A session with this identity was opened: the request repeats one already taken and opens nothing. The session it names is the first request's result.
no-such-harness refusedno Harness for harness_idUnknownHarness: No harness of this identity is registered.
no-such-revision refusedno AgentRevision for agent_revision_idUnknownRevision: No agent revision of this identity is published.
no-such-principal refusedno Principal for principal_idUnknownPrincipal: No principal of this identity is registered.
no-such-mode refusedno PermissionMode for permission_modeUnknownPermissionMode: No permission mode of this identity is registered.
no-such-policy refusedno ModelPolicy for model_policy_idUnknownModelPolicy: No model policy of this identity is registered.
mode-retired refusedthe PermissionMode of permission_mode has state == RetiredPermissionModeStateConflict: The permission mode is not in a state this command acts from.
harness-retired refusedthe Harness of harness_id has state == RetiredHarnessStateConflict: The harness is not in a state this command acts from.
revision-retired refusedthe AgentRevision of agent_revision_id has state == RetiredRevisionRetired: A retired agent revision is not run.
principal-retired refusedthe Principal of principal_id has state == RetiredPrincipalRetired: A session does not act for a retired principal.
limits-above-harness refusedthe Harness of harness_id has input.context_window > context_windowLimitsAboveHarness: A session asks for a larger context window or deeper nesting than its harness allows.
depth-limit-above-harness refusedthe Harness of harness_id has input.max_depth > max_depthLimitsAboveHarness: A session asks for a larger context window or deeper nesting than its harness allows.
openedotherwisecreates a HarnessSession in Open; emits SessionOpened

RecordRestart​

Record that a session restarts an ended one. The session restarts an ended one from a written brief. The restart records who ordered it and which principal asked: the session's own, or a delegate that controls its sessions.

fieldtype
harness_session_idHarnessSessionId
replacesHarnessSessionId
briefContent
ordered_byPrincipalId
requested_byPrincipalId
outcomewhenresult
unknown refusedno such HarnessSessionUnknownSession: No session of this identity was opened.
already-restarts refuseddefined(replaces)AlreadyRestarts: The session already records the session it restarts; a session restarts one.
not-open refusedstate != OpenSessionStateConflict: The session is not in a state this command acts from.
no-such-replaced refusedno HarnessSession for replacesUnknownSession: No session of this identity was opened.
replaced-still-open refusedthe HarnessSession of replaces has state == OpenReplacedSessionOpen: The session named as replaced is still open; a restart replaces a session that ended.
restarted-in-lineagethe HarnessSession of replaces has defined(lineage)updates the HarnessSession; emits SessionRestarted
restartedotherwiseupdates the HarnessSession; emits SessionRestarted

RecordTurn​

Record a turn. One model call of an open session, with the inference it made, what it used and how large the context was. A turn whose context does not fit the window is refused.

fieldtype
turn_idTurnId
harness_session_idHarnessSessionId
inference_idInferenceId
usageUsage
context_tokensinteger
attimestamp
outcomewhenresult
no-such-session refusedno HarnessSession for harness_session_idUnknownSession: No session of this identity was opened.
session-not-open refusedthe HarnessSession of harness_session_id has state != OpenSessionStateConflict: The session is not in a state this command acts from.
context-window-exceeded refusedthe HarnessSession of harness_session_id has input.context_tokens > context_windowContextWindowExceeded: The turn carries more context than the session's window holds.
recordedotherwisecreates a Turn in Recorded; emits TurnRecorded

RecordUnreadableResult​

Record that a tool's result could not be read.

Called by: Calling harness.

fieldtype
tool_call_idToolCallId
read_failurestring
outcomewhenresult
unknown refusedno such ToolCallUnknownToolCall: No tool call has this identity.
recordedotherwisemoves the ToolCall Allowed → CouldNotRead; emits ToolResultNotRead
wrong-state refusedthe ToolCall is in a state that does not allow itToolCallStateConflict: The call is not in a state this command acts from. Completing a call that is Requested or Denied is refused with this error: a call completes only after it was allowed.

RegisterHarness​

Register a harness.

fieldtype
harness_idHarnessId
kindHarnessKind
nameName
context_windowinteger
max_depthinteger
attimestamp
outcomewhenresult
invalid-limits refused(context_window < 1 or max_depth < 0)InvalidLimits: The context window is not at least 1 or the depth limit is negative.
registeredotherwisecreates a Harness in Active; emits HarnessRegistered

RegisterModelPolicy​

Register a model policy.

fieldtypemeaning
model_policy_idModelPolicyId
nameName
routeslist of RankedRoute
ceiling_routeRouteId
sub_agent_routeoptional RouteIdThe route a sub-agent takes when its spawn names none; absent, none is set.
attimestamp
outcomewhenresult
ceiling-not-ranked refusedevery r in routes has r.route_id != ceiling_routeCeilingNotRanked: The ceiling of a model policy is a route the policy does not rank; nothing was registered.
sub-agent-route-not-ranked refuseddefined(sub_agent_route) and every r in routes has r.route_id != sub_agent_routeSubAgentRouteNotRanked: The sub-agent route of a model policy is a route the policy does not rank; nothing was registered.
sub-agent-route-above-ceiling refuseddefined(sub_agent_route) and some asked in routes with asked.route_id == sub_agent_route and some top in routes with top.route_id == ceiling_route and asked.rank > top.rankSubAgentRouteAboveCeiling: The sub-agent route of a model policy is ranked above its ceiling; nothing was registered.
registeredotherwisecreates a ModelPolicy in Registered; emits ModelPolicyRegistered

RegisterPermissionMode​

Register a permission mode.

fieldtypemeaning
permission_mode_idPermissionModeId
nameName
summarystring
decideroptional DeciderThe one decider of every tool call of a session in the mode; absent, any decides.
attimestamp
outcomewhenresult
registeredotherwisecreates a PermissionMode in Registered; emits PermissionModeRegistered

RequestRoute​

Request a route. An open session asks for the route its turns use. Under a model policy, a route ranked above the policy's ceiling or not ranked by it is refused.

fieldtype
harness_session_idHarnessSessionId
route_idRouteId
outcomewhenresult
no-such-session refusedno such HarnessSessionUnknownSession: No session of this identity was opened.
not-open refusedstate != OpenSessionStateConflict: The session is not in a state this command acts from.
requested-without-policynot (defined(model_policy_id))updates the HarnessSession; emits RouteRequested
policy-missing refusedno ModelPolicy for model_policy_idRouteNotInPolicy: The session asks for a route its model policy does not rank; its route is unchanged.
route-not-ranked refusedthe ModelPolicy of model_policy_id has every r in routes has r.route_id != input.route_idRouteNotInPolicy: The session asks for a route its model policy does not rank; its route is unchanged.
route-above-ceiling refusedthe ModelPolicy of model_policy_id has some asked in routes with asked.route_id == input.route_id and some top in routes with top.route_id == ceiling_route and asked.rank > top.rankRouteAboveCeiling: The session asks for a route ranked above its model policy's ceiling; its route is unchanged.
requestedotherwiseupdates the HarnessSession; emits RouteRequested

RequestToolCall​

Request a tool call. Asks for one call of a tool for the agent revision the session runs. A revision that was never published or is retired calls no tool, and a tool the revision does not list is not called. The call then waits for the authority's decision, which needs a grant that covers the revision, the tool's category and the scope.

Called by: Calling harness.

fieldtypemeaning
tool_call_idToolCallId
tool_idToolId
harness_session_idHarnessSessionId
agent_revision_idAgentRevisionId
inputContent
mode_decideroptional DeciderThe decider the session's permission mode names, as the calling harness runs it; absent when it names none.
outcomewhenresult
unknown-tool refusedno Tool for tool_idUnknownTool: No tool of this identity is published.
unknown-revision refusedno AgentRevision for agent_revision_idUnknownRevision: No agent revision of this identity is published.
tool-withdrawn refusedthe Tool of tool_id has state == WithdrawnToolIsWithdrawn: The tool is withdrawn; a call to it is refused.
revision-retired refusedthe AgentRevision of agent_revision_id has state == RetiredRevisionRetired: A retired agent revision is not run.
tool-not-listed refusedthe AgentRevision of agent_revision_id has every t in tools has t != input.tool_idToolNotListed: The agent revision does not list the tool; a call to it is refused.
requestedotherwisecreates a ToolCall in Requested; emits ToolCallRequested

RetireHarness​

Retire a harness.

fieldtype
harness_idHarnessId
attimestamp
outcomewhenresult
no-such-harness refusedno such HarnessUnknownHarness: No harness of this identity is registered.
retiredotherwisemoves the Harness Active → Retired; emits HarnessRetired
wrong-state refusedthe Harness is in a state that does not allow itHarnessStateConflict: The harness is not in a state this command acts from.

RetirePermissionMode​

Retire a permission mode.

fieldtype
permission_mode_idPermissionModeId
attimestamp
outcomewhenresult
no-such-mode refusedno such PermissionModeUnknownPermissionMode: No permission mode of this identity is registered.
retiredotherwisemoves the PermissionMode Registered → Retired; emits PermissionModeRetired
wrong-state refusedthe PermissionMode is in a state that does not allow itPermissionModeStateConflict: The permission mode is not in a state this command acts from.

SpawnSubAgent​

Spawn a sub-agent session. A session starts another as its sub-agent. The child runs in the parent's harness, for the parent's principal and in the parent's permission mode, one level deeper. Refused beyond the harness's maximum depth.

fieldtype
harness_session_idHarnessSessionId
parent_session_idHarnessSessionId
agent_revision_idAgentRevisionId
depthinteger
requested_routeoptional RouteId
attimestamp
outcomewhenresult
already-spawned refusedthe HarnessSession exists alreadySessionExists: A session with this identity was opened: the request repeats one already taken and opens nothing. The session it names is the first request's result.
no-such-parent refusedno HarnessSession for parent_session_idUnknownSession: No session of this identity was opened.
no-such-revision refusedno AgentRevision for agent_revision_idUnknownRevision: No agent revision of this identity is published.
parent-not-open refusedthe HarnessSession of parent_session_id has state != OpenSessionStateConflict: The session is not in a state this command acts from.
max-depth-exceeded refusedthe HarnessSession of parent_session_id has depth >= max_depthMaxDepthExceeded: The parent is already at the deepest level its harness allows.
wrong-depth refusedthe HarnessSession of parent_session_id has input.depth != depth + 1WrongDepth: The depth named is not the parent's depth plus 1.
revision-retired refusedthe AgentRevision of agent_revision_id has state == RetiredRevisionRetired: A retired agent revision is not run.
spawnedotherwisecreates a HarnessSession in Open; emits SubAgentSpawned

Events​

eventfieldsemitted by
ContextCompactedcompaction_id TurnId, harness_session_id HarnessSessionId, tokens_before integer, tokens_after integer, at timestampCompactContext
HarnessRegisteredharness_id HarnessId, kind HarnessKind, context_window integer, max_depth integer, at timestampRegisterHarness
HarnessRetiredharness_id HarnessId, at timestampRetireHarness
ModelPolicyRegisteredmodel_policy_id ModelPolicyId, name Name, ceiling_route RouteId, sub_agent_route optional RouteId, at timestampRegisterModelPolicy
PermissionModeRegisteredpermission_mode_id PermissionModeId, name Name, decider optional Decider, at timestampRegisterPermissionMode
PermissionModeRetiredpermission_mode_id PermissionModeId, at timestampRetirePermissionMode
RouteRequestedharness_session_id HarnessSessionId, route_id RouteIdRequestRoute
SessionEndedharness_session_id HarnessSessionId, requested_by PrincipalId, at timestampEndSession
SessionNamedharness_session_id HarnessSessionId, name NameNameSession
SessionOpenedharness_session_id HarnessSessionId, harness_id HarnessId, agent_revision_id AgentRevisionId, principal_id PrincipalId, permission_mode PermissionModeId, model_policy_id optional ModelPolicyId, at timestampOpenSession
SessionRestartedharness_session_id HarnessSessionId, replaces HarnessSessionId, lineage optional HarnessSessionId, brief Content, ordered_by PrincipalId, requested_by PrincipalIdRecordRestart
SubAgentSpawnedharness_session_id HarnessSessionId, parent_session_id HarnessSessionId, agent_revision_id AgentRevisionId, depth integer, requested_route optional RouteId, at timestampSpawnSubAgent
ToolCallCompletedtool_call_id ToolCallId, ok boolean, output ContentCompleteToolCall
ToolCallDecidedtool_call_id ToolCallId, verdict Verdict, decider Decider, attribution AttributionDecideToolCall
ToolCallRequestedtool_call_id ToolCallId, tool_id ToolId, harness_session_id HarnessSessionId, input ContentRequestToolCall
ToolResultNotReadtool_call_id ToolCallId, read_failure stringRecordUnreadableResult
TurnRecordedturn_id TurnId, harness_session_id HarnessSessionId, inference_id InferenceId, usage Usage, context_tokens integer, at timestampRecordTurn

Views​

viewrowsfields
HarnessSessions
Harness sessions
each HarnessSessionharness_session_id HarnessSessionId, harness_id HarnessId, agent_revision_id AgentRevisionId, principal_id PrincipalId, parent_session_id optional HarnessSessionId, role SessionRole, depth integer, max_depth integer, context_window integer, permission_mode PermissionModeId, opened_at timestamp, name optional Name, requested_route optional RouteId, model_policy_id optional ModelPolicyId, decider optional Decider, replaces optional HarnessSessionId, lineage optional HarnessSessionId, brief optional Content, ordered_by optional PrincipalId, requested_by optional PrincipalId, state State
Harnesses
Harnesses
each Harnessharness_id HarnessId, kind HarnessKind, name Name, context_window integer, max_depth integer, registered_at timestamp, state State
ModelPolicies
Model policies
each ModelPolicymodel_policy_id ModelPolicyId, name Name, routes list of RankedRoute, ceiling_route RouteId, sub_agent_route optional RouteId, registered_at timestamp, state State
PermissionModes
Permission modes
each PermissionModepermission_mode_id PermissionModeId, name Name, summary string, decider optional Decider, registered_at timestamp, state State
ToolCalls
Tool calls
each ToolCalltool_call_id ToolCallId, tool_id ToolId, harness_session_id HarnessSessionId, input Content, verdict optional Verdict, decider optional Decider, mode_decider optional Decider, attribution optional Attribution, output optional Content, read_failure optional string, state State
Turns
Turns
each Turnturn_id TurnId, harness_session_id HarnessSessionId, inference_id InferenceId, usage Usage, context_tokens integer, at timestamp

Types​

typeisvalues or fields
HarnessKind
Vendor is a loop a vendor ships and this system only observes. Driven is a loop whose steps an orchestrator outside it issues. Native is a loop written for this system.
one ofVendor, Driven, Native
RankedRoutea recordroute_id RouteId, rank integer
SessionRole
Main is a session opened for a principal; SubAgent is one a session spawned.
one ofMain, SubAgent

KPIs​

7 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.

Correctness​

KPIunitbettergatestatus
limit_overruns
Runs that went past a turn, time or cost limit of their assignment.
How: Sessions whose count of TurnRecorded events, wall seconds or spend exceeds the limit named in the assignment. A limit held only in the prompt does not count as enforced. Must be 0.
countlowergateplanned
source: research/2610.09995
approvals_in_summaries
Tool calls executed on an approval that exists only in a compaction summary.
How: ToolCallDecided accepts whose only trace of approval is text inside a ContextCompacted summary, with no recorded decision of a decider. Must be 0.
countlowergateplanned
source: research/2610.29869

Quality​

KPIunitbettergatestatus
context_size_p90_tokens
90th percentile of the context size at a model turn.
How: Input plus cache read plus cache write tokens of each ModelTurnRecorded, 90th percentile per model and scope (the median and the largest are reported too).
tokenslower–computed today
source: docs/kpis.md
turns
Model turns taken.
How: Count of ModelTurnRecorded events in the window. Divide by tasks done for turns per task.
countlower–simulated
source: design
compactions_per_run
Context compactions per run.
How: ContextCompacted events divided by sessions. Each compaction discards most of the context.
countlower–planned
source: research/2609.40303
session_restart_share
Share of opened sessions that restart an ended one.
How: SessionRestarted events divided by SessionOpened events, per principal. Time and tokens of a lineage are summed over its sessions, grouped by the lineage each restart names.
sharelower–planned
source: design
tool_results_not_read
Tool calls whose result could not be read.
How: ToolResultNotRead events per session and per tool. Each is recorded as could not read, never as an empty result.
countlower–planned
source: design

Settings​

The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.

A part harness:

settingtypeunitdefaultcontractwhat
kindstringevery portThe kind of harness, a row a field registers.
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it.