Skip to main content

Shell + file I/O primitives for Agentix sandboxes

Project description

agentix-runtime-basic

Shell + file I/O primitives for Agentix sandboxes. One wheel, two namespaces:

Namespace Purpose
agentix.bash execute shell commands, stream stdout/stderr
agentix.files upload/download/list files inside the sandbox

These two used to ship as separate agentix-bash and agentix-files distributions. They consolidated here because every realistic sandbox image needs both — splitting them was friction without isolation benefit (neither has any non-stdlib runtime deps).

Install

pip install agentix-runtime-basic

Use

from agentix import RuntimeClient
from agentix.bash import run as bash_run, run_stream as bash_stream
from agentix.files import upload, download

async with RuntimeClient(sandbox.runtime_url) as c:
    await c.remote(upload, path="data.json", content=blob)
    result = await c.remote(bash_run, command="cat data.json | jq .")
    async for ev in c.remote(bash_stream, command="pytest -q"):
        ...  # ev is a BashStdout / BashStderr / BashExit / BashError

Each namespace is "the package IS the namespace": top-level async functions are the remote-callable surface, dataclasses/types like BashResult and UploadResult are importable for return-type annotations.

Building a sandbox image

runtime/Dockerfile is the base image bundle builds extend from. Most users invoke it indirectly:

agentix build runtime-basic -o my-agent:0.1.0

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

agentix_runtime_basic-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: agentix_runtime_basic-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for agentix_runtime_basic-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a3cc3b32e147c5192800c984dc864a2a37a9be98a7d725af1df3e116c861133
MD5 d3439b6ed2f1cc9218d53e2c3ee42a2b
BLAKE2b-256 3bffef7fd9f61071e04ac6a7e81d65312567836c266a476286199ce04b3a55b6

See more details on using hashes here.

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