Skip to main content

leap0-adk

Google ADK plugin for running Python in a Leap0 sandbox using the code interpreter, plus filesystem read, write, list, and delete. One sandbox is shared by all tools for the lifetime of the plugin.

Install

pip install leap0-adk

Dependencies: google-adk, leap0 (Python SDK).

Configuration

Set your Leap0 API key (or pass api_key= to Leap0Plugin):

export LEAP0_API_KEY="your-key"

Optional: LEAP0_BASE_URL if you use a non-default control plane.

Usage

Always delete the sandbox when your agent session ends so you do not leave sandboxes running.

import asyncio

from google.adk.agents import Agent
from google.adk.runners import InMemoryRunner
from leap0_adk import Leap0Plugin


async def main() -> None:
    plugin = Leap0Plugin()
    try:
        agent = Agent(
            model="gemini-2.0-flash",
            name="leap0_agent",
            tools=plugin.get_tools(),
        )
        async with InMemoryRunner(
            app_name="my_app",
            agent=agent,
            plugins=[plugin],
        ) as runner:
            await runner.run_debug(
                "Run Python: x = 40 + 2; print(x). Then write the result to /tmp/answer.txt and read it back."
            )
    finally:
        plugin.destroy_sandbox()
        await plugin.close()


if __name__ == "__main__":
    asyncio.run(main())

destroy_sandbox() calls the Leap0 API to delete the sandbox. close() also deletes the sandbox and, if the plugin created the Leap0Client itself, closes the HTTP client.

Examples

Runnable scripts live under examples/. They use Gemini via OpenRouter (OPENROUTER_API_KEY, pip install 'leap0-adk[openrouter]'). See examples/README.md.

Tools

Tool Purpose
execute_code_in_leap0 Python via code_interpreter.execute (optional context_id, timeout_ms, env_vars)
leap0_fs_read Read UTF-8 file (path, optional offset / limit / head / tail)
leap0_fs_write Write UTF-8 file (path, content, optional permissions)
leap0_fs_list Directory listing (path, optional recursive, exclude)
leap0_fs_delete Delete file or directory (path, optional recursive)

TypeScript/JavaScript execution is not exposed in this version (Python only).

Development

pip install -e ".[dev]"
pytest

License

Apache-2.0 (see LICENSE).

Metadata

Release files for leap0-adk 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 leap0-adk 0.1.0
File Size Uploaded Provenance
leap0_adk-0.1.0.tar.gz 13.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for leap0-adk 0.1.0
File Interpreter ABI Platform
leap0_adk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / leap0_adk-0.1.0.tar.gz

Download URL leap0_adk-0.1.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cf5ef9fc29cf691ae23492cc8176353b45c65b6e72cf0f8e2cb8afac8f86ee64
BLAKE2b-256 checksum
How to use checksums
7607e73cd910444b83152bcbb59a8c67631a2417d42d159dd1a8df71de9fe996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

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

Download URL leap0_adk-0.1.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d84214e5334281cb69ee16e1f8ca6b7109bb9d98237e11fbb1d90cfd07838ae8
BLAKE2b-256 checksum
How to use checksums
57ffeb5781ff096166febb96055cb4b3b369fef8e8f1141a644d4ab3650a534c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

Security for leap0-adk 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for leap0_adk-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.

Transparency log

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 Full 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