Skip to main content
Agent Substrate’s guest data plane, ateenv.v1alpha, as axed serves it with --agent-substrate. It lets axed replace ate-env-guest inside Substrate actors. The proto is copied unchanged from agent-substrate/env: proto/ateenv/v1alpha/guest.proto. Deploy on Agent Substrate covers templates, eviction and snapshots.

Enabling it

--agent-substrate adds ateenv.v1alpha.ProcessService and ateenv.v1alpha.FileSystemService to every gRPC listener, next to axe.v1. The flag takes no value. It is off by default.
The services use the same auth as every other gRPC service. With a token configured, send authorization: Bearer <token> or x-sandboxd-token: <token> metadata, or serve them on a non-TCP listener with ?auth=none.

What is supported

Server-side policies

ate-env-guest applies these server-side policies. In axed:

Process ids

process_id is the engine’s process id: an opaque 32-hex-digit string, the same id axe.v1 uses. A process started through ateenv is visible through axe.v1 and the other way round. Ids belong to one axed instance; after a cold boot they are unknown. An empty process_id fails with INVALID_ARGUMENT; an unknown one with NOT_FOUND.

ProcessService

StartProcess

Launches a process in the background and returns its Process once it is running. Processes run on pipes; the API has no terminal option. Each keeps --retain bytes of output and stays queryable after it exits, until --max-finished newer processes have finished or the output budget needs the space.

GetProcess

Returns the process’s current state. Process fields:

StreamProcessOutput

Streams stdout and stderr. Messages carry stdout or stderr chunks of up to --stream-chunk-size bytes, then exit. axed skips output evicted before the stream reached it without notice, because the protocol has no gap message. A following stream holds the process back if the client reads slower than the process writes and retention is full. A process allows at most 64 such lossless readers at once, across all APIs; one more fails with RESOURCE_EXHAUSTED. To wait for a process, follow with offsets past the end of both streams. The stream ends with exit and no output.

WriteProcessInput

A client stream of stdin chunks. The first message must carry process_id; it is ignored after. The response’s bytes_written is the total bytes written by this call. Writing non-empty data to a process started without stdin, or whose stdin is already closed, fails with FAILED_PRECONDITION; empty data and close succeed. An empty stream fails with INVALID_ARGUMENT.

SignalProcess

Delivers signal to the process group and returns the process state as it was just before delivery, so the state is always RUNNING.
  • SIGNAL_UNSPECIFIED (0) or a negative number fails with INVALID_ARGUMENT (signal is required).
  • axed delivers any positive signal number, including ones the enum does not list. A number the kernel rejects fails with INVALID_ARGUMENT.
  • A process that has exited fails with FAILED_PRECONDITION.

FileSystemService

Paths are relative to --root-dir, or absolute under it. An absolute path outside the root fails with PERMISSION_DENIED, as does a path that climbs above it. An empty path fails with INVALID_ARGUMENT.

ReadFile

Streams the file in chunks of up to 64 KiB.

WriteFile

A client stream. axed reads path, mode and seek_offset from the first message only. Every message may carry a chunk. The response’s bytes_written is the total across all chunks. A stream with no messages fails with INVALID_ARGUMENT.

Health and eviction

axed serves GET /readyz on --rest-port, which never needs a token and returns 503 while shutting down, as GET /v1/health does. With --on-sigterm stay, axed keeps running on SIGTERM and reports eviction_pending: true through System.Health, so the platform can suspend the actor instead of stopping it.