Agent Message
Base type for messages exchanged between agents.
The hierarchy is sealed at the performative level: every concrete message is ultimately one of Request, Inform, Propose, Accept, Reject, or Cancel. The performatives themselves are open so that user models can add domain-specific payloads (for example, a concrete class TaskOffer : AgentMessage.Request<Task>(...)).
This vocabulary is loosely inspired by FIPA's Agent Communication Language, but kept intentionally small. It is sufficient to express Contract-Net-style task delegation, request/inform interactions, and simple negotiation.
The performatives are nested inside AgentMessage (so user code says AgentMessage.Request(...) rather than a bare Request) for two reasons: it keeps the sealed family visually associated with its parent, and it prevents collision with KSL's existing inner Request types in ProcessModel.Entity and related classes — those would otherwise shadow ours inside any process { } body, which is exactly where messages are constructed.
The from reference is typed as ProcessModel.Entity rather than the more specific Agent so that messages remain usable across AgentModel instances. Handlers that need the concrete agent type may cast.
Inheritors
Types
Indicates that the sender is withdrawing from the conversation, abandoning whatever request or task was previously in flight.
An informational message that conveys a fact (payload) to the recipient without expecting any particular response.
A proposal carrying a candidate proposal for the recipient to evaluate, typically in response to an earlier Request. Used as the bid step of Contract-Net-style interactions. The conversation id is required because a propose is meaningful only as part of an ongoing exchange.
A request that the recipient perform some action, expressed via payload.
Properties
Optional identifier that groups messages belonging to the same logical exchange (a Contract-Net call, a multi-turn negotiation, a tracked task lifecycle). Use a fresh value per conversation when grouping matters; leave null for one-shot messages.
The entity (typically an AgentModel.Agent) that sent this message.