You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Removing KernelAgent.cs and moving its functionality into Agent.cs (#11244)
### Description
Removing `KernelAgent` to decrease the number of layers in the Agent
Framework.
- Moved functionality of `KernelAgent` to `Agent`
- Moved tests from `KernelAgentTests` to `AgentTests`
- Removed `KernelAgent` and `KernelAgentTests`
- Renamed `ChatHistoryKernelAgent` to `ChatHistoryAgent`
### Contribution Checklist
<!-- Before submitting this PR, please make sure: -->
- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
---------
Co-authored-by: Ben Thomas <[email protected]>
/// Gets the arguments for the agent instruction parameters (optional).
50
+
/// </summary>
51
+
/// <remarks>
52
+
/// Also includes <see cref="PromptExecutionSettings"/>.
53
+
/// </remarks>
54
+
publicKernelArguments?Arguments{get;init;}
55
+
56
+
/// <summary>
57
+
/// Gets the instructions for the agent (optional).
58
+
/// </summary>
59
+
publicstring?Instructions{get;init;}
60
+
61
+
/// <summary>
62
+
/// Gets the <see cref="Kernel"/> containing services, plugins, and filters for use throughout the agent lifetime.
63
+
/// </summary>
64
+
/// <value>
65
+
/// The <see cref="Kernel"/> containing services, plugins, and filters for use throughout the agent lifetime. The default value is an empty Kernel, but that can be overridden.
66
+
/// </value>
67
+
publicKernelKernel{get;init;}=new();
68
+
69
+
/// <summary>
70
+
/// Gets or sets a prompt template based on the agent instructions.
71
+
/// </summary>
72
+
protectedIPromptTemplate?Template{get;set;}
73
+
47
74
/// <summary>
48
75
/// Invoke the agent with no message assuming that all required instructions are already provided to the agent or on the thread.
49
76
/// </summary>
@@ -222,6 +249,27 @@ public abstract IAsyncEnumerable<AgentResponseItem<StreamingChatMessageContent>>
/// Formats the system instructions for the agent.
254
+
/// </summary>
255
+
/// <param name="kernel">The <see cref="Kernel"/> containing services, plugins, and other state for use by the agent.</param>
256
+
/// <param name="arguments">Optional arguments to pass to the agents's invocation, including any <see cref="PromptExecutionSettings"/>.</param>
257
+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
258
+
/// <returns>The formatted system instructions for the agent.</returns>
0 commit comments