Urgent Bug Report: Critical Issue with Publishing Agents - Unexpected token 'export' 🚨

Hi MindStudio Community,

I’m writing to report a critical and urgent bug that is preventing me from publishing a production-ready agent. My workflow, which relies on a hybrid model of scripts and LLMs, functions perfectly in the ā€œOpen Draft Agentā€ environment but fails immediately upon publication. This is a complete blocker for deployment.

The Core Problem:

The agent uses JavaScript Run Function blocks that require the Virtual Machine execution environment to import external libraries. While I’ve configured this setting in my draft, the platform is automatically reverting the environment to Sandbox mode during the publishing process.

This environment mismatch causes a fatal error: Unexpected token 'export' [<mindstudio-vm>: since the Sandbox environment does not support the export keyword used for module imports.

Additional Glitches:

Beyond the primary error, I’ve observed other nodes returning null outputs in the published version, which function correctly in the draft. This points to a deeper issue with how the agent’s state is handled upon publishing, suggesting a critical bug in the platform’s deployment logic.

This is an urgent matter as it makes my entire project unpublishable.

Steps to Reproduce:

  1. Create an agent with a Run Function block that uses an external library and an export default statement.

  2. Set the Run Function environment to Virtual Machine.

  3. Confirm the workflow runs successfully in ā€œOpen Draft Agentā€.

  4. Publish the agent.

  5. Execute the published agent. It will fail.

I am ready to provide screenshots of the working draft execution and the failing published run logs to help with the diagnosis.

I would greatly appreciate any immediate assistance or a workaround for this critical issue.

Thanks,
Satya.K

Hi @satya.k,

Could you please share the AI Agent ID where the issue occurs? You can find it by clicking on the Agent name and copying the Agent ID at the bottom of the page.

Hi @Alex_MindStudio,

Thanks for the quick response. The Agent ID is: 346179a6-28e3-4785-9a8d-8ad5570f9735

I’m happy to provide more details or screenshots if needed.

Best,

Hi @alex_mindstudio,
Following up on this issue as I have shared the agent ID (The Agent ID is: 346179a6-28e3-4785-9a8d-8ad5570f9735) as requested. Could you let me know if there is any update on this issue. Hope you understand the urgency.

Thanks in advance,

satya.k

Hi MindStudio Community,

I’m writing to report a critical and urgent bug that is preventing me from publishing a production-ready agent. My workflow, which relies on a hybrid model of scripts and LLMs, functions perfectly in the ā€œOpen Draft Agentā€ environment but fails immediately upon publication. This is a complete blocker for deployment.

The Agent ID is: 346179a6-28e3-4785-9a8d-8ad5570f9735

The Core Problem:

The agent uses JavaScript Run Function blocks that require the Virtual Machine execution environment to import external libraries. While I’ve configured this setting in my draft, the platform is automatically reverting the environment to Sandbox mode during the publishing process.

This environment mismatch causes a fatal error: Unexpected token ā€˜export’ [: since the Sandbox environment does not support the export keyword used for module imports.

Additional Glitches:

Beyond the primary error, I’ve observed other nodes returning null outputs in the published version, which function correctly in the draft. This points to a deeper issue with how the agent’s state is handled upon publishing, suggesting a critical bug in the platform’s deployment logic.

This is an urgent matter as it makes my entire project unpublishable.

Steps to Reproduce:

  1. Create an agent with a Run Function block that uses an external library and an export default statement.
  2. Set the Run Function environment to Virtual Machine.
  3. Confirm the workflow runs successfully in ā€œOpen Draft Agentā€.
  4. Publish the agent.
  5. Execute the published agent. It will fail.

I am ready to provide screenshots of the working draft execution and the failing published run logs to help with the diagnosis.

I would greatly appreciate any immediate assistance or a workaround for this critical issue.

Thanks,

Satya.K

Hi @satya.k,

Thanks for sharing the Agent ID!

I ran a few tests on my end, but the issue didn’t come up. Could you record your screen to show the steps you’re taking and what happens when the issue appears? You can use this link:

Once you’ve recorded it, just reply here so we can take another look

Hi @Alex_MindStudio , Thanks for your quick response. I’ve tested it, and it’s working fine as expected now. I’m not sure what caused the initial issue or how it was resolved, but I appreciate the fix.

Hi @satya.k,

Glad to hear everything’s working as expected now!