inis.run BaseEnvironment provider for Google Agent Development Kit (ADK)
Project description
inis-google-adk
Native inis.run environment provider for Google Agent Development Kit (ADK)'s BaseEnvironment / EnvironmentToolset surface. Gives ADK's Execute/ReadFile/EditFile/WriteFile tools a real, isolated inis.run session instead of a local subprocess.
This is ADK's own experimental surface, not this package's caution. BaseEnvironment/EnvironmentToolset are decorated @experimental in ADK's own source (Google's words, not ours) — ADK ships two other in-tree providers against the same contract. Verified against google-adk==2.6.0. Neither class is re-exported from the google.adk top level; import from google.adk.environment / google.adk.tools.environment directly.
Install
pip install inis-google-adk
Quickstart: attached (recommended)
One inis.run session for the whole conversation, owned by your app:
from inis import AsyncClient
from google.adk.agents import Agent
from google.adk.tools.environment import EnvironmentToolset
from inis_google_adk import InisEnvironment
client = AsyncClient()
session = await client.sessions.create(egress_default="deny")
environment = InisEnvironment.wrap(session)
agent = Agent(model="...", tools=[EnvironmentToolset(environment=environment)])
...
await session.destroy() # this app owns the session; the environment never will
Reconnect a later process to the same session (and its persistent
/workspace filesystem) by session ID alone:
environment = InisEnvironment.attach("ses_abc123")
Owned: the environment creates and destroys the session for you
from inis_google_adk import InisEnvironment
environment = InisEnvironment(egress_default="deny")
toolset = EnvironmentToolset(environment=environment)
try:
agent = Agent(model="...", tools=[toolset])
...
finally:
await toolset.close() # calls environment.close(), which destroys the session
Explicit fallback: plain FunctionTools
If you'd rather not depend on ADK's experimental surface at all,
inis_adk_tools() returns ordinary FunctionTools wrapping the same
session directly:
from google.adk.agents import Agent
from inis_google_adk import inis_adk_tools
agent = Agent(model="...", tools=inis_adk_tools(session))
The smaller, stable surface: execute, read_file, write_file,
list_files — nothing that creates, destroys, or administers the
session.
What it does
execute(shell) — real stdout/stderr/exit_code/timed_outread_file/write_file— a missing file raisesFileNotFoundErrorEditFile— built entirely onread_file/write_file- Owned/attached lifecycle split —
InisEnvironment()owns;.wrap()/.attach()never do close()idempotency — safe to call more than once in either mode- Non-experimental fallback (
inis_adk_tools())
Notes
TypeScript, Java, and Go support isn't claimed: this package wraps the Python inis SDK and Python google-adk only. True remote cancellation of an in-flight execute() call is not implemented — BaseEnvironment.execute(command, *, timeout) is timeout-only; a timeout still ends the call.
Truncated output
Neither ExecutionResult nor inis_adk_tools()'s execute has a field
for "this output was cut short." When inis.run's own per-stream capture
limit truncates output, both paths append the same marker instead of
silently dropping the fact — to stderr for InisEnvironment.execute(),
inline in the returned string for inis_adk_tools():
[inis: output truncated by the sandbox's own capture limit (nonce=<16 hex chars>)]
Development
pip install -e ".[dev]"
pip install -e ../python # inis core SDK, editable
pytest
Links
- Docs: docs.inis.run
- Source: github.com/inis-run/sdk/tree/main/google-adk
- Homepage: inis.run
Built and run in the EU. Your code and data never leave Europe.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inis_google_adk-0.1.0.tar.gz.
File metadata
- Download URL: inis_google_adk-0.1.0.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6919be4294ce2e998af0a13f2d721248e3027c0b7bebdf8769fa2851600888b6
|
|
| MD5 |
aa70c0e31c25ed713a85541d6eeb076f
|
|
| BLAKE2b-256 |
6943e5b8b8308e9966db7c5f72d46e084a9801be13187309aaa40107b6a34c36
|
Provenance
The following attestation bundles were made for inis_google_adk-0.1.0.tar.gz:
Publisher:
sdk-google-adk-publish.yml on 4ver/inis.run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inis_google_adk-0.1.0.tar.gz -
Subject digest:
6919be4294ce2e998af0a13f2d721248e3027c0b7bebdf8769fa2851600888b6 - Sigstore transparency entry: 2312766019
- Sigstore integration time:
-
Permalink:
4ver/inis.run@be2853c14d1412460f1c3eccbad9e2149008edaf -
Branch / Tag:
refs/tags/google-adk-v0.1.0 - Owner: https://github.com/4ver
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-google-adk-publish.yml@be2853c14d1412460f1c3eccbad9e2149008edaf -
Trigger Event:
push
-
Statement type:
File details
Details for the file inis_google_adk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inis_google_adk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b36cbc272838625d0df04db1d045b69d3722e71b66cd1875f84159507a0f2a2e
|
|
| MD5 |
d423d461f624302b9030b5b6c6b317c2
|
|
| BLAKE2b-256 |
423a72262727b0f5c97e544c0386f10cb978809f8c4ba041b23d162a9138fba0
|
Provenance
The following attestation bundles were made for inis_google_adk-0.1.0-py3-none-any.whl:
Publisher:
sdk-google-adk-publish.yml on 4ver/inis.run
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inis_google_adk-0.1.0-py3-none-any.whl -
Subject digest:
b36cbc272838625d0df04db1d045b69d3722e71b66cd1875f84159507a0f2a2e - Sigstore transparency entry: 2312766060
- Sigstore integration time:
-
Permalink:
4ver/inis.run@be2853c14d1412460f1c3eccbad9e2149008edaf -
Branch / Tag:
refs/tags/google-adk-v0.1.0 - Owner: https://github.com/4ver
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
sdk-google-adk-publish.yml@be2853c14d1412460f1c3eccbad9e2149008edaf -
Trigger Event:
push
-
Statement type: