AIKernel.NET
version: 0.0.2 / status: Refactor / edition: Draft / published: 2026-05-16 / updated: 2026-05-16

For Japanese version, see IModelMessage-jp.md.

IModelMessage (Interface Specification)

1. Responsibility Boundary

IModelMessage is the atomic discourse unit for provider-agnostic model dialogue, offering a normalized message shape across the kernel.

  • Role:
  • Carry speaker role and content to standardize history handling and audit capture.

  • Non-role:
  • Transport details, SDK-specific envelopes, and binary attachment management are out of scope.

2. Contract Signature

namespace AIKernel.Abstractions.Providers;\n\npublic interface IModelMessage\n{\n    string Role { get; }\n    string Content { get; }\n}
  • UC-06 Three-layer buffer boundary:
  • Serves as a normalized history unit in context isolation flows.

  • UC-20 Deterministic replay and audit trail:
  • Acts as immutable conversation records for replay reconstruction.

4. Governance & Determinism

  • Immutability:
  • Role and Content should be treated as immutable once committed.

  • Role normalization:
  • Implementations should map provider-specific role variants to kernel-standard roles.

  • Sequence stability:
  • Message ordering and payloads must remain stable for deterministic replay parity.

5. Implementation Notes

  • Extensibility:
  • Introduce tool-call or multimodal payloads through layered/derived contracts.

  • Serialization:
  • Keep property shape simple and stable for archival and audit portability.


Changelog

  • v0.0.0 / v0.0.0.0: Initial draft
  • v0.0.1 (2026-05-06): Version upgrade aligned with documentation guidelines
Source: architecture/interfaces/provider/IModelMessage.md