@@ -10,119 +10,147 @@ namespace MaIN.Core.Hub.Contexts.Interfaces.AgentContext;
1010public interface IAgentConfigurationBuilder : IAgentActions
1111{
1212 /// <summary>
13- /// Sets the system-level instruction or persona for the Agent . This prompt defines how the Agent should behave and respond .
13+ /// Sets the initial prompt for the agent . This prompt serves as an instruction or context that guides the agent's behavior during its execution .
1414 /// </summary>
15- /// <param name="prompt">The text content of the system instructions or Agent persona.</param>
15+ /// <param name="prompt"> The initial prompt or instruction for the agent.</param>
16+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
1617 IAgentConfigurationBuilder WithInitialPrompt ( string prompt ) ;
1718
1819 /// <summary>
19- /// Sets a custom unique identifier for the Agent .
20+ /// Assigns a unique identifier to the agent .
2021 /// </summary>
21- /// <param name="id">The new Agent ID.</param>
22+ /// <param name="id">he unique identifier for the agent.</param>
23+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
2224 IAgentConfigurationBuilder WithId ( string id ) ;
2325
2426 /// <summary>
25- /// Sets the Agent's execution order (relevant in multi-agent flows) .
27+ /// Sets the order of the agent. This can be used in scenarios where agents need to be prioritized or sequenced .
2628 /// </summary>
27- /// <param name="order">The sequence number.</param>
29+ /// <param name="order">The order value to assign to the agent.</param>
30+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
2831 IAgentConfigurationBuilder WithOrder ( int order ) ;
2932
3033 /// <summary>
31- /// Disables the caching mechanism for this Agent's requests.
34+ /// Each time we run inference, we need to load model into memory, this takes time and memory. This method allows us to save some
35+ /// more of GPU/RAM resources at the cost of time, because model weights are no longer cached.
3236 /// </summary>
37+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
3338 IAgentConfigurationBuilder DisableCache ( ) ;
3439
3540 /// <summary>
36- /// Defines the data source from which the Agent derives its identity or knowledge .
41+ /// Sets the source of the agent’s context, including information related to the agent's source and its type .
3742 /// </summary>
38- /// <param name="source">The implementation of the agent source.</param>
39- /// <param name="type">The type of source (e.g., PDF, Web).</param>
43+ /// <param name="source">The <see cref="IAgentSource"/> source instance providing the agent’s context.</param>
44+ /// <param name="type">The <see cref="AgentSourceType"/> - type of source (e.g., API, SQL, Web).</param>
45+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
4046 IAgentConfigurationBuilder WithSource ( IAgentSource source , AgentSourceType type ) ;
4147
4248 /// <summary>
4349 /// Sets a friendly display name for the Agent.
4450 /// </summary>
4551 /// <param name="name">The name of the Agent.</param>
52+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
4653 IAgentConfigurationBuilder WithName ( string name ) ;
4754
4855 /// <summary>
49- /// Selects a specific processing engine (Backend) for LLM requests .
56+ /// Defines backend that will be used for model inference .
5057 /// </summary>
51- /// <param name="backendType">The backend type.</param>
58+ /// <param name="backendType">The <see cref="BackendType"/> - an enum that defines which AI backend to use.</param>
59+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
5260 IAgentConfigurationBuilder WithBackend ( BackendType backendType ) ;
5361
5462 /// <summary>
5563 /// Configures integration with the Model Context Protocol (MCP).
5664 /// </summary>
57- /// <param name="mcpConfig">The MCP configuration object.</param>
65+ /// <param name="mcpConfig">The <see cref="Mcp"/> configuration object.</param>
66+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
5867 IAgentConfigurationBuilder WithMcpConfig ( Mcp mcpConfig ) ;
5968
6069 /// <summary>
61- /// Sets inference parameters such as temperature, top-p, or max tokens.
70+ /// Sets the inference parameters for the chat session, allowing you to customize how the AI processes and generates responses
71+ /// based on specific parameters. Inference parameters can influence various aspects of the chat, such as response length,
72+ /// temperature, and other model-specific settings.
6273 /// </summary>
63- /// <param name="inferenceParams">An object containing LLM technical settings.</param>
74+ /// <param name="inferenceParams">An <see cref="InferenceParams"/> object that holds the parameters for inference, such as Temperature, MaxTokens,
75+ /// TopP, etc. These parameters control the generation behavior of the agent.</param>
76+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
6477 IAgentConfigurationBuilder WithInferenceParams ( InferenceParams inferenceParams ) ;
6578
6679 /// <summary>
67- /// Configures memory and context window settings for the Agent.
80+ /// Sets the memory parameters for the chat session, allowing you to customize how the AI accesses and uses its memory
81+ /// for generating responses. Memory parameters influence aspects such as context size, memory search depth,
82+ /// and token allocation for responses.
6883 /// </summary>
69- /// <param name="memoryParams">Memory management settings.</param>
84+ /// <param name="memoryParams">A <see cref="MemoryParams"/> object that holds the parameters for memory management, such as
85+ /// ContextSize, MaxMatchesCount, AnswerTokens, etc. These parameters control how agent uses memory for response generation.</param>
86+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
7087 IAgentConfigurationBuilder WithMemoryParams ( MemoryParams memoryParams ) ;
7188
7289 /// <summary>
73- /// Defines a sequence of steps (pipeline) that the Agent must execute for each request.
90+ /// Configures the steps that the agent will follow during its interaction. Each step is a task or action that
91+ /// the agent will execute sequentially.
7492 /// </summary>
75- /// <param name="steps">A list of step names.</param>
93+ /// <param name="steps">A list of strings representing the steps the agent should follow.</param>
94+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
7695 IAgentConfigurationBuilder WithSteps ( List < string > ? steps ) ;
7796
7897 /// <summary>
7998 /// Assigns tools (functions) that the Agent can autonomously invoke.
8099 /// </summary>
81- /// <param name="toolsConfiguration">The configuration for available tools.</param>
100+ /// <param name="toolsConfiguration">The <see cref="ToolsConfiguration"/> for available tools.</param>
101+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
82102 IAgentConfigurationBuilder WithTools ( ToolsConfiguration toolsConfiguration ) ;
83103
84104 /// <summary>
85105 /// Configures the Agent's knowledge base using a configuration delegate.
86106 /// </summary>
87107 /// <param name="knowledgeConfig">A function to configure the knowledge builder.</param>
108+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
88109 IAgentConfigurationBuilder WithKnowledge ( Func < KnowledgeBuilder , KnowledgeBuilder > knowledgeConfig ) ;
89110
90111 /// <summary>
91112 /// Initializes the knowledge base using a pre-configured builder.
92113 /// </summary>
93- /// <param name="knowledge">The knowledge builder instance.</param>
114+ /// <param name="knowledge">The <see cref="KnowledgeBuilder"/> instance.</param>
115+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
94116 IAgentConfigurationBuilder WithKnowledge ( KnowledgeBuilder knowledge ) ;
95117
96118 /// <summary>
97119 /// Assigns a pre-built knowledge base object to the Agent.
98120 /// </summary>
99- /// <param name="knowledge">The knowledge instance.</param>
121+ /// <param name="knowledge">The <see cref="Knowledge"/> instance.</param>
122+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
100123 IAgentConfigurationBuilder WithKnowledge ( Knowledge knowledge ) ;
101124
102125 /// <summary>
103- /// Creates a volatile knowledge base stored only in memory (not persisted to disk) .
126+ /// Creates a volatile knowledge base stored only in memory.
104127 /// </summary>
105128 /// <param name="knowledgeConfig">A function to configure the in-memory knowledge builder.</param>
129+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
106130 IAgentConfigurationBuilder WithInMemoryKnowledge ( Func < KnowledgeBuilder , KnowledgeBuilder > knowledgeConfig ) ;
107131
108132 /// <summary>
109- /// Defines a specific personality or task (Behavior) under a unique name.
133+ /// Defines a behavior for the agent, specifying an action or task the agent should perform based on the provided name and instruction .
110134 /// </summary>
111135 /// <param name="name">The name of the behavior.</param>
112- /// <param name="instruction">The system instructions for this behavior.</param>
136+ /// <param name="instruction">The instruction associated with the behavior.</param>
137+ /// <returns>The context instance implementing <see cref="IAgentConfigurationBuilder"/> for method chaining.</returns>
113138 IAgentConfigurationBuilder WithBehaviour ( string name , string instruction ) ;
114139
115140 /// <summary>
116- /// Finalizes the build process and creates the Agent in the system synchronously .
141+ /// Synchronously creates the agent in the system.
117142 /// </summary>
118- /// <param name="flow">Indicates if the Agent is part of a larger flow.</param>
119- /// <param name="interactiveResponse">Specifies if responses should be streamed.</param>
143+ /// <param name="flow">A flag indicating whether the agent should be part of an agent flow.</param>
144+ /// <param name="interactiveResponse">A flag indicating whether the agent should generate interactive responses.</param>
145+ /// <returns>The context instance implementing <see cref="IAgentContextExecutor"/> for method chaining.</returns>
120146 IAgentContextExecutor Create ( bool flow = false , bool interactiveResponse = false ) ;
121147
122148 /// <summary>
123- /// Finalizes the build process and creates the Agent in the system asynchronously.
149+ /// Asynchronously creates the agent in the system. This method integrates the agent into the underlying agent service,
150+ /// making it ready for use.
124151 /// </summary>
125- /// <param name="flow">Indicates if the Agent is part of a larger flow.</param>
126- /// <param name="interactiveResponse">Specifies if responses should be interactive.</param>
152+ /// <param name="flow">A flag indicating whether the agent should be part of an agent flow.</param>
153+ /// <param name="interactiveResponse">A flag indicating whether the agent should generate interactive responses.</param>
154+ /// <returns>The context instance implementing <see cref="IAgentContextExecutor"/> for method chaining.</returns>
127155 Task < IAgentContextExecutor > CreateAsync ( bool flow = false , bool interactiveResponse = false ) ;
128156}
0 commit comments