Catalog PyPI
PACKAGE EXPLORERView in registry

abi-runtime

PyPI

Sandboxed tool runtime and provider abstraction for the ABI ecosystem

Versions collected1
Direct dependencies2From release 0.1.2
Last observed20 Oct, 17:27 UTC

README

Version 0.1.2 documentation

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).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.214 Mar 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
abilitybi/abi-runtime

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:27 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f4d955db1e802612d77fcebeabdbd01ba5592e19a7021a4f8b5208dcd23b9804