ainl-runtime
Alpha (0.2.0-alpha) — API subject to change.
ainl-runtime is the Rust orchestration layer for the unified AINL graph memory stack: it coordinates ainl-memory, ainl-persona’s EvolutionEngine (shared with ainl-graph-extractor’s GraphExtractorTask), and optional post-turn extraction, with a [TurnHooks] seam for hosts (e.g. OpenFang).
It is not the Python RuntimeEngine, not the MCP server, not the AINL CLI, and not an LLM or IR parser.
What v0.2 provides
- [
AinlRuntime] — owns a [ainl_memory::GraphMemory] over a [SqliteGraphStore], a stateful [GraphExtractorTask], and [RuntimeConfig]. - Persona evolution (direct) — [
AinlRuntime::evolution_engine] / [AinlRuntime::evolution_engine_mut], [AinlRuntime::apply_evolution_signals], [AinlRuntime::evolution_correction_tick], [AinlRuntime::persist_evolution_snapshot], [AinlRuntime::evolve_persona_from_graph_signals] (EvolutionEnginelives in ainl-persona; the extractor is an additional signal source, not a hard gate). - Boot — [
AinlRuntime::load_artifact] → [AinlGraphArtifact] (export_graph+validate_graph; fails on dangling edges). - Turn pipeline — [
AinlRuntime::run_turn]: validate subgraph, compile persona lines from persona nodes, [compile_memory_context], capped BFS walk (next/follows/DERIVED_FROM), record an episodic node (user message + tools), run extractor everyextraction_intervalturns. - Legacy API — [
RuntimeContext] +record_*+ [RuntimeContext::run_graph_extraction_pass] unchanged for light callers.
It still does not execute arbitrary AINL IR, call adapters, or route emit edges; hosts wire LLM/tools on top of [TurnOutput] / [MemoryContext].
Quick start (AinlRuntime)
[]
= "0.2.0-alpha"
use ;
use SqliteGraphStore;
let store = open?;
let cfg = RuntimeConfig ;
let mut rt = new;
let _artifact = rt.load_artifact?;
let out = rt.run_turn?;
RuntimeConfig
agent_id:String(empty disables graph extraction on [RuntimeContext]; required for [AinlRuntime] turns).max_steps: cap for the exploratory BFS inrun_turn(default1000).extraction_interval: runGraphExtractorTask::run_passevery N turns (0= never).
License
MIT OR Apache-2.0