Skip to content

Core Types

This section defines the abstract types that constitute the OATF document model. Each type is described as a set of named fields with specified types and constraints. SDKs MUST expose these types in their public API. Field names SHOULD match those listed here, adapted to the target language’s naming conventions (for example, snake_case in Rust and Python, camelCase in JavaScript and Go).

The following primitive types are used throughout this specification:

TypeDescription
StringA UTF-8 string.
IntegerA signed integer of at least 64 bits.
FloatAn IEEE 754 double-precision floating point number.
Booleantrue or false.
DurationA time span. SDKs MUST accept both shorthand (30s, 5m, 1h, 2d) and ISO 8601 format (PT30S, PT5M, P1DT12H).
DateAn ISO 8601 date (YYYY-MM-DD).
DateTimeAn ISO 8601 date-time with timezone.
ValueA dynamically-typed JSON-like value: null, boolean, number, string, array of Value, or map of String to Value. Used for protocol message content and match predicate targets.
Optional<T>A value that may be absent.
List<T>An ordered sequence of values.
Map<K, V>An unordered mapping from keys to values.

The top-level container for a parsed OATF document.

FieldTypeDescription
oatfStringSpecification version declared by this document.
schemaOptional<String>JSON Schema URL ($schema in YAML). Preserved through round-trips but ignored during processing.
attackAttackThe attack definition.

The attack envelope and all contained structures.

FieldTypeRequiredDefaultDescription
idOptional<String>NoUnique identifier (for example, OATF-003, ACME-001). Required for publication.
nameOptional<String>No"Untitled"Human-readable attack name.
versionOptional<Integer>No1Document version (positive integer, higher is newer).
statusOptional<Status>NodraftLifecycle status.
createdOptional<DateTime ∣ Date>NoFirst published date/time. Bare dates (YYYY-MM-DD) accepted and interpreted as midnight UTC.
modifiedOptional<DateTime ∣ Date>NoLast modified date/time. Bare dates accepted and interpreted as midnight UTC.
authorOptional<String>NoAuthor or organization.
descriptionOptional<String>NoProse description of the attack.
grace_periodOptional<Duration>NoPost-terminal-phase observation window. When present, tools observe for this duration after all terminal phases complete before computing the verdict. Parsed by parse_duration (§5.2).
severityOptional<Severity>NoAbsent when not assessed. Always in object form after normalization when present.
impactOptional<List<Impact>>NoCategories of harm.
classificationOptional<Classification>NoFramework mappings and taxonomy.
referencesOptional<List<Reference>>NoExternal references.
executionExecutionYesExecution profile.
indicatorsOptional<List<Indicator>>NoPatterns for determining agent compliance. When absent, document is simulation-only.
correlationOptional<Correlation>NoHow indicator verdicts combine. See §2.3a.
extensionsOptional<Map<String, Value>>NoExtension fields (x- prefixed). Preserved through round-trips.

Post-normalization guarantee: After normalize (§3.3), name, version, and status are always present with their default values applied. Code that operates on normalized documents MAY assert their presence.

FieldTypeRequiredDefaultDescription
logicCorrelationLogicNoanyHow indicator verdicts combine to produce the attack-level verdict.

correlation MUST only be present when indicators is also present (the JSON Schema enforces this via dependentRequired). Correlation governs how indicator verdicts combine and is meaningless without indicators.

Always represented in object form. SDKs MUST expand scalar input during normalization.

FieldTypeRequiredDefaultDescription
levelSeverityLevelYesOne of: informational, low, medium, high, critical.
confidenceIntegerNo50Author confidence in the assigned severity level, 0–100.
FieldTypeDescription
categoryOptional<Category>OATF taxonomy category.
mappingsOptional<List<FrameworkMapping>>External security framework mappings.
tagsOptional<List<String>>Free-form tags. Lowercase, hyphenated.
FieldTypeRequiredDefaultDescription
modeOptional<String>NoAttacker posture. Must match {protocol}_{role} convention. Required when state is present.
stateOptional<Value>NoProtocol-specific state (single-phase form only).
phasesOptional<List<Phase>>NoOrdered phase sequence (multi-phase form only).
actorsOptional<List<Actor>>NoNamed concurrent actors (multi-actor form only).

Three forms are mutually exclusive: state, phases, and actors MUST NOT coexist. The single-phase form (state) normalizes to multi-actor form via N-006. The multi-phase form (phases) normalizes to multi-actor form via N-007.

Extension fields (x- prefixed) on Execution are stored in an extensions: Optional<Map<String, Value>> and preserved through round-trips.

FieldTypeRequiredDefaultDescription
nameStringYesUnique identifier. Must match [a-z][a-z0-9_]*.
modeStringYesAttacker posture for this actor. Must match {protocol}_{role} convention.
phasesList<Phase>YesOrdered phase sequence. At least one required.
extensionsOptional<Map<String, Value>>NoExtension fields (x- prefixed). Preserved through round-trips.
FieldTypeRequiredDefaultDescription
nameOptional<String>No"phase-{N}" (1-based index)Human-readable phase label. Auto-generated when omitted.
descriptionOptional<String>NoPhase purpose.
modeOptional<String>NoInherited from execution.mode or actor.modeAttacker posture for this phase. Required when execution.mode is absent and not in multi-actor form.
stateOptional<Value>NoInherited from preceding phaseProtocol-specific state. Required on first phase.
extractorsOptional<List<Extractor>>NoValue extractors for this phase.
on_enterOptional<List<Action>>NoEntry actions executed when this phase begins. See §2.7a.
triggerOptional<Trigger>NoTrigger condition. Absent on terminal phase.
extensionsOptional<Map<String, Value>>NoExtension fields (x- prefixed). Preserved through round-trips.

Note on state type: state uses Value to permit deserialization of structurally invalid documents for diagnostic reporting. The format specification and JSON Schema constrain state to an object; validation (§3.2) rejects non-object values.

An entry action executed when a phase begins. Exactly one action key MUST be present per action object. The v0.1 specification defines two known actions; protocol bindings MAY define additional actions.

Known actions (v0.1):

KeyRequired FieldsDescription
sendmethod: StringSend a protocol message (notification or request). method is the protocol method name; optional params: Value carries protocol-native message parameters (pass-through). Entry actions execute before client interaction, so notifications are the primary use case.
logmessage: StringEmit a log message. message supports {{template}} interpolation. Optional level: LogLevel.

Associated enums:

EnumerationValues
LogLevelinfo, warn, error

Binding-specific actions: Action objects MAY contain a single key not in the known set above (e.g., delay_ms: 500, send_ui_event: {...}). The value type is unconstrained: it may be an object, string, number, or any JSON value. SDKs MUST preserve unrecognized action keys through parse → normalize → serialize round-trips. When evaluating, SDKs SHOULD skip actions they do not recognize and emit a warning diagnostic.

Extension fields: Each action object MAY include x- prefixed keys alongside the action key. Extension fields are preserved but do not affect action execution.

FieldTypeRequiredDefaultDescription
eventOptional<String>NoProtocol event to match.
countOptional<Integer>No1 (when event present)Number of matching events required.
matchOptional<MatchPredicate>NoContent predicate on matching events.
afterOptional<Duration>NoUnconditional time-based advancement.

Represents a protocol-level event observed during execution. Used by evaluate_trigger (§5.8) to match against trigger conditions.

FieldTypeRequiredDescription
event_typeStringYesThe event type (e.g., tools/call, message/send, run_started).
contentValueYesThe event payload. Evaluated against trigger.match predicates via evaluate_predicate.

Returned by evaluate_trigger (§5.8) to indicate whether a phase should advance.

VariantFieldsDescription
Advancedreason: AdvanceReasonThe trigger condition is satisfied; advance to the next phase.
NotAdvancedThe trigger condition is not yet satisfied; remain in the current phase.

AdvanceReason is one of: event_matched (the required number of matching events was reached), timeout (the after duration elapsed).

Mutable state tracked per-actor-per-phase for trigger evaluation. The runtime creates a fresh TriggerState when an actor enters a phase and passes it to every evaluate_trigger call for that phase. The function updates the state internally; the caller persists it across calls but does not inspect or modify its fields.

FieldTypeDefaultDescription
event_countInteger0Number of fully-matched events observed so far in this phase. Initialized to 0 on phase entry; incremented by evaluate_trigger (§5.8) when base event and predicate match.
FieldTypeRequiredDescription
nameStringYesVariable name for interpolation. Must match [a-z][a-z0-9_]*.
sourceExtractorSourceYesrequest or response.
typeExtractorTypeYesjson_path or regex.
selectorStringYesThe extraction selector.

A match predicate is a map from dot-path field references to conditions. All entries are combined with AND logic. Each entry maps a simple dot-path string (§5.1.1) to either a scalar value (equality check) or a MatchCondition object.

type MatchPredicate = Map<String, MatchEntry>

Where MatchEntry is either:

  • A scalar Value (equality comparison), or
  • A MatchCondition object.

This is a type alias, not a struct. In YAML, predicates are written as flat mappings (e.g., {arguments.command: "ls", headers.x-api-key: "secret"}). The SDK MUST parse them directly as maps without introducing an intermediate entries key. Languages without algebraic types may represent MatchEntry as a tagged union or untyped Value with runtime type checking.

A condition applied to a resolved field value. At least one operator MUST be present. When multiple operators are present, they are combined with AND logic, so the value must satisfy every operator for the condition to match. For example, {contains: "secret", regex: "key_[0-9]+"} matches only if both conditions are satisfied.

FieldTypeDescription
containsOptional<String>Substring match (case-sensitive).
starts_withOptional<String>Prefix match (case-sensitive).
ends_withOptional<String>Suffix match (case-sensitive).
regexOptional<String>RE2-compatible regular expression.
any_ofOptional<List<Value>>Matches if field equals any listed value.
gtOptional<Float>Greater than.
ltOptional<Float>Less than.
gteOptional<Float>Greater than or equal.
lteOptional<Float>Less than or equal.
existsOptional<Boolean>Field presence check. true: matches if the path resolved to a value (including null). false: matches if the path did not resolve.
FieldTypeRequiredDefaultDescription
idOptional<String>NoAuto-generated (see N-003)Unique indicator identifier. Always present after normalization.
protocolOptional<String>NoProtocol component of execution.modeProtocol this indicator targets. Required when execution.mode is absent.
surfaceOptional<Surface>NoProtocol operation name scoping this indicator. Optional.
targetStringYesDot-path into the protocol message to examine. Supports wildcards.
actorOptional<String>NoReferences an actor by name. When present, evaluates only against that actor’s traffic.
directionOptional<Direction>NoRestricts which side examined: request or response. When omitted, tool selects applicable messages; v0.1 does not define inference.
methodOptional<IndicatorMethod>NoExplicit evaluation method: pattern, expression, or semantic. Inferred from which field is present when omitted.
descriptionOptional<String>NoWhat this indicator evaluates.
patternOptional<PatternMatch>NoPattern evaluation definition. Exactly one of pattern, expression, semantic required.
expressionOptional<ExpressionMatch>NoCEL evaluation definition.
semanticOptional<SemanticMatch>NoSemantic evaluation definition.
confidenceOptional<Integer>NoIndicator-specific confidence override.
tierOptional<Tier>NoOutcome tier this indicator detects (§6.5). When absent, the indicator has no tier classification.
severityOptional<SeverityLevel>NoIndicator-specific severity override.
false_positivesOptional<List<String>>NoKnown false positive scenarios.
extensionsOptional<Map<String, Value>>NoExtension fields (x- prefixed). Preserved through round-trips.
FieldTypeRequiredDefaultDescription
targetOptional<String>NoOverride for the indicator-level target. When present, takes precedence for this pattern evaluation.
conditionOptional<Condition>NoAbsent in shorthand form. Always present after normalization.

A Condition is either:

  • A bare Value (string, number, boolean, array, null) for equality matching, or
  • A MatchCondition object containing one or more operator keys.

Languages without algebraic types may represent Condition as an untyped Value with runtime type checking: if it’s an object with operator keys, treat as MatchCondition; otherwise treat as equality.

The YAML representation supports two forms:

  • Standard form: target + condition (both explicit). condition may be a bare value (e.g., condition: "ls") or an operator object (e.g., condition: {contains: "ls"}).
  • Shorthand form: a single condition operator as a direct key (e.g., contains: "foo"). No condition wrapper.

Normalization (N-005): When a PatternMatch is parsed in shorthand form, the SDK MUST expand it to standard form with an explicit condition field (as a MatchCondition object). The indicator-level target provides the evaluation path; pattern.target overrides it when present. Bare-value conditions in standard form are preserved as-is (not wrapped in an operator object).

FieldTypeRequiredDescription
celStringYesCEL expression evaluating to boolean.
variablesOptional<Map<String, String>>NoNamed variables as dot-paths into message. Keys must be valid CEL identifiers ([_a-zA-Z][_a-zA-Z0-9]*).
FieldTypeRequiredDefaultDescription
targetOptional<String>NoOverride for the indicator-level target. When present, takes precedence for this semantic evaluation.
intentStringYesNatural-language intent description.
intent_classOptional<SemanticIntentClass>NoIntent category hint for classification engines.
thresholdOptional<Float>NoSimilarity/confidence threshold, 0.0–1.0.
examplesOptional<SemanticExamples>NoPositive and negative examples.
FieldTypeRequiredDescription
positiveOptional<List<String>>NoStrings that SHOULD trigger the indicator.
negativeOptional<List<String>>NoStrings that SHOULD NOT trigger the indicator.

When examples is present, at least one of positive or negative MUST be provided (the JSON Schema enforces this via minProperties: 1). Documents with semantic indicators SHOULD include at least two positive and two negative examples to enable cross-tool calibration (format specification §6.4).

FieldTypeRequiredDescription
urlStringYesURL of the external reference.
titleOptional<String>NoHuman-readable title.
descriptionOptional<String>NoBrief description of the reference.
FieldTypeRequiredDescription
frameworkFrameworkYesThe external framework being referenced.
idStringYesIdentifier of the specific entry within the framework.
nameOptional<String>NoHuman-readable name of the referenced entry.
urlOptional<String>NoPermalink to the referenced entry.
relationshipOptional<Relationship>Noprimary (default) or related.
FieldTypeRequiredDescription
indicator_idStringYesThe indicator that produced this verdict.
resultIndicatorResultYesOne of: matched, not_matched, error, skipped.
timestampOptional<DateTime>NoWhen the verdict was produced.
evidenceOptional<String>NoThe matched content or error diagnostic.
sourceOptional<String>NoThe tool or engine that produced the verdict. Populated by the consuming tool, not by SDK evaluation functions.
FieldTypeRequiredDescription
attack_idOptional<String>NoThe attack that was evaluated. Absent when the document has no attack.id.
resultAttackResultYesOne of: exploited, not_exploited, partial, error.
max_tierOptional<Tier>NoHighest tier among matched indicators that have a tier value. Absent when no matched indicator has a tier or when result is not_exploited.
indicator_verdictsList<IndicatorVerdict>YesAll individual indicator results.
evaluation_summaryEvaluationSummaryYesCounts of each indicator result. Prevents skipped → not_matched aggregation from masking evaluation gaps.
timestampOptional<DateTime>NoWhen the verdict was produced.
sourceOptional<String>NoThe tool or engine that produced the verdict. Populated by the consuming tool, not by SDK evaluation functions.
FieldTypeRequiredDescription
matchedIntegerYesNumber of indicators that produced matched.
not_matchedIntegerYesNumber of indicators that produced not_matched.
errorIntegerYesNumber of indicators that produced error.
skippedIntegerYesNumber of indicators that produced skipped.

SDKs MUST define named types for the following enumerations. The canonical string values listed here are the serialization form in YAML documents.

EnumerationValues
Tieringested, local_action, boundary_breach
SeverityLevelinformational, low, medium, high, critical
Impactbehavior_manipulation, data_exfiltration, data_tampering, unauthorized_actions, information_disclosure, credential_theft, service_disruption, privilege_escalation
Categorycapability_poisoning, response_fabrication, context_manipulation, oversight_bypass, temporal_manipulation, availability_disruption, cross_protocol_chain
ProtocolOpen string. v0.1 values: mcp, a2a, ag_ui. Must match [a-z][a-z0-9_]*.
ModeOpen string. v0.1 values: mcp_server, mcp_client, a2a_server, a2a_client, ag_ui_client. Must match [a-z][a-z0-9_]*_(server|client).
Statusdraft, experimental, stable, deprecated
CorrelationLogicany, all
IndicatorResultmatched, not_matched, error, skipped
AttackResultexploited, not_exploited, partial, error
ExtractorSourcerequest, response
ExtractorTypejson_path, regex
SemanticIntentClassprompt_injection, data_exfiltration, privilege_escalation, social_engineering, instruction_override
FrameworkOpen string. v0.1 values: atlas, mitre_attack, owasp_llm, owasp_mcp, owasp_agentic, cwe, other. Tools MUST accept unrecognized values and treat them as equivalent to other.
Relationshipprimary, related
GenerationErrorKindprovider_unavailable, model_error, validation_failure, timeout, content_policy
EvaluationErrorKindpath_resolution, regex_timeout, cel_error, type_error, semantic_error, unsupported_method
ParseErrorKindsyntax, type_mismatch, unknown_variant
DiagnosticSeverityerror, warning
LogLevelinfo, warn, error
ElicitationModeform, url
SurfaceOpen string. Values are protocol operation names (e.g., tools/call, agent_card/get). See §2.21.
Directionrequest, response
IndicatorMethodpattern, expression, semantic
AdvanceReasonevent_matched, timeout

Open vs closed enums: Protocol, Mode, Surface (§2.21), and Framework are open strings: unknown values are accepted (with optional warnings for unrecognized bindings, per §3.2). All other enumerations in this table are closed: unknown values MUST be rejected during parsing (ParseError with kind: unknown_variant). This distinction ensures extensibility for protocol bindings and framework mappings while maintaining strict validation for lifecycle, verdict, and structural enums.

Output-only enumerations: IndicatorResult, AttackResult, AdvanceReason, GenerationErrorKind, EvaluationErrorKind, ParseErrorKind, and DiagnosticSeverity describe SDK output types (verdicts, errors, diagnostics) — not fields in OATF documents. They are intentionally absent from the JSON Schema, which validates only document input. SDKs define these types to ensure interoperability of evaluation results across implementations.

In the v0.1 binding model, surface is an optional indicator field that references a protocol operation name (e.g., tools/call, agent_card/get, run_agent_input). The target field (required on every indicator) provides the explicit dot-path into the protocol message.

SDKs do not need a compile-time surface registry for target resolution. Surface values, when present, are used for scoping (limiting which protocol traffic the indicator evaluates against) and for documentation. SDKs SHOULD validate surface values against the protocol’s known operation names for recognized bindings and emit warnings for unrecognized values.

For recognized modes (v0.1: mcp_server, mcp_client, a2a_server, a2a_client, ag_ui_client), SDKs SHOULD maintain awareness of which event types are defined by each binding’s Events section. When a trigger references an event type not listed for the actor’s mode, SDKs SHOULD emit a warning. SDKs MUST NOT reject documents based on event-mode validity; upstream protocols may define events beyond the subset covered by this OATF version. For unrecognized modes, SDKs MUST skip event validation entirely.

The complete event-mode mapping is defined in each binding’s Events section (§7.1.2, §7.2.2, §7.3.2).

Reserved for a future version. The SynthesizeBlock type appears in binding state schemas as a placeholder for LLM-powered response generation. It has no normative semantics in v0.1. See future-work §F.5 for the planned design.

FieldTypeRequiredDescription
promptStringNoFree-text prompt for the LLM. Supports {{template}} interpolation.

A conditional response entry used for binding-specific response dispatch. Appears in MCP tool/prompt responses, MCP client sampling_responses/elicitation_responses, A2A task_responses, and AG-UI tool_responses.

FieldTypeRequiredDescription
whenOptional<MatchPredicate>NoPredicate evaluated against the incoming request or binding-defined triggering event payload. Absent on the default (fallback) entry.
contentOptional<Value>NoProtocol-native response content (pass-through).
synthesizeOptional<SynthesizeBlock>NoReserved for a future version.

Static content fields are protocol-binding-specific: see the individual binding pages (§7.1–§7.3) for the complete structure of each binding’s response entries.