haive.agents.research.open_perplexity.state¶
State schemas for the open_perplexity research agent.
This module defines the state schemas used by the research agent to track the progress of research, manage search queries, store sources, and generate reports. It includes schemas for input, processing state, and output.
Classes¶
Represents a section in the research report. |
|
Confidence level in research findings. |
|
Input state for the research process. |
|
Output state for the research process. |
|
State schema for the open_perplexity research agent. |
|
Represents a web search query for retrieving information. |
Module Contents¶
- class haive.agents.research.open_perplexity.state.ReportSection(/, **data)¶
Bases:
pydantic.BaseModelRepresents a section in the research report.
Tracks a single report section, including its content, research needs, and associated queries and sources.
- Parameters:
data (Any)
- name¶
Section name
- description¶
Section description
- content¶
Section content
- requires_research¶
Whether this section requires research
- queries¶
Search queries for this section
- sources¶
Sources used in this section
- status¶
Section status (pending, in_progress, completed)
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class haive.agents.research.open_perplexity.state.ResearchConfidenceLevel¶
-
Confidence level in research findings.
Represents the overall confidence level in the research results, based on source quality, quantity, and consistency.
- HIGH¶
High confidence based on numerous reliable sources
- MEDIUM¶
Medium confidence with good but limited sources
- LOW¶
Low confidence due to limited or questionable sources
- INSUFFICIENT_DATA¶
Not enough data to establish confidence
Initialize self. See help(type(self)) for accurate signature.
- class haive.agents.research.open_perplexity.state.ResearchInputState(/, **data)¶
Bases:
pydantic.BaseModelInput state for the research process.
Represents the initial input to the research agent, including the user’s query and any additional context.
- Parameters:
data (Any)
- messages¶
Input messages including user query
- input_context¶
Additional context provided for the research
- research_parameters¶
Optional parameters to customize the research process
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class haive.agents.research.open_perplexity.state.ResearchOutputState(/, **data)¶
Bases:
pydantic.BaseModelOutput state for the research process.
Represents the final output from the research agent, including the completed report and confidence assessment.
- Parameters:
data (Any)
- final_report¶
Complete research report in markdown format
- confidence_level¶
Confidence level in the research findings
- sources¶
Sources used in the research
- messages¶
Conversation history including the assistant’s final response
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class haive.agents.research.open_perplexity.state.ResearchState(/, **data)¶
Bases:
pydantic.BaseModelState schema for the open_perplexity research agent.
Comprehensive state object that tracks all aspects of the research process, including messages, research parameters, report sections, sources, and findings.
- Parameters:
data (Any)
- messages¶
Conversation messages
- research_topic¶
Main topic of research
- research_question¶
Specific research question
- input_context¶
Additional context provided by the user
- search_parameters¶
Parameters for search and research customization
- report_sections¶
Sections of the research report
- current_section_index¶
Index of the current section being researched
- search_queries¶
List of search queries to execute
- query¶
Current search query
- retrieved_documents¶
Documents retrieved from search
- sources¶
Sources used in the research
- data_sources¶
Data sources available and used
- vectorstore_documents¶
Documents loaded into vector store
- research_findings¶
Key findings from the research
- confidence_level¶
Overall confidence level in research findings
- confidence_explanation¶
Explanation for the confidence level assessment
- final_report¶
Final research report content
- current_step¶
Current step in the workflow
- error¶
Error message if any step fails
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class haive.agents.research.open_perplexity.state.WebSearchQuery(/, **data)¶
Bases:
pydantic.BaseModelRepresents a web search query for retrieving information.
Tracks a single search query, its purpose, execution status, and results.
- Parameters:
data (Any)
- query¶
The search query text
- purpose¶
Purpose of this search query
- data_source¶
Data source to query (web, github, academic, news, etc.)
- completed¶
Whether this query has been executed
- results¶
Search results
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.