Is Context for static information or for langgraph assistant configurations?

@pawel-twardziak Thank you for the quick response and detailed explanation! Yes, I have read those docs which has partially led to my confusion.

So in this example, how would you go about making context traceable (using the decorator or is there a config to enable that behavior by default)?

For additional insight:

Imagine trying to do a trace replay of a run where the runtime context used for that run matters. I believe LangGraph studio only allows you to drop in state in the input…. and “context” is only able to be added via the settings/manage assistants button, right? I can’t imagine needing an assistant for every single user to replay a trace haha

Any suggestions on how to “properly” put “context” items in context but still have that trace replay ability?

# assume these don’t change in the graph (maybe not the best example variables)
# these are added as context by the api invoking the agent.
context = {
    "customer_name": "David",
    "customer_profile_summary": "...",
}
my_agent.invoke(initial_state, context=context)