It would be nice to use some js interpreter to provide a safe eval context in agents.js. I think [this one](https://github.com/justjake/quickjs-emscripten) could do it quite well, as you can bind external functions to the QuickJS context, which would let us call the tools.