Skip to main content

ainl_graph_extractor/
runner.rs

1//! Convenience entry for the agent loop.
2
3use crate::extractor::{ExtractionReport, GraphExtractorTask};
4use ainl_memory::SqliteGraphStore;
5
6/// Convenience wrapper for one-off extraction. Creates a fresh
7/// [`GraphExtractorTask`] with a new [`crate::PersonaSignalExtractorState`] on each
8/// call, so streak-based detectors (brevity, formality) cannot fire across
9/// invocations. For long-running agent loops, instantiate
10/// [`GraphExtractorTask`] directly and call [`GraphExtractorTask::run_pass`]
11/// to preserve streak state between passes.
12pub fn run_extraction_pass(store: &SqliteGraphStore, agent_id: &str) -> ExtractionReport {
13    GraphExtractorTask::new(agent_id).run_pass(store)
14}