Skip to main content

abi-runtime

Sandboxed file operations and model provider abstraction for AI agent execution. Enforce workspace boundaries, path allowlists, and provider-agnostic model calls.

Zero dependencies.

Install (after PyPI publication)

pip install abi-runtime

Status: Not yet published to PyPI. Install from source: pip install -e . from the repo root.

Quick start

Workspace sandbox

from pathlib import Path
from abi_runtime.sandbox import WorkspaceSandbox

# Create a sandbox rooted at the current workspace
sandbox = WorkspaceSandbox(
    workspace_root=Path("."),
    allow_patterns=["src/**", "tests/**"],
    deny_patterns=["*.env", ".git/**", "node_modules/**"],
)

# Safe file operations — path traversal and symlink escapes are blocked
content = sandbox.safe_read("src/main.py")
sandbox.safe_write("tests/output.txt", "result data")
files = sandbox.safe_list("src/")

Provider abstraction

from abi_runtime.providers import MockProvider, ProviderSettings

# Use the mock provider for deterministic testing
provider = MockProvider(default_response="Test output")
provider.set_response("auth", "OAuth2 implementation plan")

response = provider.generate("Design an auth system")
print(response.text)   # "OAuth2 implementation plan"
print(response.usage)  # {"input_tokens": ..., "output_tokens": ...}

# All invocations are recorded for assertions
assert len(provider.invocations) == 1

What's included

  • WorkspaceSandbox -- sandboxed file operations with workspace root enforcement, path traversal blocking, and symlink escape detection
  • Provider abstraction -- Provider protocol with MockProvider for testing and LocalProviderStub for offline use
  • Allowlist/denylist -- declarative control over which files an agent can read and write
  • Deterministic temp dirs -- hash-based temp directories for reproducible runs
  • Runtime context capture -- environment metadata collection with secret redaction

ABI ecosystem

Related packages:

Versioning

Follows Semantic Versioning. Current version: 0.1.2. See CHANGELOG.md for release notes.

License

MIT License (see LICENSE file).

Metadata

Release files for abi-runtime 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abi-runtime 0.1.2
File Size Uploaded Provenance
abi_runtime-0.1.2.tar.gz 55.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for abi-runtime 0.1.2
File Interpreter ABI Platform
abi_runtime-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 68.5 kB

Release files / abi_runtime-0.1.2.tar.gz

Download URL abi_runtime-0.1.2.tar.gz
Size 55.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a025086b75bdd2e9541c9d356601bcb6e8d995ae329f3c65eac19c6df85ae1de
BLAKE2b-256 checksum
How to use checksums
aa7eb1cfb1d053c7a2518d4b6be8afadbef12b7e136d7ccccafe33b617531d42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2026.

Transparency log

Release files / abi_runtime-0.1.2-py3-none-any.whl

Download URL abi_runtime-0.1.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f7c21815117e244d77aaf0dd4768e1e9561c508151c6e871f323665d17dbc3f
BLAKE2b-256 checksum
How to use checksums
518aaaeb2627ce860a6b08f20ceacb193d69e5f249ead6bb51965705361a9c8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2026.

Transparency log

Security for abi-runtime 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for abi_runtime-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page