agents.planning.smart_parsing_example¶
Smart Output Parsing Integration Example for Planning Agents.
This example demonstrates how to use smart output parsing with post-hooks to handle different types of agent outputs intelligently.
Classes¶
Model for decision points in workflow. |
|
Model for progress reporting. |
|
BaseExecutorAgent enhanced with smart output parsing. |
|
BasePlannerAgent enhanced with smart output parsing. |
|
SimpleAgentV3 enhanced with smart output parsing. |
|
Model for task analysis output. |
Functions¶
Create workflow with adaptive parsing based on content detection. |
|
Create a planning workflow with smart output parsing. |
|
Test the smart parsing workflow with different input types. |
Module Contents¶
- class agents.planning.smart_parsing_example.DecisionPoint(/, **data)¶
Bases:
pydantic.BaseModel
Model for decision points in workflow.
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.
- Parameters:
data (Any)
- class agents.planning.smart_parsing_example.ProgressReport(/, **data)¶
Bases:
pydantic.BaseModel
Model for progress reporting.
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.
- Parameters:
data (Any)
- class agents.planning.smart_parsing_example.SmartExecutorAgent(**kwargs)¶
Bases:
haive.agents.base.smart_output_parsing.SmartOutputParsingMixin
,haive.agents.planning.base.agents.executor.BaseExecutorAgent
BaseExecutorAgent enhanced with smart output parsing.
Init .
- class agents.planning.smart_parsing_example.SmartPlannerAgent(**kwargs)¶
Bases:
haive.agents.base.smart_output_parsing.SmartOutputParsingMixin
,haive.agents.planning.base.agents.planner.BasePlannerAgent
BasePlannerAgent enhanced with smart output parsing.
Init .
- class agents.planning.smart_parsing_example.SmartSimpleAgent(**kwargs)¶
Bases:
haive.agents.base.smart_output_parsing.SmartOutputParsingMixin
,SimpleAgentV3
SimpleAgentV3 enhanced with smart output parsing.
Init .
- class agents.planning.smart_parsing_example.TaskAnalysis(/, **data)¶
Bases:
pydantic.BaseModel
Model for task analysis output.
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.
- Parameters:
data (Any)
- agents.planning.smart_parsing_example.create_adaptive_parsing_workflow()¶
Create workflow with adaptive parsing based on content detection.
- async agents.planning.smart_parsing_example.create_smart_planning_workflow()¶
Create a planning workflow with smart output parsing.
- async agents.planning.smart_parsing_example.test_smart_parsing_workflow()¶
Test the smart parsing workflow with different input types.