Skip to main content

What is supported

LangGraph 1.0 and later. Onecortex recognises a compiled graph: the result of StateGraph(...).compile(), and anything that returns one, such as LangChain’s create_agent. An uncompiled StateGraph is not recognised.

A complete agent

agent.yml
requirements.txt
agent.py
Add OPENAI_API_KEY as a secret on the agent’s Config tab, then deploy. Any model works: this one is an example. See Configuration and secrets.

A complete LangGraph example

support-triage: A support graph with a tool node and a checkpointer, on the oldest supported LangGraph. It runs with no model key.

The prompt and the reply

The prompt arrives as the graph’s input state, {"messages": [{"role": "user", "content": prompt}]}, so a graph on MessagesState works unchanged. The reply is the text of the last message. A graph whose state has no messages answers with its final state as text.

Events it reports

See Streaming and events.

The caller’s fields

Under config["configurable"]["onecortex"], in any node that takes a config argument:
Sessions: thread_id is set from the session, so the same sessionId always reaches the same thread. Compile the graph with a checkpointer and it remembers the conversation for as long as the session’s instance runs. Onecortex does not add a checkpointer for you: for memory that outlasts an instance, compile with one backed by your own database. See Sessions.

Known limits

  • Only the compiled graph is recognised. Export builder.compile(), not builder.
  • Onecortex adds no checkpointer, and an in memory one lasts only as long as the session’s instance.

Troubleshooting

More on Troubleshooting and Errors.
Last modified on September 28, 2026