agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4¶
Self-Discover Agent Implementation following LangGraph tutorial pattern.
Based on the official LangGraph Self-Discover tutorial: https://langchain-ai.github.io/langgraph/tutorials/self-discover/self-discover/
This implementation follows the exact pattern from the tutorial with proper state management and structured output parsing.
Classes¶
Output from module adapter - string format. |
|
Output from final reasoner - string format. |
|
Output from module selector - string format. |
|
Output from structure creator - string format. |
|
Agent that adapts modules to be task-specific. |
|
Agent that executes the reasoning plan. |
|
Agent that selects relevant reasoning modules. |
|
State for Self-Discover workflow following LangGraph tutorial. |
|
Agent that creates a structured reasoning plan. |
Functions¶
|
Example of using Self-Discover Enhanced V4. |
|
Run the Self-Discover workflow sequentially. |
Module Contents¶
- class agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.AdaptedModulesOutput(/, **data)¶
Bases:
pydantic.BaseModel
Output from module adapter - string format.
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.reasoning_and_critique.self_discover.self_discover_enhanced_v4.FinalAnswerOutput(/, **data)¶
Bases:
pydantic.BaseModel
Output from final reasoner - string format.
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.reasoning_and_critique.self_discover.self_discover_enhanced_v4.ModuleSelectionOutput(/, **data)¶
Bases:
pydantic.BaseModel
Output from module selector - string format.
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.reasoning_and_critique.self_discover.self_discover_enhanced_v4.ReasoningStructureOutput(/, **data)¶
Bases:
pydantic.BaseModel
Output from structure creator - string format.
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.reasoning_and_critique.self_discover.self_discover_enhanced_v4.SelfDiscoverAdapter¶
Bases:
SimpleAgentV3
Agent that adapts modules to be task-specific.
- class agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.SelfDiscoverExecutor¶
Bases:
SimpleAgentV3
Agent that executes the reasoning plan.
- class agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.SelfDiscoverSelector¶
Bases:
SimpleAgentV3
Agent that selects relevant reasoning modules.
- class agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.SelfDiscoverState¶
Bases:
TypedDict
State for Self-Discover workflow following LangGraph tutorial.
Initialize self. See help(type(self)) for accurate signature.
- class agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.SelfDiscoverStructurer¶
Bases:
SimpleAgentV3
Agent that creates a structured reasoning plan.
- async agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.main()¶
Example of using Self-Discover Enhanced V4.
- async agents.reasoning_and_critique.self_discover.self_discover_enhanced_v4.run_self_discover_workflow(task, modules=None)¶
Run the Self-Discover workflow sequentially.