Skip to content

[Question] Persisting / retrieving sub‑agent (node) names in thread history #56

@austinmw

Description

Hi,

I am using LangGraph Platform for my backend with a frontend deployed in Vercel.

I stream responses from a langgraph‑supervisor graph and display which sub‑agent is active.
I get the name from debug events in the SSE stream:

// streamMode includes "debug"
for await (const event of stream) {
  if (event.event === "debug" &&
      event.data?.type === "task") {
    const nodeName = event.data.payload?.name;   // e.g. "Email Agent"
    // show "Email Agent: <response>"
  }
}

Debug event shape:

{
  "event": "debug",
  "data": {
    "type": "task",
    "payload": { "name": "<node_name>" }
  }
}

When I later fetch the thread via

GET /threads/{id}
GET /threads/{id}/history

the values.messages (or messages) array contains only standard Agent‑Protocol messages (user, assistant, tool, …).
No node/agent names are present, so after a reload—or on another device—I can’t tell which sub‑agent produced each response.

Questions

  1. Is there an existing field or endpoint that already exposes the executing node / sub‑agent name for each step?
  2. If not, would it be appropriate to open a feature request for
       • including node‑change data as messages with a custom role/metadata, or
       • adding it to checkpoints / message metadata so it persists in thread history?

Any guidance would be greatly appreciated. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions