The agent runs a specific script in an isolated environment and returns the output or generated artifacts to the user, ensuring no side effects on the host system.
The agent identifies the code to be executed and prepares any necessary input files in the workspace if needed. It then uses run_code to execute the script in the isolated sandbox. The agent captures the stdout/stderr or any files written to the workspace by the code and presents the results to the user. The user should ensure the code is safe and review the output for accuracy.
- Category: Data and analysis
- Effect: Read-only
- MCP servers: AgentSpace MCP (https://koskamo.com/explore/agentspace-mcp)
- Source: AgentSpace for AI agents: a persistent workspace, sandbox and hosting (https://agentspace.com.br/agents)
- Source quote: "run_code Execute code in an isolated container with your workspace mounted at /workspace and set as the working directory."
- Playbook page: https://koskamo.com/explore/use-cases/execute-code-and-retrieve-results-in-sandbox
Prompt: Run a Python script that calculates the sum of numbers from 1 to 100 and prints the result. Show me the output.