createInsightEngine()
createInsightEngine(
store,analysisFn,config?):InsightEngine
Defined in: insight-engine.ts:59
Create an LLM-powered semantic analysis engine.
Parameters
| Parameter | Type | Description |
|---|---|---|
store | KnowledgeStore | The knowledge store to read data from and cache insights to. |
analysisFn | AnalysisFn | User-provided LLM function (prompt → response). |
config? | InsightEngineConfig | Optional configuration (cache TTL). |
Returns
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);