Messages

org.llm4s.agent.graph.toolloop.Messages
object Messages

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Messages.type

Members list

Value members

Concrete fields

val MaxInlineBytes: Long

The most inline media bytes a thread's messages hold, in total: 20 MiB, four inline parts at ContentPart.MaxInlineBytes. Each part and each tool result is bounded on its own, but a thread gains messages turn after turn and every checkpoint copies them all, so the history is bounded too. A message appended (or replaced) past the bound is kept with its own inline media parts replaced, first to last, by a text part naming what was removed, until the history fits: a total update, so no run fails for it, whatever wrote the media - a tool, a caller's imported history, a batch of results that each fit on their own. Only the incoming message is changed, never the history before it, so an output Block's RemoveTurn retracts a turn without having to restore anything it evicted.

The most inline media bytes a thread's messages hold, in total: 20 MiB, four inline parts at ContentPart.MaxInlineBytes. Each part and each tool result is bounded on its own, but a thread gains messages turn after turn and every checkpoint copies them all, so the history is bounded too. A message appended (or replaced) past the bound is kept with its own inline media parts replaced, first to last, by a text part naming what was removed, until the history fits: a total update, so no run fails for it, whatever wrote the media - a tool, a caller's imported history, a batch of results that each fit on their own. Only the incoming message is changed, never the history before it, so an output Block's RemoveTurn retracts a turn without having to restore anything it evicted.

Attributes

The conversation, as a typed state key. Every update is checked against the current history.

The conversation, as a typed state key. Every update is checked against the current history.

Version 2 (#1913): a user or tool message may carry content parts. Version-1 JSON is valid version 2 - core's Message reader takes the old string shape as one text part - so the step is the identity; the version is what makes an older runtime refuse a value that may hold parts.

Attributes