Systems
| System | Responsibility |
|---|---|
agentix.runtime.shared | Wire models, msgpack codec, framing, Socket.IO event names, call-shape helpers |
agentix.runtime.client | RuntimeClient.remote(fn, ...) and transport-specific client behavior |
agentix.runtime.server | FastAPI and Socket.IO server, worker process management, callable invocation, call correlation |
agentix.deployment | Host-side sandbox lifecycle protocol and backend plugin lookup |
agentix.cli | agentix build |
Remote Target
The caller passes a normal imported function:Call Flow
Transports
| Call shape | Function shape | Transport | Client behavior |
|---|---|---|---|
| Unary | async def f(...) -> T or sync def f(...) -> T | Socket.IO | await client.remote(f, ...) |
| Stream | async def f(...) -> AsyncIterator[T] | Socket.IO | async for item in client.remote(f, ...) |
| Bidi | async def f(..., inbox: Channel[I]) -> AsyncIterator[T] | Socket.IO | send through Channel, receive with async for |
value or
error. Stream and bidi calls emit item, end, and error events keyed by
call_id.
Bundle Layout
agentix build [path] installs one Python project into the runtime venv:
pyproject.toml.
default.nix, the build adds a Nix builder stage
and links binaries into /nix/runtime/bin.
Worker Model
The runtime server owns one worker subprocess. The worker handles remote function invocation and keeps the runtime server isolated from user code. For each target, the worker prepares and caches invocation metadata:- module import
- function lookup
- signature inspection
- pydantic argument adapters
- return-value serialization metadata
/nix/runtime environment as the runtime
server, so anything installed into the bundle can be imported on demand.
Deployment Boundary
Deployments are host-side plugins that start bundle images. They return aruntime_url; after that, the runtime protocol is the same regardless of
where the sandbox is running.