Hi, so - we have one instance of the graph using supervisor pattern:
# Create the supervisor graph
supervisor_graph = create_supervisor(
agents=agents,
model=model,
tools=tools,
prompt=prompt,
state_schema=state_schema,
output_mode=output_mode,
add_handoff_back_messages=add_handoff_back_messages,
supervisor_name=supervisor_name,
)
This is created once, and is shared across all customers (they use the same instance of the graph)
- to separate customers - we use
return main_graph.compile(checkpointer=short_term_memory)checkpointer and attach specific config to differentiate between sessions.
Let’s say - i want to add github MCP - GitHub - github/github-mcp-server: GitHub's official MCP Server
this requires PAT to be sent with the request - but the PAT is different per user (i can retrieve user specific PATs from a secret store we have)
so - what’s the correct way to do it? should i levarage this?