openai_agent.py
.
openai_agent.py
, which looks like the following:
CompiledStateGraph
instance in your LangGraph API configuration (langgraph.json
), e.g.:
openai_agent.py
to instead provide a function that takes a config and returns a graph (or compiled graph) instance. Let’s say we want to return our existing graph for user ID ‘1’, and a tool-calling agent for other users. We can modify openai_agent.py
as follows:
make_graph
) in langgraph.json
: