| Internet-Draft | NAIM Operation IR | July 2026 |
| Feng | Expires 19 January 2027 | [Page] |
This document defines Operation IR, a protocol-neutral intermediate representation for runtime network operations in the NAIM architecture. Operation IR serves as an AI-friendly operation layer between AI agents or LLM-based systems and the underlying network management protocols. It captures write operations, retrieval, RPC/action invocation, filtering, transaction metadata, precondition verification, compensation semantics, and optional expression-based values.¶
Operation IR is designed to be consumed by any upstream mechanism capable of generating structured operation intent, including but not limited to MCP tool invocations, function calling interfaces, and agent-to-agent communication protocols. The translation of Operation IR into protocol-specific messages is performed deterministically by a Handler component, keeping the AI agent in the role of intent encoder rather than protocol executor.¶
This document also defines context completeness classes for the Originator (AI agent) side, validation feedback requirements, and an execution preview mode intended to improve safety and operator trust. It standardizes semantic expectations and interoperability boundaries, but does not standardize proprietary dialogue policies, implementation-specific scheduling internals, automatic compensation derivation algorithms, or private execution-engine logic.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 19 January 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The NAIM framework introduced a structured semantic representation for AI-assisted network modeling based on YANG [RFC7950]. The same semantic discipline is useful for runtime network operations, where users increasingly expect to express configuration, monitoring, and troubleshooting requests using high-level or natural-language intent.¶
NAIM Operation IR defines the operation layer of the NAIM architecture. It sits between the AI agent (Originator) and the network management protocols, providing a structured, AI-friendly representation of operational intent that can be deterministically translated into protocol messages by a Handler component. This separation keeps protocol complexity out of the AI reasoning loop.¶
The upstream interface of Operation IR is deliberately protocol-agnostic: Operation IR objects may be submitted by an LLM via MCP tool invocations, function calling, agent-to-agent communication protocols, or any other mechanism. The choice of upstream delivery mechanism does not affect the semantics of the Operation IR itself. Companion documents define specific upstream bindings (e.g., MCP integration).¶
The downstream interface of Operation IR targets model-driven network management protocols, with NETCONF [RFC6241] and RESTCONF [RFC8040] as the primary examples. Handlers MAY support additional management protocol backends.¶
Direct translation of runtime intent into protocol messages suffers from:¶
NAIM-OP addresses these problems by introducing Operation IR, a protocol-neutral intermediate object designed to capture runtime semantics before protocol-specific requests are produced.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Where examples of JSON or other structured content exceed the line-length limits of this document format, the single-backslash strategy ('\') defined in [RFC8792] is used to fold long lines.¶
This document describes:¶
This document does not standardize:¶
NAIM-OP is guided by:¶
Operation IR occupies the operation layer of the NAIM architecture, positioned between the semantic layer (NAIM Document and LLM Context View) and the protocol execution layer:¶
AI Agent / LLM (Originator) | | [any upstream mechanism: MCP, function calling, A2A, ...] | Operation IR <-- this document | | [deterministic Handler translation] | NETCONF / RESTCONF / other management protocols | Network Infrastructure¶
The Handler is responsible for:¶
The Originator is responsible for generating semantically correct Operation IR objects based on user intent and the NAIM LLM Context View. The Originator does not construct protocol-specific messages directly.¶
The complete flow from user intent to device execution is illustrated below. The Originator side (steps 1-6) covers how the AI agent retrieves semantic context, elicits missing parameters, resolves preconditions, and generates a complete Operation IR. The Handler side (steps A-E) covers deterministic validation, precondition verification against the live device, protocol translation, execution, and automatic compensation on failure. Detailed description of the Originator workflow is provided in Section 7. Handler behavior is described in Sections Section 8 through Section 14.¶
User | | natural language intent | v Originator (AI Agent / LLM) | |--[1]--> Retrieve NAIM LLM Context View for target resource | (fields, constraints, operation vocabulary, | preconditions, side effects, examples) | |--[2]--> Identify target resource and operation | from intent and Context View | |--[3]--> Check required fields against Context View | Missing required fields --> elicit from user [LOOP] | Hard Constraint violation --> re-elicit with guidance | Soft Constraints --> confirm with user | |--[4]--> Resolve preconditions from Context View | Structured preconditions --> populate precondition_state | Natural language preconditions --> confirm with user | |--[5]--> Determine compensation need from Context View | Write operations with declared side effects --> | populate compensation | |--[6]--> Generate complete Operation IR | v Handler (deterministic) | |--[A]--> Validate Operation IR against NAIM Canonical Document |--[B]--> Verify precondition_state against live device state |--[C]--> Translate to protocol-specific messages |--[D]--> Execute against network device |--[E]--> Trigger compensation on failure | v Execution Report --> Originator --> natural language result --> User¶
This section describes how an Originator (AI agent or LLM-based system) uses the NAIM LLM Context View to understand user intent and generate a semantically complete Operation IR. This workflow is the core value proposition of NAIM-OP: by grounding intent generation in explicit semantic context, the Originator produces Operation IR objects that are safe, complete, and deterministically executable by the Handler.¶
The specific dialogue strategies and question ordering used by an Originator are implementation choices and are not standardized by this document. The following describes the expected logical stages.¶
Before generating an Operation IR, the Originator SHOULD retrieve the NAIM LLM Context View for the target resource. The LLM Context View provides the semantic information the Originator needs to reason correctly about the operation, including:¶
The Originator MUST NOT generate an Operation IR by guessing field names, types, or constraints from training knowledge alone. Semantic grounding in the NAIM LLM Context View is the mechanism that distinguishes NAIM-OP from generic function calling.¶
Once the Context View is available, the Originator maps the user's natural language intent to a specific operation defined in the Context View. This includes:¶
If the intent is ambiguous or maps to multiple possible operations, the Originator SHOULD seek clarification from the user before proceeding.¶
After identifying the target operation, the Originator checks the required fields declared in the Context View against the parameters extracted from user intent. For any required field that is missing or invalid, the Originator MUST elicit the value from the user through targeted questions grounded in the Context View.¶
Elicitation SHOULD be specific and informative. The Originator SHOULD use the field's description, type, constraints, and examples from the Context View to formulate questions. For example, instead of "Please provide the MTU value", the Originator SHOULD ask: "Please provide the MTU value for interface eth0. The allowed range is 68 to 65535 bytes; common values are 1500 (standard) and 9000 (jumbo frames)."¶
Hard Constraint validation MUST be applied to each value as it is received. If a provided value violates a Hard Constraint, the Originator MUST reject the value, explain the constraint to the user, and re-elicit. The Originator MUST NOT pass a value that violates a Hard Constraint to the Handler.¶
Soft Constraints represent operation-time preferences that are not model-derived. The Originator SHOULD confirm Soft Constraints with the user before including them in the Operation IR.¶
The elicitation loop continues until all required fields are populated with values that satisfy Hard Constraints. The Originator SHOULD present a summary of the planned operation to the user for confirmation before generating the final Operation IR.¶
The Context View may declare preconditions for each operation. Preconditions come in two forms:¶
Structured preconditions are machine-evaluable conditions expressed as field-path and expected-value pairs. The Originator SHOULD include these in the precondition_state field of the Operation IR, allowing the Handler to verify them automatically against live device state before execution.¶
Natural language preconditions are human-readable descriptions that cannot be automatically verified. The Originator SHOULD present these to the user and request explicit confirmation that the precondition is satisfied before proceeding.¶
For write operations (create, update, delete, replace), the Originator SHOULD examine the side effects and state transition information declared in the Context View to determine whether a compensation operation is warranted. If the operation has declared side effects that may need to be reversed on failure, the Originator SHOULD populate the compensation field of the Operation IR with an appropriate reversing operation.¶
The Originator derives compensation operations from the Context View's operation vocabulary. For example, if the Context View declares that a create operation can be reversed by a delete operation targeting the same resource, the Originator SHOULD include that delete as the compensation for the create.¶
An Operation IR object typically contains:¶
operation is required. Recognized values include: create, update, delete, replace, get, get-config, rpc, and action.¶
target is required and MUST be an absolute schema path. For list instances, key predicates SHOULD be included where necessary to identify a specific instance.¶
values carries configuration payload or input parameters. It SHOULD be omitted for retrieval-only or pure deletion cases when not needed.¶
filter is used for retrieval operations and SHOULD use one unambiguous filter form per operation.¶
order MAY express numeric sequencing or explicit dependency relationships among operations.¶
description MAY carry a human-readable summary suitable for audit, logging, preview, or operator review.¶
context MAY include: module, datastore, transaction_id, timeout, execution_mode, and context_completeness.¶
context_completeness describes the completeness of the NAIM LLM Context View available to the Originator at the time the Operation IR was generated. It does not describe the Handler's internal NAIM Document, which SHOULD always be a complete canonical representation.¶
precondition_state MAY map one or more paths to expected values that MUST hold before execution.¶
compensation MAY contain one or more Operation IR objects intended to reverse or mitigate previously executed changes.¶
constraints MAY contain operation-time conditions such as soft constraints or structured expectations.¶
Datastore selection in Operation IR follows the Network Management Datastore Architecture (NMDA) defined in [RFC8342] and its updates. The datastore field in Operation IR context SHOULD reference a datastore by its NMDA-defined name or a vendor-defined name where applicable.¶
[RFC8342] defines conventional configuration datastores as: running, startup, candidate, and intended. [I-D.ietf-netmod-system-config] updates this definition to also include system. These datastores share a common datastore schema, and protocol operations allow copying data between them.¶
[RFC8342] defines dynamic configuration datastores as an extensible category for configuration obtained dynamically during device operation through interaction with other systems. Vendor-defined dynamic datastores MAY be referenced by name in Operation IR.¶
Additional datastores defined outside the above categories MAY also be referenced by name in Operation IR. An example is:¶
Operation IR implementations SHOULD support selection of any NMDA-conformant datastore by name. If a requested datastore is not supported by the Handler or the target device, the Handler MUST return a validation error rather than silently falling back to an alternative datastore.¶
Hard constraints are derived from semantic model context and MUST take precedence over operation-time preferences.¶
Implementations MAY support expression objects including comparison operators, logical operators, arithmetic operators, and dynamic references.¶
If a referenced value cannot be resolved, the implementation SHOULD fail the operation before generating a final protocol request.¶
Context completeness describes the quality of the NAIM LLM Context View available to the Originator (AI agent) when generating an Operation IR. In some environments the Originator has access to a full LLM Context View derived from a complete NAIM Document. In others, only a partial or skeleton-level view is available. This section defines completeness classes for the Originator side.¶
Note: The Handler SHOULD always maintain a complete NAIM Canonical Document internally. Context completeness classes apply to the Originator's view, not to the Handler's internal representation.¶
A skeleton context SHOULD include, where available:¶
An Originator MAY generate Operation IR in best-effort mode when only partial or skeleton context is available. If it does so, the context_completeness field MUST be set accordingly, and the Originator MUST disclose that semantic guidance is incomplete. The Handler MUST NOT relax validation requirements based on the Originator's declared context completeness.¶
Multiple Operation IR objects MAY be associated by a shared transaction identifier.¶
If a required precondition fails, the associated operation MUST NOT be executed.¶
Compensation operations SHOULD be subject to the same authorization, validation, and logging expectations as normal operations.¶
Implementations supporting transactions SHOULD define behavior for: precondition failure, mid-transaction failure, compensation failure, timeout during grouped execution, and loss of connectivity during rollback.¶
An implementation SHOULD support an execution preview capability so that an operator can review planned actions before actual device change occurs.¶
The context member MAY contain execution_mode. Recognized values MAY include: apply, dry-run, plan-only, and validate-only. This document specifically defines dry-run semantics.¶
When execution_mode is dry-run, the Handler MUST NOT apply actual configuration changes to the target system. Instead, it SHOULD return an execution preview containing:¶
A dry-run result MAY be incomplete if live-state dependencies, authorization results, or external conditions cannot be fully verified without execution. Such limitations SHOULD be disclosed.¶
The Handler performs deterministic translation of validated Operation IR objects into protocol-specific messages appropriate to the target device or management system. This translation is a Handler concern and is not visible to the Originator.¶
NETCONF [RFC6241] and RESTCONF [RFC8040] are the primary target protocols. A conforming Handler SHOULD be capable of translating Operation IR into one or more of:¶
Handlers MAY support additional management protocol backends. The choice of target protocol and the specific wire format produced are Handler implementation decisions. The Operation IR representation is identical regardless of which protocol the Handler uses for execution.¶
Operation IR objects MAY be delivered to the Handler by any upstream mechanism. The semantic content of an Operation IR object is independent of the upstream delivery mechanism. Companion documents define specific upstream bindings, such as MCP tool integration.¶
Implementations SHOULD use the Validation Error Envelope model defined by the NAIM framework for Operation IR validation failures.¶
Common categories MAY include:¶
Independent implementations SHOULD be able to:¶
Implementations SHOULD address:¶
Network device credentials MUST be managed by the Handler and MUST NOT be included in Operation IR objects or exposed to the Originator.¶
This document has no IANA actions.¶
NOTE: '\' line wrapping per RFC 8792
{
"operation": "update",
"target": "/ietf-interfaces:interfaces/\
interface[name='eth0']",
"values": {
"enabled": false
},
"context": {
"datastore": "candidate",
"transaction_id": "123e4567-e89b-12d3-a456-426614174000",
"timeout": 60,
"execution_mode": "dry-run",
"context_completeness": "full"
},
"precondition_state": {
"/ietf-interfaces:interfaces/\
interface[name='eth0']/oper-status": "up"
},
"compensation": [
{
"operation": "update",
"target": "/ietf-interfaces:interfaces/\
interface[name='eth0']",
"values": {
"enabled": true
}
}
]
}
¶
The NAIM LLM Context View available to the Originator is at skeleton completeness level. The Originator is operating in best-effort mode based on structural constraints and available YANG-derived type information. Descriptive semantics and side-effect guidance may be incomplete. The Handler will perform full validation against its internal NAIM Document regardless of Originator context completeness.¶
Operation: update interface eth0 Target datastore: candidate Preview mode: dry-run Planned value change: enabled = false Preconditions: oper-status must be up Planned protocol operation: <edit-config> on candidate datastore followed by <commit> (NETCONF), or equivalent Compensation plan: restore enabled = true if later step fails¶