inis.run
Integrations

Google ADK

Python environment provider for Google Agent Development Kit.

inis-google-adk is a 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.

Experimental, upstream. BaseEnvironment/EnvironmentToolset are decorated @experimental in ADK's own source — 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

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("9hmquuxiz7qyqdqiwfvep")

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 function tools

If you'd rather not depend on ADK's experimental surface at all, inis_adk_tools() returns ordinary FunctionTools wrapping the same session directly — a smaller, stable surface (execute, read_file, write_file, list_files; nothing that creates, destroys, or administers the session):

from google.adk.agents import Agent
from inis_google_adk import inis_adk_tools

agent = Agent(model="...", tools=inis_adk_tools(session))

What it does

  • execute (shell) — real stdout/stderr/exit_code/timed_out
  • read_file/write_file — a missing file raises FileNotFoundError
  • EditFile — built entirely on read_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 — timeout-only; a timeout still ends the call.

InisEnvironment.execute() returns a result type with one field added over upstream's own, truncated — set directly from inis.run's own per-stream capture-limit signal. inis_adk_tools()'s execute returns one plain string with no structured result to carry the same field, so truncation there stays an inline [inis: output truncated by the sandbox's own capture limit] marker instead.

On this page