Skip to main content

Sandboxed rollouts you call like typed Python (import as `agentix`)

Project description

Agentix

Sandboxed rollouts you call like typed Python.

Turn agents, tools, and scorers into Python callables. Package their dependencies into runtime images. Call them from evaluators, trainers, and orchestration code without writing a new runner for every pairing.

GitHub Stars Python 3.11+ Docs

Documentation | Quickstart | Cookbook | Architecture

The 10-Second Model

Agentix has two primitives:

  • Remote calls: client.remote(fn, *args, **kwargs) runs a Python callable inside a sandbox worker. The callable is serialized with stdlib pickle, Python's native callable reference mechanism.
  • Bundles: agentix build [path] packages a Python project and its declared dependencies into a deploy-ready runtime image.
from agentix import RuntimeClient
from app import run

async with RuntimeClient(sandbox.runtime_url) as client:
    result = await client.remote(run, input="hello")

The unit of composition is not a bespoke benchmark runner or agent adapter. It is a Python callable.

Why Agentix Exists

Agent experiments sprawl quickly. One agent needs a CLI wrapper. Another needs a Python harness. A benchmark needs repo setup, grading scripts, and logs. A training loop needs the same pieces batched across many sandboxes.

Agentix collapses that matrix into one execution contract: if Python can serialize the callable and the sandbox has its dependencies, the host can call it.

You have You expose You call
Claude Code, Codex, Aider, OpenHands, or an internal agent async def run(...) -> RunResult await client.remote(run, ...)
Shell, files, repo setup, or local tools async def run(command: str) -> BashResult await client.remote(bash_run, ...)
SWE-bench, MLE-Bench, or an internal evaluator async def score(...) -> Score await client.remote(score, ...)
Streaming or interactive workflows async def stream(...) -> AsyncIterator[Event] async for event in client.remote(stream, ...)

What Ships

  • Typed remote calls across the host-to-sandbox boundary.
  • Unary, streaming, and bidirectional call shapes inferred from callable signatures.
  • One runtime worker process today behind an internal worker backend boundary, so future pools or per-call isolation can stay API-compatible.
  • Bundle builds from normal Python projects and pyproject.toml dependencies.
  • Optional Nix system dependencies when a project includes default.nix.
  • Deployment backend plugins through the agentix.deployment entry point group.

Quickstart

Install the host framework and a deployment backend:

pip install agentixx agentix-deployment-docker

Create a remote callable:

# src/hello_agentix/__init__.py
async def run(input: str) -> str:
    return f"sandbox saw: {input}"

Build a bundle:

agentix build ./hello-agentix -o hello-agentix:0.1.0

Deploy it and call the callable:

import asyncio

from agentix import RuntimeClient
from agentix.deployment.base import SandboxConfig, session
from agentix.deployment.docker import DockerDeployment
from hello_agentix import run


async def main() -> None:
    deployment = DockerDeployment()
    config = SandboxConfig(image="hello-agentix:0.1.0")

    async with session(deployment, config) as sandbox:
        async with RuntimeClient(sandbox.runtime_url) as client:
            print(await client.remote(run, input="hello"))


asyncio.run(main())

Read the full quickstart for the package layout and runtime-image prerequisites.

Architecture

Host process
  RuntimeClient.remote(fn, ...)
    serializes callable with pickle
    detects unary / stream / bidi
    encodes args and kwargs
        |
        v
Sandbox
  agentix-server
        |
        v
  worker subprocess
    unpickles callable
    validates args
    calls fn(*args, **kwargs)

Remote calls use Socket.IO events for unary, streaming, and bidirectional shapes. HTTP is kept only for /health. Errors stay in-band.

Repository Map

Development

git clone https://github.com/Agentiix/Agentix
cd Agentix
pip install -e '.[dev]'
pytest
ruff check agentix/ tests/

Pair this repo with sibling backend/runtime repos checked out next to it when testing full sandbox rollouts.

Links

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

agentixx-0.1.4.tar.gz (177.0 kB view details)

Uploaded Source

Built Distribution

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

agentixx-0.1.4-py3-none-any.whl (56.2 kB view details)

Uploaded Python 3

File details

Details for the file agentixx-0.1.4.tar.gz.

File metadata

  • Download URL: agentixx-0.1.4.tar.gz
  • Upload date:
  • Size: 177.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"TencentOS Server","version":"4.4","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentixx-0.1.4.tar.gz
Algorithm Hash digest
SHA256 0c02ac79dd300b39233c71867d18497ac8944004ff926fca9ddf078d57fe856b
MD5 2e820c3212b4e784b1e578aadc298315
BLAKE2b-256 95338cc2063e5fe0e04181dbb553ad56aefb97b3cc2ba02a9f8bea67c6cfd428

See more details on using hashes here.

File details

Details for the file agentixx-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: agentixx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 56.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"TencentOS Server","version":"4.4","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for agentixx-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f78211c268e913d118238c3c9d7d444eb9ba84d115287b70cf87779f498cf534
MD5 7428ffbc97165162f065886dbfcaa410
BLAKE2b-256 66a8ba1e2a3d4eb9ac8b8586dba3fa28fdf1a6e6ff91824d617d29c076bfd1cd

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