I don’t think you can give an agent some JS code for instance and have it execute it in node. At least afaik. Maybe just write a good tool for an MCP server with all the params it might need for the complex query?

Reply to this note

Please Login to reply.

Discussion

I wonder if there’s an opportunity there: a protocol that allows agents to spin up a runtime to execute code within the context of a query and then deprecate it quickly once it’s done

Yea I don't artifacts support this atm. Seems like doing something like this could be risky tho.

https://support.anthropic.com/en/articles/9487310-what-are-artifacts-and-how-do-i-use-them

I’ll spend some time tomorrow looking into this, but at first glance, I’m not sure what I’m talking about would be an “artifact”