Skip to main content

What is supported

@langchain/core 1.x. Onecortex recognises any runnable: an object with invoke that LangChain.js marks as its own. It streams it with streamEvents when it can.

A complete agent

agent.yml
package.json
agent.ts
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 LangChain.js example

ticket-summarizer: A runnable calling two tools, then writing a one line summary, routed by a team the caller sends. It runs with no model key.

The prompt and the reply

The prompt is passed to invoke as a string, so a chain that starts with a prompt template needs a first step that turns it into the template’s variables, as above.

Events it reports

See Streaming and events.

The caller’s fields

Under configurable.onecortex in the run’s config, which every runnable receives:

Known limits

  • The reply is the runnable’s final output, not streamed token by token.

Troubleshooting

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