Skip to main content

inis.run sandbox provider for Strands Agents

Project description

inis-strands-agents

Native inis.run sandbox provider for Strands Agents' strands.sandbox surface. Gives Strands its standard sandbox_bash and sandbox_file_editor tools backed by a real, isolated inis.run session instead of the local host.

PyPI License: MIT Python

Verified against strands-agents==1.50.2.

Install

pip install inis-strands-agents

Quickstart: attached (recommended)

One inis.run session for the whole conversation, owned by your app:

from inis import AsyncClient
from strands import Agent
from inis_strands_agents import InisSandbox

client = AsyncClient()
session = await client.sessions.create(egress_default="deny")
sandbox = InisSandbox.wrap(session)

agent = Agent(model="...", sandbox=sandbox)
await agent.invoke_async("list files in /workspace")
await agent.invoke_async("now write hello.txt")
await session.destroy()  # this app owns the session; the adapter never will

Owned: the adapter creates and destroys the session for you

from strands import Agent
from inis_strands_agents import InisSandbox

async with await InisSandbox.create(egress_default="deny") as sandbox:
    agent = Agent(model="...", sandbox=sandbox)
    await agent.invoke_async("...")
# session destroyed on exit

Either way, Agent(sandbox=...) registers sandbox_bash and sandbox_file_editor automatically — no separate tool wiring needed. Session create/destroy, egress, pause/resume, and fork stay host-controlled.

What it does

  • execute_streaming (shell) — distinct stdout/stderr chunks, then a final ExecutionResult
  • execute_code_streaming — inherited from PosixShellSandbox
  • Binary-safe read_file/write_file/remove_file/list_files, routed to inis.run's native /files endpoints
  • Per-call timeout — genuinely kills the remote process on expiry
  • Per-call env — via a validated shell prefix (inis.run's exec API fixes env at session creation)
  • Cancellation (asyncio task cancellation) — closes the underlying stream and kills the remote command

Notes

PTY isn't implemented: strands.sandbox's shell/file contract has no equivalent. ExecutionResult.output_files is always empty, same as every other shell-based Sandbox — read a produced file with read_file instead.

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_strands_agents-0.1.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

inis_strands_agents-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file inis_strands_agents-0.1.0.tar.gz.

File metadata

  • Download URL: inis_strands_agents-0.1.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for inis_strands_agents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 772d89306e867f6b180ab1b8816ade56db094ce18764aea46935148a0a9e0932
MD5 3f711545a4e570b13f249479a4ff4542
BLAKE2b-256 582b6d9b1b9cdc6d3f6e659c99af1474990b7a0ae5cb7528a473f9656fde3508

See more details on using hashes here.

Provenance

The following attestation bundles were made for inis_strands_agents-0.1.0.tar.gz:

Publisher: sdk-strands-agents-python-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_strands_agents-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inis_strands_agents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d9c8b8e1d0ced6bc952e2fd2c19bf57db3a367bb8505eb1c0904d53cb275de
MD5 150db4c7b37c1b4cba99b9b1343e3fda
BLAKE2b-256 01ac318f15a78f294de55254c99b7586150d8116c3869b8237724040426e59b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for inis_strands_agents-0.1.0-py3-none-any.whl:

Publisher: sdk-strands-agents-python-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