Skip to content

Instantly share code, notes, and snippets.

@kennethleungty
Last active December 6, 2025 08:01
Show Gist options
  • Select an option

  • Save kennethleungty/e453110b0da80abc241c4c3a63d15c03 to your computer and use it in GitHub Desktop.

Select an option

Save kennethleungty/e453110b0da80abc241c4c3a63d15c03 to your computer and use it in GitHub Desktop.
def supervisor_conditional_node(state: SupervisorState) -> dict:
messages = state["messages"]
# Call supervisor with full conversation history
response = supervisor_llm.invoke([SystemMessage(content=SUPERVISOR_PROMPT)] + messages)
return {"messages": [AIMessage(content=response.content, name="supervisor")]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment