Metadata-Version: 2.4
Name: smolagents-capsule
Version: 0.1.2
Summary: Capsule sandbox integration for smolagents — run code in isolated WebAssembly sandboxes
Project-URL: Homepage, https://github.com/mavdol/capsule
Project-URL: Repository, https://github.com/mavdol/smolagents-capsule
Author: Capsule Contributors
License: MIT
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: capsule-run>=0.6.3
Requires-Dist: smolagents>=1.0.0
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-asyncio; extra == 'test'
Description-Content-Type: text/markdown

# smolagents-capsule

Capsule integration for smolagents

## What is this?

`smolagents-capsule` gives smolagents the ability to safely execute Python and JavaScript code in an isolated WebAssembly sandbox.

The WebAssembly sandbox files (.wasm) are already bundled inside this package; no configuration or network request is necessary to execute the sandboxes dynamically.

## Installation

```bash
pip install smolagents-capsule
```

## Usage

The package provides tools for executing code inside an isolated environment.

```python
from smolagents_capsule import CapsulePythonTool, CapsuleJSTool

# Python Example
python_tool = CapsulePythonTool()
result = python_tool.forward("1 + 1")
print(result)  # "2"

# JavaScript / TypeScript Example
js_tool = CapsuleJSTool()
result = js_tool.forward("1 + 2")
print(result)  # "3"
```

Visit [Capsule](https://github.com/mavdol/capsule) repository for more information.

## License

MIT License
