pub struct KernelHandle {Show 16 fields
pub state: StateApi,
pub agents: AgentApi,
pub security: SecurityApi,
pub persona: PersonaApi,
pub extensions: ExtensionApi,
pub mcp: McpApi,
pub infra: InfraApi,
pub projects: Option<ProjectApi>,
pub exec: ExecApi,
pub a2a: A2aApi,
pub engine: EngineApi,
pub knowledge: Arc<KnowledgeBase>,
pub knowledge_lens: Arc<KnowledgeLens>,
pub marketplace_api: MarketplaceApi,
pub calendar: Option<CalendarApi>,
pub email: Option<EmailApi>,
}Expand description
Oxios kernel System Call API — composed of 13 domain Facades.
Each Facade groups related system calls:
StateApi— data persistence, sessionsAgentApi— agent lifecycle, budgets, memorySecurityApi— auth, audit trail, RBAC, approvalsPersonaApi— multi-persona managementExtensionApi— programs, skills, host toolsMcpApi— MCP server bridgeProjectApi— Project management, memory linkingExecApi— execution config, access managementA2aApi— agent-to-agent communicationEngineApi— LLM engine providers, models, config- [
KnowledgeBase] — markdown note management (kernel-free, via oxios-markdown)
Fields§
§state: StateApiState management: save/load/sessions.
agents: AgentApiAgent management: lifecycle/budgets/memory.
security: SecurityApiSecurity: auth/audit/RBAC/approvals.
persona: PersonaApiPersona management.
extensions: ExtensionApiExtensions: programs/skills/host tools.
mcp: McpApiMCP server bridge.
infra: InfraApiInfrastructure: Git/scheduler/cron/resources/events/system.
projects: Option<ProjectApi>Project management: work context (RFC-011).
exec: ExecApiExecution: config + access management.
a2a: A2aApiAgent-to-agent communication.
engine: EngineApiEngine: LLM providers, models, config.
knowledge: Arc<KnowledgeBase>Knowledge base: markdown notes (direct access, no kernel dependency).
knowledge_lens: Arc<KnowledgeLens>Semantic knowledge overlay (HNSW index + agent recall).
marketplace_api: MarketplaceApiMarketplace API — ClawHub search, install, update.
calendar: Option<CalendarApi>Calendar events — create, update, delete, list, search, freebusy.
email: Option<EmailApi>Email — send HTML emails via SMTP, template management.
Implementations§
Source§impl KernelHandle
impl KernelHandle
Sourcepub fn new(
state: StateApi,
agents: AgentApi,
security: SecurityApi,
persona: PersonaApi,
extensions: ExtensionApi,
mcp: McpApi,
infra: InfraApi,
projects: Option<ProjectApi>,
exec: ExecApi,
a2a: A2aApi,
engine: EngineApi,
knowledge: Arc<KnowledgeBase>,
knowledge_lens: Arc<KnowledgeLens>,
marketplace_api: MarketplaceApi,
calendar: Option<CalendarApi>,
email: Option<EmailApi>,
) -> Self
pub fn new( state: StateApi, agents: AgentApi, security: SecurityApi, persona: PersonaApi, extensions: ExtensionApi, mcp: McpApi, infra: InfraApi, projects: Option<ProjectApi>, exec: ExecApi, a2a: A2aApi, engine: EngineApi, knowledge: Arc<KnowledgeBase>, knowledge_lens: Arc<KnowledgeLens>, marketplace_api: MarketplaceApi, calendar: Option<CalendarApi>, email: Option<EmailApi>, ) -> Self
Create a new KernelHandle from 13 domain Facades.
Each Facade is assembled independently in kernel.rs and passed here.
This enables testing individual Facades without the full kernel.
Sourcepub fn from_subsystems(
state_store: Arc<StateStore>,
event_bus: EventBus,
supervisor: Arc<dyn Supervisor>,
scheduler: Arc<AgentScheduler>,
memory_manager: Arc<MemoryManager>,
git_layer: Arc<GitLayer>,
audit_trail: Arc<AuditTrail>,
budget_manager: Arc<BudgetManager>,
resource_monitor: Arc<ResourceMonitor>,
cron_scheduler: Arc<CronScheduler>,
skill_manager: Arc<SkillManager>,
persona_manager: Arc<PersonaManager>,
mcp_bridge: Arc<McpBridge>,
auth_manager: Arc<Mutex<AuthManager>>,
access_manager: Arc<Mutex<AccessManager>>,
config: OxiosConfig,
start_time: Instant,
) -> Self
👎Deprecated: Use KernelHandle::new() with pre-built Facades instead
pub fn from_subsystems( state_store: Arc<StateStore>, event_bus: EventBus, supervisor: Arc<dyn Supervisor>, scheduler: Arc<AgentScheduler>, memory_manager: Arc<MemoryManager>, git_layer: Arc<GitLayer>, audit_trail: Arc<AuditTrail>, budget_manager: Arc<BudgetManager>, resource_monitor: Arc<ResourceMonitor>, cron_scheduler: Arc<CronScheduler>, skill_manager: Arc<SkillManager>, persona_manager: Arc<PersonaManager>, mcp_bridge: Arc<McpBridge>, auth_manager: Arc<Mutex<AuthManager>>, access_manager: Arc<Mutex<AccessManager>>, config: OxiosConfig, start_time: Instant, ) -> Self
Use KernelHandle::new() with pre-built Facades instead
Build a KernelHandle from raw subsystem parameters.
Prefer KernelHandle::new() which takes pre-built Facades.
Sourcepub async fn save_and_commit<T: Serialize>(
&self,
category: &str,
name: &str,
data: &T,
) -> Result<()>
pub async fn save_and_commit<T: Serialize>( &self, category: &str, name: &str, data: &T, ) -> Result<()>
Save data and commit to git (State + Infra).
Sourcepub async fn save_markdown_and_commit(
&self,
category: &str,
name: &str,
content: &str,
) -> Result<()>
pub async fn save_markdown_and_commit( &self, category: &str, name: &str, content: &str, ) -> Result<()>
Save markdown and commit to git (State + Infra).
Sourcepub async fn delete_and_commit(
&self,
category: &str,
name: &str,
) -> Result<bool>
pub async fn delete_and_commit( &self, category: &str, name: &str, ) -> Result<bool>
Delete a file and commit the removal to git (State + Infra).
Sourcepub fn commit_all(&self, message: &str) -> Result<Option<CommitInfo>>
pub fn commit_all(&self, message: &str) -> Result<Option<CommitInfo>>
Commit all current changes to git.
Sourcepub fn flush_audit(&self) -> Result<()>
pub fn flush_audit(&self) -> Result<()>
Flush audit trail and commit to git (Security + Infra).
Sourcepub async fn schedule(
&self,
cron_expr: &str,
task: &str,
persona: Option<&str>,
) -> Result<String>
pub async fn schedule( &self, cron_expr: &str, task: &str, persona: Option<&str>, ) -> Result<String>
Schedule a cron job by expression (convenience wrapper).
Sourcepub async fn unschedule(&self, job_id: &str) -> Result<bool>
pub async fn unschedule(&self, job_id: &str) -> Result<bool>
Unschedule a cron job by string ID (convenience wrapper).
Sourcepub fn list_schedules(&self) -> Vec<CronJob>
pub fn list_schedules(&self) -> Vec<CronJob>
List cron jobs (convenience wrapper).
Sourcepub async fn load_json<T: DeserializeOwned>(
&self,
category: &str,
name: &str,
) -> Result<Option<T>>
pub async fn load_json<T: DeserializeOwned>( &self, category: &str, name: &str, ) -> Result<Option<T>>
Load JSON from state store.
Sourcepub fn start_time(&self) -> Instant
pub fn start_time(&self) -> Instant
Get kernel start time.
Sourcepub fn marketplace_api(&self) -> &MarketplaceApi
pub fn marketplace_api(&self) -> &MarketplaceApi
Marketplace API — ClawHub search, install, update.
Sourcepub fn memory(&self) -> MemoryApi
pub fn memory(&self) -> MemoryApi
Get a MemoryApi facade for memory operations.
Constructs (lazily, on first call) a MemoryApi that wraps the
MemoryManager from AgentApi. This is the 14th typed API in
KernelHandle (alongside A2aApi, AgentApi, etc.).
The MemoryApi is cached — multiple calls return the same instance.