ghostmode
A library that lets Rust agents run sequences of tool calls through scripts.
What does it do?
Developers connect tools to a Sandbox or specify an MCP server, then provide the model with execute and poll function definitions. When a short Python script written by the model is passed to execute, tool calls run in sequence within the host process and the status is returned as JSON. If execution is still in progress, poll can be called with the run_id. Sessions can be saved and restored as bytes, and an optional backend runs untrusted scripts in a separate worker process.
Key features
- Run multiple tool calls in sequence from a Python script
- Check execution status with the execute and poll functions
- Connect custom tools or MCP servers to a Sandbox
- Save and restore idle sessions as bytes
- Use an optional backend to run scripts in a separate worker process for each session