Skip to main content

Crate sim_lib_skill

Crate sim_lib_skill 

Source
Expand description

Agent skills for the SIM runtime.

A skill is a callable capability that an agent can invoke – a tool, a model, a resource, a prompt, a memory, a retriever, a judge, or a router. Each skill is described by a SkillCard that pairs a stable identity and symbol with input and output sim_shape contracts, a SkillPolicy governing caching/recording/privacy, and the transport that actually runs the call. Cards are bound into a SkillRegistry and exposed as ordinary callable runtime objects through SkillCallable.

Behavior is provided by a SkillTransport: a backend (fixture, HTTP, MCP, process, OpenAI-compatible server, …) that knows how to discover and call skills. SkillLib registers the skill/* operations (install, bind, list, card, call, and the feature-gated audit/tool/runner/serve surfaces) when the library is loaded into a sim_kernel::Cx.

Optional Cargo features select transports and integrations: mcp, http, openai, process, agent, runner, serve, and the cache/cassette recording surfaces.

Structs§

FixtureSkillSpec
Inputs for building a fixture SkillCard via SkillCard::fixture.
FixtureTransport
In-memory skill transport for tests and examples.
SkillCallable
Callable runtime object that invokes a single bound skill.
SkillCard
Full runtime description of a single skill.
SkillCardDescriptor
Serializable skill/Card projection of a SkillCard.
SkillFunction
Callable runtime object implementing one skill/* operation.
SkillLib
Loadable library that registers the skill/* operations and registry.
SkillPolicy
Privacy, caching, and recording policy attached to a SkillCard.
SkillRegistry
Live registry of skill transports and bound cards.
SkillTransportValue
Runtime Object wrapper around a shared SkillTransport.

Enums§

FixtureBehavior
Deterministic behavior a FixtureTransport runs for an operation.
SkillCacheMode
Caching behavior for a skill’s results.
SkillCassetteMode
Cassette (record/replay) behavior for a skill’s calls.
SkillPrivacyPolicy
How much of a skill’s raw payload may leave the local boundary.
SkillRole
Role a skill plays for an agent.

Constants§

SKILL_LIB_ID
Stable identifier for the skill library and its symbol namespace.

Traits§

SkillEventSink
Sink that receives streaming events emitted during a skill call.
SkillTransport
Backend that discovers and runs skills.

Functions§

install_fixture_skill
Installs the skill library, registers transport, and binds card.
install_skill_lib
Installs the skill library into cx once and publishes its browse metadata.
manifest_name
Returns the manifest identifier symbol for SkillLib.
skill_bind_symbol
Returns the symbol for the skill/bind operation.
skill_call_capability
Returns the broad capability required to call any skill.
skill_call_symbol
Returns the symbol for the skill/call operation.
skill_card_descriptor_class_symbol
Returns the class symbol (skill/Card) for SkillCardDescriptor.
skill_card_symbol
Returns the symbol for the skill/card operation.
skill_exports
Returns the library exports: every skill/* function plus the registry value, with the feature-gated operations included when their feature is on.
skill_install_capability
Returns the capability required to call skill/install.
skill_install_symbol
Returns the symbol for the skill/install operation.
skill_list_symbol
Returns the symbol for the skill/list operation.
skill_registry
Resolves the SkillRegistry installed in cx.
skill_registry_symbol
Returns the symbol the SkillRegistry value is bound under.
skill_serve_capability
Returns the capability required to serve skills over a transport.
skill_specific_call_capability
Returns the per-skill call capability for the skill with the given id.
skill_transport_value
Wraps transport in an opaque SkillTransportValue runtime value.