Skip to content

Core Runtime

The LightMem2 core runtime is the host-independent execution engine that loads, manages, and runs plugins. It sits between the agent host and the plugins, providing a consistent environment regardless of which host the user is running.

Responsibilities

ResponsibilityDescription
Plugin loadingDiscovers, validates, and loads plugins from configured directories
Lifecycle managementCalls plugin hooks at the right time: install, enable, session start, session end, disable, uninstall
ConfigurationMerges host config, plugin config, and user overrides into a resolved configuration
Event routingDispatches host events (messages, tool calls, session state changes) to plugins
Resource isolationEnsures plugins cannot interfere with each other or the host

Current Implementation

The core runtime is implemented across these workspace packages:

PackagePurpose
kernelShared types, interfaces, events, and runtime contracts
runtime-coreHost-agnostic runtime engine and shared execution logic
host-adapterShared host-adapter contracts and path-resolution interfaces
layers/historyCanonical state, raw semantic turns, task registry
layers/decisionPolicy analysis, reduction/eviction decisions, estimator
layers/memory experimentalDistillation and retrieval (in progress)

Next

Released under the MIT License.