Skip to main content

createInsightEngine()

createInsightEngine(store, analysisFn, config?): InsightEngine

Defined in: insight-engine.ts:59

Create an LLM-powered semantic analysis engine.

Parameters

ParameterTypeDescription
storeKnowledgeStoreThe knowledge store to read data from and cache insights to.
analysisFnAnalysisFnUser-provided LLM function (prompt → response).
config?InsightEngineConfigOptional configuration (cache TTL).

Returns

InsightEngine

An InsightEngine for semantic analysis of agent execution data.

Example

const engine = createInsightEngine(store, async (prompt) => {
return await myLlm.complete(prompt);
});
const result = await engine.explainFailures('my-agent');
console.log(result.content);