prebuilt.ai_insight.agent¶

General News Reporter Agent implementation.

Attributes¶

Classes¶

NewsReporterAgent

General news reporter agent that can cover any topic.

Functions¶

route_after_filter(→ str)

Route based on filtered articles.

route_after_search(→ str)

Route based on search results.

route_after_summary(→ str)

Route based on summaries.

Module Contents¶

class prebuilt.ai_insight.agent.NewsReporterAgent¶

Bases: haive.agents.base.agent.Agent

General news reporter agent that can cover any topic.

The agent intelligently: - Searches for news on the given topic - Categorizes articles based on their content - Generates appropriate summaries for the target audience - Identifies trends from the actual content - Creates a well-structured report

build_graph() haive.core.graph.state_graph.base_graph2.BaseGraph¶

Build the news reporting workflow graph.

handle_insufficient_content(state: haive.prebuilt.ai_insight.state.NewsReporterState) haive.prebuilt.ai_insight.state.NewsReporterState¶

Handle case when there’s insufficient content.

handle_no_results(state: haive.prebuilt.ai_insight.state.NewsReporterState) haive.prebuilt.ai_insight.state.NewsReporterState¶

Handle case when no results are found.

engines: Dict[str, haive.core.engine.aug_llm.AugLLMConfig] = None¶
state_schema: type = None¶
prebuilt.ai_insight.agent.route_after_filter(state: haive.prebuilt.ai_insight.state.NewsReporterState) str¶

Route based on filtered articles.

Route based on search results.

prebuilt.ai_insight.agent.route_after_summary(state: haive.prebuilt.ai_insight.state.NewsReporterState) str¶

Route based on summaries.

prebuilt.ai_insight.agent.logger¶