Skip to main content

smolagents-pilldrops

PillDrops sandboxes for smolagents. A CodeAgent's Python runs in a PillDrops cloud sandbox, and variables carry over between steps the way they do in a notebook.

Install

pip install smolagents-pilldrops
export PILLDROPS_API_KEY=sf_live_...   # from https://pilldrops.com/dashboard

Use

from smolagents import CodeAgent, LiteLLMModel

from smolagents_pilldrops import PillDropsExecutor

executor = PillDropsExecutor(additional_imports=["requests"])
try:
    agent = CodeAgent(
        tools=[],
        model=LiteLLMModel(model_id="anthropic/claude-opus-5-5"),
        executor=executor,
    )
    print(agent.run("How many of the first 40 Fibonacci numbers are even?"))
finally:
    executor.cleanup()   # deletes the sandbox

Options

Argument Default Meaning
additional_imports [] Packages to pip install in the sandbox
template code-interpreter Any PillDrops template with python3
timeout 300 Seconds each code step may run
sandbox none Use an existing pilldrops.Sandbox; cleanup() then leaves it running
other keywords Passed to Sandbox.create, e.g. timeout=1800 for the sandbox lifetime

How it works

The executor starts a small Python process in the sandbox (kernel.py, standard library only) that keeps one namespace for the whole run. Each step's code is sent to it, and the reply carries the printed output, the value of a trailing expression, or the error with its traceback. final_answer(...) ends the run as with smolagents' other remote executors.

Images returned as a step's value are shown as their text form.

License

MIT

Metadata

Release files for smolagents-pilldrops 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for smolagents-pilldrops 0.1.0
File Size Uploaded Provenance Actions
smolagents_pilldrops-0.1.0.tar.gz 4.7 kB Without provenance Details for smolagents_pilldrops-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for smolagents-pilldrops 0.1.0
File Interpreter ABI Platform Actions
smolagents_pilldrops-0.1.0-py3-none-any.whl Python 3 none any Details for smolagents_pilldrops-0.1.0-py3-none-any.whl

Total release size: 9.8 kB

Release files / smolagents_pilldrops-0.1.0.tar.gz

Download URL smolagents_pilldrops-0.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3d28a6822bec0915397ac4dec68f1eb0d5b6b9dacd0e54684a12f17a9dcff66c
BLAKE2b-256 checksum
How to use checksums
244e26d1eab5bf66812d21cc52227eb5a8613daf85bbd83b53c8a2ca28ed76da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / smolagents_pilldrops-0.1.0-py3-none-any.whl

Download URL smolagents_pilldrops-0.1.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f7bc72155242bb7d2c85d9f59023413fbb4a3c439a5c812fc403fcdced140a0
BLAKE2b-256 checksum
How to use checksums
f5b0aad6b0f9ace7706c73a4097d4ebefbc9c03d717f16a1d28536a5bd68b13a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for smolagents-pilldrops 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page