Tools for your AI agents
Project description
Spadebox

Spadebox is a set of common tools for AI agents, written in Rust with JavaScript and Python bindings.
Currently, Spadebox includes the following tools:
read_filewrite_fileedit_filemovegrepglobfetchjs_repljs_exec
Spadebox uses the cap-std crate for file system sandboxing, and domain whitelisting for HTTP requests.
The JS engine is based on boa, and use the same sandboxing policies.
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.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: spadebox-0.4.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 |
0176fa4760a19067c74d710dc9875494e0a63cb5522e74353affe220c35957fc
|
|
| MD5 |
3da842390fea6d774d3ac144ef954664
|
|
| BLAKE2b-256 |
5faf58f1b8cdbe4f8326e2fa2bd8cac1e7146930c9eb675d8e527f7ca2615065
|
Provenance
The following attestation bundles were made for spadebox-0.4.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.4.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0176fa4760a19067c74d710dc9875494e0a63cb5522e74353affe220c35957fc - Sigstore transparency entry: 1484504897
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Trigger Event:
push
-
Statement type:
File details
Details for the file spadebox-0.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: spadebox-0.4.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 |
d6cd31cf19021f35d3ba0122843a442aa797b1c3c6287c31653b2f2f96627efb
|
|
| MD5 |
e5dfb61593bed5dfa115ab8aa480a754
|
|
| BLAKE2b-256 |
5a23ca4b968c1e6e4eda3d01c1f28e23e6c37949c3c1e86476491d1688adaf2b
|
Provenance
The following attestation bundles were made for spadebox-0.4.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.4.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
d6cd31cf19021f35d3ba0122843a442aa797b1c3c6287c31653b2f2f96627efb - Sigstore transparency entry: 1484504938
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Trigger Event:
push
-
Statement type:
File details
Details for the file spadebox-0.4.0-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: spadebox-0.4.0-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.5 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 |
ca239b6c406bee50e9e918242f575e6a9ccce359835e26a38b40fc8653cbe49a
|
|
| MD5 |
9b4fc7d291f0a9ae8c79ef849097dabf
|
|
| BLAKE2b-256 |
5280ee91a128ce5c28980792d7547b55f26df12390cec1651596ca56fb30d7df
|
Provenance
The following attestation bundles were made for spadebox-0.4.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.4.0-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
ca239b6c406bee50e9e918242f575e6a9ccce359835e26a38b40fc8653cbe49a - Sigstore transparency entry: 1484504865
- Sigstore integration time:
-
Permalink:
CharlyCst/spadebox@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/CharlyCst
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yml@27b8ed1f7c437559366b08452587cd7e8d9a8c1f -
Trigger Event:
push
-
Statement type: