Skip to main content

Module registration

Module registration 

Source
Expand description

CSpace → Tool Registry mapping.

This module bridges the capability system and the agent’s tool registry. Given an agent’s CSpace, it walks the capabilities and registers exactly the set of tools the agent is authorised to use.

§Registration tiers

TierToolsCondition
Always-onReadTool, WriteTool, EditTool, GrepTool, FindTool, LsTool, WebSearchTool, GetSearchResultsToolEvery agent gets these
CSpace-drivenExecTool, BrowserTool, kernel domain tools, MCP, A2A, etc.Only if a matching capability with sufficient rights exists

§Example

use std::sync::Arc;
use oxi_sdk::{ToolRegistry, SearchCache};
use oxios_kernel::capability::template::CapabilityTemplate;
use oxios_kernel::tools::registration::register_tools_from_cspace;

let registry = ToolRegistry::new();
let cspace = CapabilityTemplate::standard().build();
let cache = Arc::new(SearchCache::new());
register_tools_from_cspace(&registry, &kernel, &cspace, cache, agent_id);

Functions§

register_always_on
Register the always-on tool set into a ToolRegistry.
register_tools_from_cspace
Register tools into registry based on the agent’s CSpace.