Expand description
§agentos-client
High-level Rust client SDK for the Agent OS native sidecar. This is a 1:1 port of the TypeScript
AgentOs client (packages/core/src/agent-os.ts): every public method, option type, return
type, event, and error maps across with identical semantics.
The client spawns the native agentos-sidecar binary and speaks the existing framed BARE
protocol over its stdio (see transport). It does NOT embed the kernel in-process and does NOT
define a new sidecar wire protocol. The generated Secure Exec schema surface comes from
agentos_sidecar_client::wire; Agent OS layers ACP/session semantics on top of those generated wire
frames through the wrapper client.
See the companion design docs in ~/.agents/specs/rust-client-sdk/ (ADR-001, spec, reference,
checklist) for the architecture, type-mapping, error taxonomy, and streaming model.
Re-exports§
pub use agent_os::AgentOs;pub use agent_os::PackageDescriptor;pub use agent_os::ProjectedAgent;pub use agent_os::SoftwareInfo;pub use error::ClientError;pub use error::ClientResult;pub use error::ResourceLimitDetails;pub use sidecar::AgentOsSidecar;pub use sidecar::AgentOsSidecarDescription;pub use sidecar::AgentOsSidecarPlacement;pub use sidecar::SidecarState;pub use stream::ByteStream;pub use stream::Subscription;pub use config::node_modules_mount;pub use config::AcpLimits;pub use config::AgentOsConfig;pub use config::AgentOsConfigBuilder;pub use config::AgentOsLimits;pub use config::AgentOsSidecarConfig;pub use config::Binding;pub use config::BindingCallback;pub use config::BindingLimits;pub use config::Bindings;pub use config::FsPermissionRule;pub use config::FsPermissions;pub use config::HttpLimits;pub use config::JsRuntimeLimits;pub use config::MountConfig;pub use config::MountPlugin;pub use config::OverlayMountConfig;pub use config::PackageRef;pub use config::PatternPermissionRule;pub use config::PatternPermissions;pub use config::PermissionMode;pub use config::Permissions;pub use config::PluginLimits;pub use config::PythonLimits;pub use config::ResourceLimits;pub use config::RootFilesystemConfig;pub use config::RootFilesystemKind;pub use config::RootFilesystemMode;pub use config::RootLowerInput;pub use config::RulePermissions;pub use config::ScheduleCallback;pub use config::ScheduleDriver;pub use config::ScheduleEntry;pub use config::ScheduleHandle;pub use config::SidecarJsBridgeCall;pub use config::SidecarJsBridgeCallback;pub use config::SoftwareInput;pub use config::SoftwareKind;pub use config::TimerScheduleDriver;pub use config::WasmLimits;pub use process::ExecOptions;pub use process::ExecResult;pub use process::ProcessExit;pub use process::ProcessInfo;pub use process::ProcessOutput;pub use process::ProcessStatus;pub use process::ProcessStream;pub use process::ProcessTreeNode;pub use process::SpawnHandle;pub use process::SpawnOptions;pub use process::SpawnStdio;pub use process::SpawnedProcessInfo;pub use process::StdinInput;pub use process::TimingMitigation;pub use net::HttpRequest;pub use net::HttpResponse;pub use fs::BatchReadResult;pub use fs::BatchWriteEntry;pub use fs::BatchWriteResult;pub use fs::DirEntry;pub use fs::DirEntryType;pub use fs::DynamicMountDescriptor;pub use fs::FileContent;pub use fs::FilesystemEntry;pub use fs::FilesystemEntryEncoding;pub use fs::FilesystemSnapshotEntries;pub use fs::FilesystemSnapshotExport;pub use fs::MkdirOptions;pub use fs::MountInfo;pub use fs::ReaddirRecursiveOptions;pub use fs::RemoveOptions;pub use fs::RootSnapshotExport;pub use fs::SnapshotExportKind;pub use fs::VirtualDirEntry;pub use fs::VirtualFileSystem;pub use fs::VirtualStat;pub use shell::ConnectTerminalOptions;pub use shell::OpenShellOptions;pub use shell::ShellData;pub use shell::ShellExit;pub use shell::ShellHandle;pub use session::AgentExitEvent;pub use session::AgentExitStream;pub use session::AgentExitSubscription;pub use session::AgentMessage;pub use session::AgentRegistryEntry;pub use session::AgentRestartOutcome;pub use session::CancelPromptStatus;pub use session::DurableEventKind;pub use session::DurableSessionEvent;pub use session::DurableSessionEventEntry;pub use session::DurableSessionEventStream;pub use session::DurableSessionEventSubscription;pub use session::EphemeralEventKind;pub use session::EphemeralSessionEvent;pub use session::EphemeralSessionEventEntry;pub use session::HistoryPage;pub use session::ListSessionsInput;pub use session::OpenSessionInput;pub use session::PendingPermissionRequest;pub use session::PermissionEventStatus;pub use session::PermissionPolicy;pub use session::PermissionResponseStatus;pub use session::PermissionTerminalReason;pub use session::PromptInput;pub use session::PromptResult;pub use session::ReadHistoryInput;pub use session::SessionCapabilities;pub use session::SessionConfig;pub use session::SessionConfigValue;pub use session::SessionInfo;pub use session::SessionPage;pub use session::SessionState;pub use session::SessionStreamEntry;pub use session::SessionSubscriptionError;pub use cron::CronAction;pub use cron::CronActionInfo;pub use cron::CronEvent;pub use cron::CronJobHandle;pub use cron::CronJobInfo;pub use cron::CronJobOptions;pub use cron::CronManager;pub use cron::CronOverlap;pub use cron::CronSessionOptions;
Modules§
- agent_
os - The
AgentOsstruct (all fields from ADR-001 §3), thecreatebuilder, and theshutdown(dispose) teardown. - config
- Configuration types:
AgentOsConfig(= TSAgentOsOptions), the permissions tree, root filesystem config, mount config, and the schedule-driver abstraction. - cron
- Cron scheduling + the
CronManager. - error
- Error taxonomy for the Agent OS client SDK.
- fs
- Filesystem methods + path guards + supporting types + the in-process
VirtualFileSystemmount contract. - net
- Port-based virtual networking (
fetch). - process
- Process execution & management methods + supporting types.
- session
- Agent sessions (ACP) methods + supporting types.
- shell
- Network (fetch) and Shell / terminal methods + supporting types.
- sidecar
AgentOsSidecar(public transport handle) + placement/description + the process-global shared pool + internal lease accounting.- stream
- Streaming / subscription primitives.
- transport
Structs§
- Session
Config Option - A session configuration option selector and its current state.
- VmGroup
Config - VmUser
Account Config - VmUser
Config - Initial Linux-style credentials and account record for processes in a VM.
Enums§
- Content
Block - Content blocks represent displayable information in the Agent Client Protocol.
- McpServer
Config - Configuration for connecting to an MCP (Model Context Protocol) server.
- Session
Update - Different types of updates that can be sent during session processing.
- Stop
Reason - Reasons why an agent stops processing a prompt turn.
Constants§
- ACP_
PROTOCOL_ VERSION - ACP protocol version negotiated on session creation.
- CLOSED_
SHELL_ EXIT_ CODE_ RETENTION_ LIMIT - Bounded exited-shell exit-code retention (for
wait_shellafter exit). - CRON_
JOB_ LIMIT - Maximum scheduled cron jobs per VM.
- SHELL_
DISPOSE_ TIMEOUT_ MS - Two-phase shell-drain timeout during dispose (milliseconds).
- VM_
READY_ TIMEOUT_ MS - VM lifecycle ready timeout during
create(milliseconds).