Skip to main content

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.

PyPI License: MIT Python

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_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 — 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

Built and run in the EU. Your code and data never leave Europe.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inis_google_adk-0.1.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inis_google_adk-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

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

Hashes for inis_google_adk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6919be4294ce2e998af0a13f2d721248e3027c0b7bebdf8769fa2851600888b6
MD5 aa70c0e31c25ed713a85541d6eeb076f
BLAKE2b-256 6943e5b8b8308e9966db7c5f72d46e084a9801be13187309aaa40107b6a34c36

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file inis_google_adk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inis_google_adk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b36cbc272838625d0df04db1d045b69d3722e71b66cd1875f84159507a0f2a2e
MD5 d423d461f624302b9030b5b6c6b317c2
BLAKE2b-256 423a72262727b0f5c97e544c0386f10cb978809f8c4ba041b23d162a9138fba0

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page