Skip to main content

What is supported

@mastra/core 1.x. Onecortex recognises a Mastra Agent and streams it.

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 Mastra example

recipe-assistant: A Mastra agent with a recipe search tool, filtering by a diet the caller sends. It runs with no model key.

The prompt and the reply

The prompt is the agent’s input. The reply is its streamed text.

Events it reports

See Streaming and events.

The caller’s fields

In Mastra’s request context, under onecortex, which a tool reads from its second argument:

Known limits

  • Mastra’s memory is not configured by Onecortex. Attach your own storage if the agent needs to remember across instances.

Troubleshooting

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