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:
- Non-role:
Carry speaker role and content to standardize history handling and audit capture.
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}
3. Related Use Cases
UC-06Three-layer buffer boundary:UC-20Deterministic replay and audit trail:
Serves as a normalized history unit in context isolation flows.
Acts as immutable conversation records for replay reconstruction.
4. Governance & Determinism
- Immutability:
- Role normalization:
- Sequence stability:
Role and Content should be treated as immutable once committed.
Implementations should map provider-specific role variants to kernel-standard roles.
Message ordering and payloads must remain stable for deterministic replay parity.
5. Implementation Notes
- Extensibility:
- Serialization:
Introduce tool-call or multimodal payloads through layered/derived contracts.
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
architecture/interfaces/provider/IModelMessage.md