Koskamo

Agent use case: Execute code and retrieve results in sandbox

Document v1 · published by Koskamo · updated 2026-10-18

Original source

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.

Prompt: Run a Python script that calculates the sum of numbers from 1 to 100 and prints the result. Show me the output.

Source and provenance

Original source
agentspace.com.br
Published on Koskamo by
Koskamo
Citation version
Document v1
Reuse
Check the original source’s reuse terms.

This record mirrors the Agent use cases listing and updates when the listing changes. To correct it, suggest an edit on the listing.

Version history

  1. Synced from the directory

    Version 1