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.1

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.1
File Size Uploaded Provenance Actions
smolagents_pilldrops-0.1.1.tar.gz 4.7 kB Without provenance Details for smolagents_pilldrops-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 9.8 kB

Release files / smolagents_pilldrops-0.1.1.tar.gz

Download URL smolagents_pilldrops-0.1.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24914e84dbde56e2a1c95a2cdfa44327c2f54d6bca7dc624cb0fb9f1c7ba5d36
BLAKE2b-256 checksum
How to use checksums
5b6874310d61fbd357bf6255681358cfbf21cf7ff6ae3971071d09d21ce9808e
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.1-py3-none-any.whl

Download URL smolagents_pilldrops-0.1.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
161f0cb7c63d64cafdd4480ba920867cc68c615c52b70d2541c41cf5b691959f
BLAKE2b-256 checksum
How to use checksums
3d23f0c17787e2a22bc46038a07686e52f7022ec969aa97e0e2218d3d8ad11f9
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.1

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.1 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