OpenSandbox support for the Agno agent framework
Project description
agno-opensandbox-toolkit
OpenSandbox support for the Agno agent framework.
Give your Agno agents the ability to execute shell commands, manage files, and run code in secure, isolated OpenSandbox containers.
Installation
# Base: shell commands + file operations
uv add agno-opensandbox-toolkit
# With code interpreter support (Python, JS, Java, Go, Bash)
uv add "agno-opensandbox-toolkit[code-interpreter]"
Prerequisites
You need a running OpenSandbox server. The quickest way:
uv pip install opensandbox-server
opensandbox-server init-config ~/.sandbox.toml --example docker
opensandbox-server
See the OpenSandbox docs for full setup instructions.
Quick Start
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno_opensandbox_toolkit import OpenSandboxTools
agent = Agent(
name="Sandbox Agent",
model=OpenAIChat(id="gpt-4o-mini"),
tools=[OpenSandboxTools()],
markdown=True,
)
agent.print_response("Create a file /tmp/hello.py that prints 'Hello from OpenSandbox!', then run it")
Configuration
| Parameter | Env Variable | Default | Description |
|---|---|---|---|
domain |
OPENSANDBOX_DOMAIN |
localhost:8080 |
OpenSandbox server address |
api_key |
OPENSANDBOX_API_KEY |
"" |
API key for authentication |
protocol |
— | http |
Connection protocol (http or https) |
image |
— | ubuntu |
Container image |
timeout_minutes |
— | 10 |
Sandbox TTL |
sandbox_env |
— | {} |
Env vars inside sandbox |
sandbox_resources |
— | None |
e.g. {"cpu": "2", "memory": "4Gi"} |
sandbox_entrypoint |
— | None |
Custom entrypoint command list |
sandbox_metadata |
— | None |
Metadata labels dict |
enable_code_interpreter |
— | False |
Enable run_code tool |
persistent |
— | True |
Reuse sandbox across calls |
sandbox_id |
— | None |
Reconnect to existing sandbox |
Available Tools
| Tool | Description |
|---|---|
run_shell_command |
Execute bash commands |
create_file |
Create/update files |
read_file |
Read file content |
list_files |
List directory contents |
delete_file |
Delete files/directories |
change_directory |
Change working directory |
get_sandbox_status |
Get sandbox info |
shutdown_sandbox |
Kill the sandbox |
run_code |
Execute code via interpreter (optional) |
License
The project is published under the BSD 3-Clause license. For details see the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agno_opensandbox_toolkit-0.1.0.tar.gz.
File metadata
- Download URL: agno_opensandbox_toolkit-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c3e0d2e9a4250689a5fcee419b679ece6e559cebeecef33232b1da7ce8c8cd9
|
|
| MD5 |
b4a30979436054c5eab39f08931e0fb3
|
|
| BLAKE2b-256 |
ed354ab23d432182a7087b518a59737eac3bbdfb8eb7948bbc3062fb97f09bf4
|
File details
Details for the file agno_opensandbox_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agno_opensandbox_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cfabcc666f973edda05d1e1288b9079d91871ecfe5dd1866dda9ce4c404b5cd
|
|
| MD5 |
7df2c420b550b937b9f5cd791d1dd2d5
|
|
| BLAKE2b-256 |
f96281f99eceee52f0e179e36798f6754ea1da589c634d7ad4e9017c18a4b42a
|