Compatibility contract
Sandbox.remote(fn, *args, **kwargs)is a stable public API; the same contract holds forRuntimeClient.remote(...)..remotehas no default retry behavior..remotereturns the target function result on success, and raises on failure./rpc,/log, and/traceare reserved by agentix-core.- tracing and logging transport details are internal implementation details;
users extend them through stdlib logging and
trace.Processor.
Core Python API (import agentix)
Top-level names exported by agentix (this list mirrors agentix.__all__):
Remote calls and namespaces:
RuntimeClientRemoteCallableNamespaceAsyncClientNamespaceregister_namespacerequest_handler(host-side round-trip helper)
SandboxProviderSandboxSandboxConfigSandboxResourceSandboxIdSandboxInfoprovidersregister_providerBundleDeployer(optional provider deploy hook)DeployedBundle
.remote and
.try_remote):
RemoteCallErrorCallCancelledCallTimeoutWorkerExitedRuntimeUnreachableRemoteSioErrorRestrictedUnpickleError(a refused return-value global — see Remote Calls)Result,Ok,Failed(thetry_remoteresult union)
-
configure_logging -
context -
log(re-exported fromagentix.utils.log) -
trace(re-exported fromagentix.utils.trace) -
__version__
agentix.utils.log and
agentix.utils.trace; the top-level agentix.log / agentix.trace
attributes are convenience aliases.
Canonical call path
The common path is a provider session yielding a liveSandbox handle. Call
await sandbox.remote(fn, ...) directly — there is no separate RuntimeClient
to open.
provider.session(config) closes the runtime connection and deletes the
container on exit. For manual lifecycle control:
agentix.RemoteCallable.validate(fn) checks at development time that fn is
remote-safe: it returns the wire ref (module::qualname) for an importable
top-level function, and raises TypeError for lambdas, closures, and bound
methods. RemoteCallError messages now include the sandbox-side traceback
(str(exc)); it is also available on exc.error.traceback.
Runtime client API
RuntimeClient is the advanced/direct entrypoint for talking to a known
runtime_url (for example, an in-process server). The sandbox path should use
sandbox.remote instead of a nested RuntimeClient.
RuntimeClient.health()RuntimeClient.register_namespace(ns)
Timeout
The timeout knobs apply to bothsandbox.remote and RuntimeClient.
RuntimeClient(url, timeout=...) sets the per-request timeout in seconds. The
default is 300; raise it for agent workloads (roughly 600–1800s), e.g.
RuntimeClient(url, timeout=1800). http_sync_ms (default 1000) tunes the
inline HTTP fast-path budget for short calls; set http_sync_ms=None to disable
it so every call goes over Socket.IO. To bound a single call independently of
the request timeout, wrap it in asyncio.wait_for(sandbox.remote(...), deadline).
SandboxProvider API
Core provider lifecycle.provider.session(config) is the scoped form; it
yields a live Sandbox and tears it down on exit.
SandboxProvider (from agentix.provider.base), implementing
create, delete, and get; session is inherited.
Discovering backends
agentix.providers() returns the provider registry; providers().all()
returns {name: ProviderClass} for every installed backend.
providers().get(name).
Concrete provider examples
Import the concrete provider and instantiate it (optionally with a backend config) to get a usable backend.Namespace extension API
Plugin protocols use plugin-owned namespaces, conventionally/<package-name>. The reserved namespaces /rpc, /log, and /trace belong to
agentix-core.
Sandbox-side namespace handlers run in the worker:
Sandbox:
RuntimeClient directly, register before entering its context:
Logging API
Sandbox code uses stdlib logging. The host side automatically registers the/log consumer.
print(),
subprocess output, C-extension writes) and replays each line over /log
under the logger names agentix.sandbox.stdout / agentix.sandbox.stderr.
The same output is appended to a durable $AGENTIX_LOG_DIR/sandbox-<id>.log
inside the sandbox (default /tmp/agentix; set the variable empty to
disable) so it survives a dropped connection.
Host applications can use normal logging handlers and the Agentix convenience
configuration helper:
/log namespace.
Tracing API
Trace and span helpers:/trace namespace.
Plugin APIs (when installed)
These modules are public once their plugin package is installed:agentix.bashrun(...)run_stream(...)
agentix.filesupload(...)download(...)
agentix.agents.claude_coderun(...)
agentix.plugins.datasets.sweprepare_env(...)score(...)
agentix.bridge(tunnel an in-sandbox agent’s LLM traffic to the host)Proxy,on,Request,ClientResponse,Client,Handler,TunnelHandle,AbridgeError,DynamicRoutesForward,SessionForward(forward to a host-side sidecar / gateway)Recorder(record tunnel request/response pairs to JSONL)Sidecar,SidecarError,Command- handler clients under
agentix.bridge.clients(AnthropicClient,OpenAIClient,AnthropicFromOpenAIClient,AnthropicToOpenAI)
- provider backends (contribute siblings into
agentix.provider)agentix.provider.docker(production; providesdocker+podman)agentix.provider.apptainer(production)agentix.provider.uv(local uv-materialized runtime; no container)agentix.provider.daytona(stub)agentix.provider.e2b(stub)
CLI entrypoints
Public command-line entrypoints:agentix build [PATH]— build a deploy-ready bundle from a project root.agentix deploy <backend> <bundle>— deploy a bundle to a backend.--format jsonprints{"bundle": ..., "platform": ..., "metadata": {...}}so the cache path can be read withjq, e.g.BUNDLE=$(uv run agentix deploy docker dist/x.bundle.tar --format json | jq -r .bundle).agentix plugin list— read-only listing of installed provider backends and their load status.
/nix/runtime/bootstrap.sh,
which ships with every bundle.
Plugin entrypoints may add their own commands (for example, bridge tooling).