agentic_app.py
The agentic_app.py module is used in orchestrator-core for running the LLM enabled orchestrator.
Functionality in this class is toggled by two different environment variables:
SEARCH_ENABLED: When set toTruethe orchestrator will enable the LLM Based searchAGENT_ENABLED: When set toTruethe orchestrator will activate the Agent module of the orchestrator.
FastAPI Backend
The code for the WFO's Fast API backend is very well documented, so look through the functions used in this module here:
orchestrator.agentic_app
The main application module.
This module contains the main LLMOrchestratorCore class for the FastAPI backend and
provides the ability to run the CLI with LLM features (search and/or agent).
LLMOrchestratorCore
Bases: orchestrator.app.OrchestratorCore
Source code in orchestrator/agentic_app.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
__init__
__init__(
*args: typing.Any,
llm_settings: orchestrator.llm_settings.LLMSettings = llm_settings,
agent_model: pydantic_ai.models.openai.OpenAIChatModel | str | None = None,
**kwargs: typing.Any
) -> None
Initialize the LLMOrchestratorCore class.
This class extends OrchestratorCore with LLM features (search and agent).
It runs the search migration based on feature flags.
Parameters:
-
*args(typing.Any, default:()) –All the normal arguments passed to the
OrchestratorCoreclass. -
llm_settings(orchestrator.llm_settings.LLMSettings, default:orchestrator.agentic_app.LLMOrchestratorCore.llm_settings) –A class of settings for the LLM
-
agent_model(pydantic_ai.models.openai.OpenAIChatModel | str | None, default:None) –Override the agent model (defaults to llm_settings.AGENT_MODEL)
-
**kwargs(typing.Any, default:{}) –Additional arguments passed to the
OrchestratorCoreclass.
Returns:
-
None–None
Source code in orchestrator/agentic_app.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |