Someone asked a question in the Slack in #langgraph-help here that went unanswered. I thought it was interesting to dig into to learn a bit more about LangGraph Studio. Posting Ricardo’s original questions here along with the original screenshots he provided:
Original questions
I’m trying to run this example locally: langgraphjs/examples/multi_agent/agent_supervisor.ipynb at main · langchain-ai/langgraphjs · GitHub and I have a few questions:
- Why cant I use the chat tab when I have the following Agent state?
const AgentState = Annotation.Root({
messages: Annotation<BaseMessage[]>({
reducer: (x, y) => x.concat(y),
default: () => [],
}),
// The agent node that last performed work
next: Annotation<string>({
reducer: (x, y) => y ?? x ?? END,
default: () => END,
}),
});
- What are those extra nodes?
- Why can’t I just see a way to input a simple HumanMessage?
- Why do I see this typescript error? I copied the exact code that its in the example
Proposed answers
- The
AgentStatedefined in this example has additional fields beyond justmessages(e.g.next). The chat tab in LangGraph Studio is only available for graphs where chat is the main interface and the entire state is basically focused on chat history. - The
researcherAgentand thechartGenAgentare built using thecreateReactAgentprebuilt and are not normal functions. So when LangGraph Studio runs it sees that these nodes are ReAct agents and tool calls and LLM calls get visualized in the studio because these are ordinary nodes. The “3,” “4,” and “5” nodes are just created during runtime as numbers because they are not explicitly created with.addNodebut LangGraph studio still tries to visualize what’s inside these ReAct agents. - This goes back to the way
AgentStateis constructed. It needs bothmessagesandnext. In this case, the first message doesn’t requirenextfield but if you were to provide a simple string, the graph wouldn’t know if it should be thecontentin theHumanMessageor whattypeit should be. Since this supervisor example isn’t a simple chat experience, the required human input has to be the json object that the state schema requires. - Couldn’t figure out the solution for this error.

