Open Agent Loops
API Reference

SystemMessage

@open-agent-loops/core


Defined in: types/system-message.ts:29

A system-prompt turn.

Remarks

This loop usually passes the system prompt as ModelRequest.system rather than as a message, but the role is modeled for completeness and for histories that carry one inline.

Abstraction over — OpenAI's system message ({ role, content }); timestamp is the only extension. Whether sent inline or as ModelRequest.system, it serializes to the same two fields on the wire.

Example

Wire shape (OpenAI chat-completions)

{ "role": "system", "content": "You are a helpful assistant." }

Extends

  • MessageBase

Properties

PropertyTypeDescriptionOverridesInherited fromDefined in
contentstringA system prompt is always plain text (narrows the multimodal base).MessageBase.content-types/system-message.ts:33
roleSystemDiscriminant: the system-prompt turn.--types/system-message.ts:31
timestamp?number[extension — not in the OpenAI spec] Creation time (ms since epoch), for ordering.-MessageBase.timestamptypes/message-base.ts:35

On this page