These follow common Google ADK patterns (App + Runner, filesystem + code interpreter), wired for Leap0 (Leap0Plugin).
| Example | Description |
|---|---|
| common.py | Shared Gemini via OpenRouter (LiteLlm) helper used by the scripts below. |
| patterns/with_app.py | Recommended App pattern with InMemoryRunner. |
| patterns/with_runner.py | Runner only (no App). |
| file_operations.py | Write files, run Python, read results (filesystem + code interpreter). |
| python_execution.py | Several Python-only code interpreter prompts. |
| composite_run_python_with_fixtures.py | Custom composite tool: writes script + 2 mock CSVs, runs job, returns stdout/errors (see file docstring). |
LEAP0_API_KEY(or passapi_key=toLeap0Plugin)OPENROUTER_API_KEY— examples call Gemini through OpenRouter (notGOOGLE_API_KEY).pip install 'leap0-adk[openrouter]'so ADK can useLiteLlm(ADK LiteLLM doc).
Optional: OPENROUTER_GEMINI_MODEL — defaults to openrouter/google/gemini-2.0-flash-001; pick another slug from OpenRouter’s Gemini models if you prefer.
- Long-running shell / background servers — not covered by these examples: this plugin does not expose process or PTY tools. Use the Leap0 Python SDK (
sandbox.process,sandbox.pty) in your own code if you need that. - Multi-language execute tools — this plugin is Python-only for
execute_code_in_leap0; seepython_execution.pyinstead of a separate JS/TS example.
Run from the repo root with the venv activated:
source .venv/bin/activate
pip install -e ".[openrouter]"
export OPENROUTER_API_KEY="sk-or-..."
export LEAP0_API_KEY="..."
python examples/patterns/with_app.pyComposite-tool example:
python examples/composite_run_python_with_fixtures.py