Decision Module

Decisioning: scoring, selection, and reporting with agent support.

This module filters analyzed items, scores them with heuristics, and optionally uses an agent to produce a plain-text report when there are strong candidates.

async agent.pipeline.decision.make_decision_and_report(task, selected)[source]

Generate a plain-text report or decide to skip notifying the user.

Uses an LLM-based reporter when available, falling back to a local template otherwise.

Parameters:
Return type:

DecisionReport

Returns:

Decision and optional report text.

agent.pipeline.decision.score_result(task, result)[source]

Compute overall score in [0, 100] using relevance and simple boosts.

Parameters:
Return type:

float

Returns:

Score in the range [0, 100].

agent.pipeline.decision.select_top(task, analyzed)[source]

Score and keep items above min_relevance in descending order.

The output is trimmed to at most three items to keep reports concise.

Parameters:
Return type:

List[ScoredAnalysis]

Returns:

Compact, sorted selection of ScoredAnalysis.