Spec gap: graph_execute operator does not specify how the incoming message maps to graph initial state #15

Open
opened 2026-05-27 05:26:17 +00:00 by hurui200320 · 0 comments
Member

Problem

§5.3.2 defines the graph_execute bridge operator:

The operator MUST execute the named graph for each incoming message, wait for the result, and forward a message whose content is the final state's last assistant message (or the full state dictionary if no messages are present).

The output mapping is specified (final state → outgoing message), but the input mapping is not: how is the incoming stream message translated into the graph's initial state?

Specifically:

  • Is message.content placed as the first user message in state.messages?
  • Is message.metadata merged into state.metadata?
  • Is message.metadata.context used as the initial context for the graph execution?
  • Is the graph's state completely fresh for each graph_execute call, or does it carry over from a previous call (especially given the related graph state scoping issue)?

Without this mapping, two implementations of graph_execute can pass the same incoming message and produce graphs with completely different initial states.

Fix Needed

Add a precise input mapping specification to the graph_execute operator definition:

  1. How message.content maps to the initial state
  2. How message.metadata (especially metadata.context) maps to initial state metadata
  3. Whether the graph state is always fresh or potentially persistent

References

  • §5.3.2 — graph_execute (Bridge Operator)
  • §6.3 — Graph State
  • §12.2.1 — Message Structure
## Problem §5.3.2 defines the `graph_execute` bridge operator: > The operator MUST execute the named graph for each incoming message, wait for the result, and forward a message whose `content` is the final state's last assistant message (or the full state dictionary if no messages are present). The output mapping is specified (final state → outgoing message), but the **input mapping** is not: how is the incoming stream message translated into the graph's initial state? Specifically: - Is `message.content` placed as the first user message in `state.messages`? - Is `message.metadata` merged into `state.metadata`? - Is `message.metadata.context` used as the initial context for the graph execution? - Is the graph's state completely fresh for each `graph_execute` call, or does it carry over from a previous call (especially given the related graph state scoping issue)? Without this mapping, two implementations of `graph_execute` can pass the same incoming message and produce graphs with completely different initial states. ## Fix Needed Add a precise input mapping specification to the `graph_execute` operator definition: 1. How `message.content` maps to the initial state 2. How `message.metadata` (especially `metadata.context`) maps to initial state metadata 3. Whether the graph state is always fresh or potentially persistent ## References - §5.3.2 — `graph_execute` (Bridge Operator) - §6.3 — Graph State - §12.2.1 — Message Structure
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/actors-spec#15
No description provided.