Tools for your AI agents
Project description
Spadebox is a set of tools for lightweight AI agents, written in Rust with JavaScript and Python bindings. Focus on your domain-specific tools — give your agent SpadeBox for the rest.
| Category | Tools |
|---|---|
| Files | read_file, write_file, edit_file, move, grep, glob |
| Network | fetch |
| Code execution | js_repl, js_exec |
Features
Lightweight sandboxing:
SpadeBox uses the cap-std crate for file system sandboxing, and domain whitelisting for HTTP requests.
The JS engine is based on boa, and uses the same sandboxing policies.
No bash tool:
SpadeBox has been designed to work well even without a bash tool.
SpadeBox exposes a JS engine for code execution, and provides the common file system operations for your agent to be effective without needing to shell-out.
If you would like your agent to use bash you can provide your own bash tool in addition to SpadeBox.
Just the tools:
SpadeBox does one thing: it provides tools. Write your own agent loop or use your favorite framework, SpadeBox doesn't have an opinion on that.
Small perks:
SpadeBox's tools include small quality of life features for your AI agents. Default tool output limit and HTML to markdown conversion protect the agent's context, while read-before-write rule limits risks of data losses.
Usage
JavaScript
import { SpadeBox } from "@spadebox/spadebox";
const sb = new SpadeBox()
.enableFiles("/workspace")
.enableHttp()
.allow("api.example.com", ["GET", "POST"])
.enableJs();
const tools = sb.tools(); // pass to your LLM as available tools
// dispatch a tool call coming from the model
const result = await sb.callTool("read_file", JSON.stringify({ path: "src/main.rs" }));
Rust
use spadebox_core::{Sandbox, DomainRule, HttpVerb, enabled_tools, call_tool};
let mut sandbox = Sandbox::new();
sandbox
.enable_fs("/workspace")?
.enable_http()
.allow(DomainRule::new("api.example.com", vec![HttpVerb::Get, HttpVerb::Post])?)
.enable_js();
let tools = enabled_tools(&sandbox); // pass to your LLM as available tools
// dispatch a tool call coming from the model
let result = call_tool(&sandbox, "read_file", r#"{"path":"src/main.rs"}"#.into()).await?;
Python
from spadebox import SpadeBox
sb = (SpadeBox()
.enable_files("/workspace")
.enable_http()
.allow("api.example.com", ["GET", "POST"])
.enable_js())
tools = sb.tools() # pass to your LLM as available tools
# dispatch a tool call coming from the model
result = sb.call_tool("read_file", '{"path": "src/main.rs"}')
MCP
# filesystem tools only
spadebox-mcp --files /workspace
# HTTP tools only (allow specific domains and verbs)
spadebox-mcp --allow "api.example.com:GET,POST" --allow "*.cdn.example.com:GET"
# JavaScript REPL only
spadebox-mcp --js
# all tools
spadebox-mcp --files /workspace --allow "api.example.com:GET" --js
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 Distributions
Built Distributions
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 spadebox-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: spadebox-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d7e840ac9e82a1a8b8ac0b783e95df9e69aa6ec9efe07d88e65e8826e790afe
|
|
| MD5 |
fdef59abeae29b598a5aeb17f1a5ac91
|
|
| BLAKE2b-256 |
9a1845a457ddef030cbbae25f8da8ec2c6aa40c67960a48399ff3281e4e8983c
|
Provenance
The following attestation bundles were made for spadebox-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
CI.yml on CharlyCst/spadebox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spadebox-0.5.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0d7e840ac9e82a1a8b8ac0b783e95df9e69aa6ec9efe07d88e65e8826e790afe - Sigstore transparency entry: 1702254290
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spadebox-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: spadebox-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 5.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19956f044ec05fe176002b02a8d8f21bbfb6acf34c5f4319449a05126aadabd7
|
|
| MD5 |
6ea72bd21f56d21b49868e08a1b9351e
|
|
| BLAKE2b-256 |
795117a613f709f3d8f78f708378f7d7d4dc84e65db2a61a9575a28944ee7d3e
|
Provenance
The following attestation bundles were made for spadebox-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
CI.yml on CharlyCst/spadebox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spadebox-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
19956f044ec05fe176002b02a8d8f21bbfb6acf34c5f4319449a05126aadabd7 - Sigstore transparency entry: 1702254312
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spadebox-0.5.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: spadebox-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.6 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5747a80f8bd752b634718953fbd1ec0bd06a29bdab0afda491023438214cada5
|
|
| MD5 |
5c3b44362e666d9fe015719effd3f85d
|
|
| BLAKE2b-256 |
7341ab4ebc4549c57986a04b3d90854ef0ad68c8c1839787448be92d4f088e1d
|
Provenance
The following attestation bundles were made for spadebox-0.5.0-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
CI.yml on CharlyCst/spadebox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spadebox-0.5.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
5747a80f8bd752b634718953fbd1ec0bd06a29bdab0afda491023438214cada5 - Sigstore transparency entry: 1702254301
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@a6d7676620d2368dc37b4051ca4ecf9dd63d4353 -
Trigger Event:
push
-
Statement type: