Skip to main content

Crate aios_protocol

Crate aios_protocol 

Source
Expand description

§aios-protocol — Canonical Agent OS Protocol

This crate defines the shared types, event taxonomy, and trait interfaces that all Agent OS projects (Arcan, Lago, Praxis, Autonomic) depend on.

It is intentionally dependency-light (no runtime deps like tokio, axum, or redb) so it can be used as a pure contract crate.

§Module Overview

  • ids — Typed ID wrappers (SessionId, EventId, BranchId, BlobHash, etc.)
  • event — EventEnvelope + EventKind (~55 variants, forward-compatible)
  • state — AgentStateVector, BudgetState (homeostasis vitals)
  • mode — OperatingMode, GatingProfile (operating constraints)
  • policy — Capability, PolicySet, PolicyEvaluation
  • tool — ToolCall, ToolOutcome, ToolDefinition, ToolResult, Tool trait, ToolRegistry
  • sandbox — SandboxTier, SandboxLimits, NetworkPolicy
  • memory — SoulProfile, Observation, Provenance, MemoryScope
  • session — SessionManifest, BranchInfo, CheckpointManifest
  • payment — PaymentPort for agent financial operations (x402, MPP)
  • ports — Runtime boundary ports (event store, provider, tools, policy, approvals, memory)
  • error — KernelError, KernelResult

Re-exports§

pub use error::KernelError;
pub use error::KernelResult;
pub use event::ActorType;
pub use event::ApprovalDecision;
pub use event::EventActor;
pub use event::EventEnvelope;
pub use event::EventKind;
pub use event::EventRecord;
pub use event::EventSchema;
pub use event::LoopPhase;
pub use event::PolicyDecisionKind;
pub use event::RiskLevel;
pub use event::SnapshotType;
pub use event::SpanStatus;
pub use event::TokenUsage;
pub use identity::AgentIdentityProvider;
pub use identity::BasicIdentity;
pub use ids::AgentId;
pub use ids::ApprovalId;
pub use ids::BlobHash;
pub use ids::BranchId;
pub use ids::CheckpointId;
pub use ids::EventId;
pub use ids::HiveTaskId;
pub use ids::MemoryId;
pub use ids::RunId;
pub use ids::SeqNo;
pub use ids::SessionId;
pub use ids::SnapshotId;
pub use ids::ToolRunId;
pub use memory::FileProvenance;
pub use memory::MemoryScope;
pub use memory::Observation;
pub use memory::Provenance;
pub use memory::SoulProfile;
pub use mode::GatingProfile;
pub use mode::OperatingMode;
pub use payment::PaymentAuthorizationDecision;
pub use payment::PaymentAuthorizationRequest;
pub use payment::PaymentPort;
pub use payment::PaymentSettlementReceipt;
pub use payment::WalletBalanceInfo;
pub use policy::Capability;
pub use policy::PolicyEvaluation;
pub use policy::PolicySet;
pub use ports::ApprovalPort;
pub use ports::ApprovalRequest;
pub use ports::ApprovalResolution;
pub use ports::ApprovalTicket;
pub use ports::EventRecordStream;
pub use ports::EventStorePort;
pub use ports::ModelCompletion;
pub use ports::ModelCompletionRequest;
pub use ports::ModelDirective;
pub use ports::ModelProviderPort;
pub use ports::ModelStopReason;
pub use ports::PolicyGateDecision;
pub use ports::PolicyGatePort;
pub use ports::ToolExecutionReport;
pub use ports::ToolExecutionRequest;
pub use ports::ToolHarnessPort;
pub use sandbox::NetworkPolicy;
pub use sandbox::SandboxLimits;
pub use sandbox::SandboxTier;
pub use session::BranchInfo;
pub use session::BranchMergeResult;
pub use session::CheckpointManifest;
pub use session::ModelRouting;
pub use session::SessionManifest;
pub use state::AgentStateVector;
pub use state::BlobRef;
pub use state::BudgetState;
pub use state::CanonicalState;
pub use state::MemoryNamespace;
pub use state::PatchApplyError;
pub use state::PatchOp;
pub use state::ProvenanceRef;
pub use state::StatePatch;
pub use state::VersionedCanonicalState;
pub use tool::Tool;
pub use tool::ToolAnnotations;
pub use tool::ToolCall;
pub use tool::ToolContent;
pub use tool::ToolContext;
pub use tool::ToolDefinition;
pub use tool::ToolError;
pub use tool::ToolOutcome;
pub use tool::ToolRegistry;
pub use tool::ToolResult;

Modules§

error
Error types for the Agent OS protocol.
event
Canonical event types for the Agent OS.
identity
Agent identity provider trait — the interface between the kernel contract and identity implementations (Anima or basic).
ids
Canonical ID types for the Agent OS.
memory
Memory types: soul profile, observations, and provenance.
mode
Operating modes and gating profiles.
payment
Payment port — canonical interface for agent financial operations.
policy
Policy types: capabilities, policy sets, and evaluation results.
ports
Canonical runtime ports for Agent OS integrations.
sandbox
Canonical sandbox types for the Agent OS.
session
Session and checkpoint types.
state
Canonical state and patch types for the Agent OS.
tool
Tool types: calls, outcomes, definitions, results, and the canonical Tool trait.