Skip to main content

Crate oxios_kernel

Crate oxios_kernel 

Source
Expand description

Oxios kernel: supervisor, event bus, state store.

The kernel is the core of the Oxios Agent OS. Everything passes through here: agent lifecycle, inter-agent communication, and persistent state management.

Re-exports§

pub use telemetry_stub as telemetry;
pub use agent_group::OxiosAgentGroup;
pub use agent_group::OxiosAgentGroupStatus;
pub use agent_group::OxiosGroupAgent;
pub use agent_lifecycle::AgentLifecycleManager;
pub use agent_runtime::AgentRuntime;
pub use daemon::DaemonManager;
pub use daemon::DaemonStatus;
pub use supervisor::BasicSupervisor;
pub use supervisor::Supervisor;
pub use budget::BudgetExceeded;
pub use budget::BudgetInfo;
pub use budget::BudgetKind;
pub use budget::BudgetLimit;
pub use budget::BudgetManager;
pub use budget::FullBudgetInfo;
pub use cron::CronJob;
pub use cron::CronJobResult;
pub use cron::CronJobUpdate;
pub use cron::CronScheduler;
pub use cron::JobSource;
pub use orchestrator::AgentRole;
pub use orchestrator::OrchestrationResult;
pub use orchestrator::Orchestrator;
pub use orchestrator::SubTask;
pub use scheduler::AgentScheduler;
pub use scheduler::Priority;
pub use scheduler::ScheduledTask;
pub use scheduler::SchedulerStats;
pub use scheduler::TaskStatus;
pub use access_manager::AccessManager;
pub use access_manager::Action;
pub use access_manager::AgentPermissions;
pub use access_manager::ApprovalStatus;
pub use access_manager::PendingApproval;
pub use access_manager::RbacAuditEntry;
pub use access_manager::RbacManager;
pub use access_manager::RbacPolicy;
pub use access_manager::Role;
pub use access_manager::Subject;
pub use auth::AuthManager;
pub use auth::KeyMeta;
pub use capability::template::CapabilityTemplate;
pub use capability::CSpace;
pub use capability::Capability;
pub use capability::CapabilityId;
pub use capability::Issuer;
pub use capability::ResourceRef;
pub use capability::Rights;
pub use credential::CredentialStore;
pub use a2a::A2ACircuitBreaker;
pub use a2a::A2AMessage;
pub use a2a::A2AProtocol;
pub use a2a::A2ARequest;
pub use a2a::A2AResponse;
pub use a2a::AgentCard;
pub use a2a::AgentCardRegistry;
pub use a2a::CircuitState;
pub use a2a::DelegationHandler;
pub use a2a::TaskPriority;
pub use a2a::TaskSpec;
pub use email::SendReceipt;
pub use email::SmtpClient;
pub use event_bus::EventBus;
pub use event_bus::KernelEvent;
pub use persona::default_personas;
pub use persona::Persona;
pub use persona::PersonaManager;
pub use persona::PersonaStore;
pub use skill::clawhub::ClawHubClient;
pub use skill::clawhub::ClawHubInstaller;
pub use skill::clawhub::ClawHubLockEntry;
pub use skill::clawhub::ClawHubLockfile;
pub use skill::clawhub::ClawHubOrigin;
pub use skill::clawhub::ClawHubSearchResult;
pub use skill::clawhub::ClawHubSkillDetail;
pub use skill::clawhub::ClawHubSkillMeta;
pub use skill::clawhub::ClawHubVersion;
pub use skill::clawhub::DownloadedArchive;
pub use skill::clawhub::InstallResult;
pub use skill::clawhub::UpdateAvailable;
pub use skill::clawhub::UpdateResult;
pub use skill::skills_sh::SkillsShAuditEntry;
pub use skill::skills_sh::SkillsShAuditResponse;
pub use skill::skills_sh::SkillsShClient;
pub use skill::skills_sh::SkillsShFile;
pub use skill::skills_sh::SkillsShInstallResult;
pub use skill::skills_sh::SkillsShInstaller;
pub use skill::skills_sh::SkillsShOrigin;
pub use skill::skills_sh::SkillsShSearchResponse;
pub use skill::skills_sh::SkillsShSkill;
pub use skill::skills_sh::SkillsShSkillDetail;
pub use skill::InstallKind;
pub use skill::Requirements;
pub use skill::RequirementsCheck;
pub use skill::Skill;
pub use skill::SkillConfig;
pub use skill::SkillEntry;
pub use skill::SkillFormat;
pub use skill::SkillInstallSpec;
pub use skill::SkillInvocationPolicy;
pub use skill::SkillManager;
pub use skill::SkillMeta;
pub use skill::SkillMetadata;
pub use skill::SkillRef;
pub use skill::SkillSnapshot;
pub use skill::SkillSource;
pub use skill::SkillState;
pub use skill::SkillStatus;
pub use tools::tool_types::ArgumentDef;
pub use tools::tool_types::ToolDef;
pub use tools::ExecTool;
pub use tools::KnowledgeTool;
pub use backup::BackupManifest;
pub use backup::BackupSection;
pub use config::BrowserConfig;
pub use config::ChannelsConfig;
pub use config::CronConfig;
pub use config::DaemonConfig;
pub use config::EmailConfig;
pub use config::EmbeddingConfig;
pub use config::EngineConfig;
pub use config::ExecConfig;
pub use config::ExecMode;
pub use config::GitConfig;
pub use config::InlineCronJob;
pub use config::LoggingConfig;
pub use config::MarketplaceConfig;
pub use config::McpConfig;
pub use config::McpServerDef;
pub use config::MemoryConfig;
pub use config::OrchestratorConfig;
pub use config::OxiosConfig;
pub use config::PersonaConfig;
pub use config::SkillsShConfig;
pub use config::SqliteMemoryConfig;
pub use git_layer::CommitContext;
pub use git_layer::CommitDiff;
pub use git_layer::CommitInfo;
pub use git_layer::DiffKind;
pub use git_layer::DiffStats;
pub use git_layer::FileDiff;
pub use git_layer::GitLayer;
pub use git_layer::LogEntry;
pub use project::detect_project;
pub use project::extract_path;
pub use project::find_by_id;
pub use project::find_by_name;
pub use project::ConversationBuffer;
pub use project::ConversationTurn;
pub use project::DetectionResult;
pub use project::Project;
pub use project::ProjectId;
pub use project::ProjectSource;
pub use project::ProjectManager;
pub use project::ProjectManagerError;
pub use resource_monitor::OverloadThreshold;
pub use resource_monitor::ResourceMonitor;
pub use resource_monitor::ResourceSnapshot;
pub use state_store::AgentResponse;
pub use state_store::PruneConfig;
pub use state_store::PruneThrottle;
pub use state_store::Session;
pub use state_store::SessionId;
pub use state_store::SessionSummary;
pub use state_store::StateStore;
pub use engine::EngineHandle;
pub use engine::EngineProvider;
pub use engine::OxiosEngine;
pub use error::HttpStatus;
pub use error::KernelError;
pub use error::KernelResult;
pub use metrics::get_metrics;
pub use metrics::register_builtin_metrics;
pub use metrics::registry;
pub use observability::audit_log;
pub use observability::cost_tracker;
pub use observability::tracer;
pub use types::AgentId;
pub use types::AgentInfo;
pub use types::AgentStatus;
pub use kernel_handle::KernelHandle;
pub use kernel_handle::MarketplaceApi;
pub use kernel_handle::A2aApi;
pub use kernel_handle::AgentApi;
pub use kernel_handle::CalendarApi;
pub use kernel_handle::CopilotResponse;
pub use kernel_handle::EmailApi;
pub use kernel_handle::EngineApi;
pub use kernel_handle::EngineConfigResponse;
pub use kernel_handle::ExecApi;
pub use kernel_handle::ExtensionApi;
pub use kernel_handle::FallbackEvent;
pub use kernel_handle::InfraApi;
pub use kernel_handle::InputModality as EngineInputModality;
pub use kernel_handle::KnowledgeContext;
pub use kernel_handle::KnowledgeLens;
pub use kernel_handle::KnowledgeNote;
pub use kernel_handle::McpApi;
pub use kernel_handle::MemoryNote;
pub use kernel_handle::ModelInfo;
pub use kernel_handle::PersonaApi;
pub use kernel_handle::ProjectApi;
pub use kernel_handle::ProjectInfo;
pub use kernel_handle::ProviderCategory;
pub use kernel_handle::ProviderInfo;
pub use kernel_handle::RoutingConfigSnapshot;
pub use kernel_handle::RoutingStats;
pub use kernel_handle::RoutingStatsSnapshot;
pub use kernel_handle::RoutingUpdate;
pub use kernel_handle::SecurityApi;
pub use kernel_handle::SharedExecConfig;
pub use kernel_handle::StateApi;
pub use kernel_handle::ValidateKeyResult;
pub use session_context::SessionContext;

Modules§

a2a
A2A (Agent-to-Agent) protocol for horizontal agent communication.
access_manager
Access Manager — least-privilege security for agents.
agent_group
Agent group types for oxios orchestration.
agent_lifecycle
Agent lifecycle management — fork, register, run, cleanup.
agent_runtime
Agent runtime: wraps oxi-sdk’s Agent for Seed execution.
auth
API key authentication manager.
backup
Backup and restore for Oxios state.
budget
Budget manager for agent-level token and call budget tracking.
capability
Capability-based access control for the Oxios kernel.
config
Configuration loading from TOML files.
coordination
Coordination primitives — multi-agent work distribution and consensus.
credential
Multi-source credential resolution.
cron
Cron scheduler for time-based autonomous agent execution.
daemon
Daemon lifecycle management — PID file, start/stop, system service install.
email
SMTP email client — lettre wrapper.
embedding
Embedding abstraction — re-exported from oxios-memory.
engine
Engine provider — wraps oxi-sdk’s Oxi for the kernel.
error
Typed error types for the Oxios kernel public API.
event_bus
Event bus: inter-agent communication via oxi_sdk::EventBus<KernelEvent>.
git_layer
Git-based version control layer using gix. Provides in-process commits, logs, tags, restore, and diffs.
kernel_handle
Kernel facade — 13 domain Facades composing the System Call API.
mcp
MCP integration — adapters between oxios-mcp and the kernel.
memory
Agent memory system.
metrics
Metrics — Prometheus-compatible counters, gauges, and histograms.
observability
Observability — oxi-sdk 0.26.2 tracing, cost tracking, and audit.
onboarding
Interactive first-run setup wizard.
orchestrator
Orchestrator: coordinates the Ouroboros lifecycle for user messages.
persona
Persona system: multiple AI characters with distinct voices.
project
Project module: work context management.
resource_monitor
Resource monitoring for the Oxios kernel.
scheduler
Agent Scheduler — priority-based task queue inspired by AIOS / AgentRM.
session_context
Session-level context for managing conversation state across Seed executions.
skill
Skill system: multi-format SKILL.md parsing with format detection, plus multi-registry marketplace sources (ClawHub, Skills.sh).
sqlite_cache
SQLite-based embedding cache.
sqlite_migration
JSON → SQLite migration for existing memory data.
state_store
Filesystem-based state store.
supervisor
Supervisor: agent lifecycle management.
telemetry_stub
Stub telemetry module (no OTel feature).
tools
Oxios-specific agent tools.
types
Core types for the Oxios kernel.
workers
Background worker management for the Learning layer.

Structs§

AttentionBenchmarkResult
Result of a benchmark comparing naive vs flash attention.
AuditFilter
Filter criteria for querying the audit log.
AuditTrail
A tamper-evident audit trail with cryptographic hash chain.
AutoClassifier
Automatic memory type classifier.
AutoMemoryBridge
Bridge between Oxios memory and external memory systems.
AutoProtector
Automatic protection calculator.
Bm25Hit
A single BM25 search hit.
CallToolResult
MCP tools/call result
ChunkConfig
Configuration for text chunking.
CompactionTree
Compaction tree manager.
CostSnapshot
Per-agent cost snapshot.
CostTracker
Cost tracker — accumulates token usage and computed costs per agent.
CurationCandidate
A single candidate for removal during curation.
CurationReport
Report from a curation run.
DecayEngine
Decay engine — computes current retention scores for memory entries.
DreamCheckpoint
Dream execution state (checkpoint for crash recovery).
DreamConfig
Configuration extracted for Dream use.
DreamProcess
The Dream process — 4-phase background memory consolidation.
DreamReport
Report from a dream (consolidation) run.
EmbeddingCache
Content-addressable embedding cache with TTL and LRU eviction.
ExportResult
Result of exporting memories to an external system.
FlashAttention
Block-wise attention computation optimized for CPU cache locality.
FlashAttentionConfig
Configuration for Flash Attention.
GuidancePattern
A guidance pattern for export to external format.
HistoricalPeriod
A historical period summary.
HnswIndex
HNSW approximate nearest neighbor index.
HnswMemoryIndex
HNSW index manager for memory entries.
HyperbolicConfig
Configuration for hyperbolic operations.
HyperbolicEmbedding
Hyperbolic embedding manager for hierarchical data.
ImportResult
Result of importing memories from an external system.
McpBridge
MCP bridge — connects multiple MCP servers to the tool system.
McpCapabilities
MCP server capabilities
McpServer
MCP server capability definition
McpTool
MCP tool definition from a server
MemoryBudget
Budget for memory curation — limits per type.
MemoryDatabase
SQLite-backed memory database.
MemoryEntry
A single memory entry with lifecycle and auto-protection metadata.
MemoryEstimate
Memory usage estimate.
MemoryGraph
A memory link graph for computing PageRank-style importance.
MemoryInsight
A single imported memory insight from an external system.
MemoryManager
Agent memory manager.
MemoryMapEntry
One node on the memory map.
MemoryNeighbor
Edge from one memory to a similar neighbor.
MigrationReport
Migration report.
ProactiveRecall
Proactive recall engine.
RankedMemory
A ranked memory result from unified search.
RecallTiming
Tracks when proactive recall should be triggered.
RootEntry
A single entry in the ROOT index’s active context.
RootIndex
ROOT index — the “table of contents” for all agent knowledge.
SdkTracer
SemanticHit
Result of a semantic search hit.
SonaEngine
The SONA engine for trajectory-based self-learning.
Span
SpanGuard
SqliteMemoryStore
SQLite-backed memory store.
SyncResult
Result of a bidirectional sync operation.
TextChunk
A text chunk with metadata.
TextVector
Simple TF-IDF vector for text similarity.
TfIdfEmbeddingProvider
TF-IDF based embedding provider (zero dependencies).
TokenUsage
Token usage broken down by component.
TopicEntry
A topic entry in the ROOT index.
TrailEntry
A single entry in the audit trail.
VectorHit
A single vector search hit.

Enums§

AuditAction
Types of actions that can be audited.
AuditError
Errors that can occur during audit trail operations.
EmbeddingVector
An embedding vector for semantic similarity comparison.
InsightCategory
Category of an imported memory insight.
MemoryTier
Memory tier classification.
MemoryType
Memory entry type — 9 types derived from the SOAR/ACT-R cognitive model.
ProtectionLevel
Auto-protection level. Users never need to know about this.
SdkAuditEntry
An audit trail entry.
SpanKind
SyncDirection
Direction of memory synchronization.

Traits§

AuditPersistence
Trait for persisting audit trail entries.
EmbeddingProvider
Provider for generating text embeddings.

Functions§

batch_euclidean_to_poincare
Batch-convert Euclidean vectors to Poincaré ball points.
bytes_to_f32_slice
Convert a byte blob back to Vec<f32>.
chunk_fixed
Split text into fixed-size overlapping chunks.
chunk_paragraphs
Split text into paragraphs, then group paragraphs into chunks that don’t exceed max_chunk_size.
content_hash
Compute a stable hash of content for deduplication.
cosine_similarity_f32
Compute cosine similarity between two f32 vectors.
euclidean_to_poincare
Convert a Euclidean vector to a point on the Poincaré ball.
f32_slice_to_bytes
Convert a &[f32] to a little-endian byte vector.
hyperbolic_distance
Compute the hyperbolic distance between two points on the Poincaré ball.
l2_normalize_f32
Normalize a dense vector in-place using L2 normalization.
l2_normalize_f64
Normalize a dense f64 vector in-place using L2 normalization.
mobius_add
Möbius addition: the hyperbolic analog of vector addition.
mobius_scalar_mul
Möbius scalar multiplication: scaling in hyperbolic space.
reciprocal_rank_fusion
Fuse multiple ranked result sets using Reciprocal Rank Fusion.

Type Aliases§

AuditAgentId
Unique identifier for an agent (String for flexibility).
HashDigest
Type alias for hash digest (blake3 hex output, 64 chars).