### Description
- Updating Sample 02 to expand the usage and show case how to refactor
the same process by using subprocesses as steps.
- Improving README file with more details on this sample
- Add more unit tests for Process testing/improving comments
Fixes#9836Fixes#9837
### 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: Estefania Tenorio <[email protected]>
…
### Motivation and Context
**Required:**
I would like to have a process framework with a simplified process and
steps, showing how simple, easy and straightforward it can be. I want
this example to take away the fear and reduce the cognitive load as a
"first super-easy step".
**Problem solved:**
Excessive cognitive load on the first example. There Should be a
super-easy step that is and feels easy. I believe this gets close to it
:)
**Scenario:**
Learning, taking the fear out. Helping in making it easier.
**Simplification added:**
Also to simplify it even further i added the feature that the Function
event name gets resolved when there is a single function
When declaring the process, instead of:
```
startStep
.OnEvent(StartStep.OutputEvents.Executed)
.SendEventTo(new ProcessFunctionTargetBuilder(doSomeWorkStep));
doSomeWorkStep
.OnEvent(DoSomeWorkStep.OutputEvents.Executed)
.SendEventTo(new ProcessFunctionTargetBuilder(doMoreWorkStep));
doMoreWorkStep
.OnEvent(DoMoreWorkStep.OutputEvents.Executed)
.SendEventTo(new ProcessFunctionTargetBuilder(endStep));
endStep
.OnEvent(EndStep.OutputEvents.Executed)
.StopProcess();
```
I would like to do the following:
```
startStep
.OnFunctionResult()
.SendEventTo(new ProcessFunctionTargetBuilder(doSomeWorkStep));
doSomeWorkStep
.OnFunctionResult()
.SendEventTo(new ProcessFunctionTargetBuilder(doMoreWorkStep));
doMoreWorkStep
.OnFunctionResult()
.SendEventTo(new ProcessFunctionTargetBuilder(endStep));
endStep
.OnFunctionResult()
.StopProcess();
```
So that the Function is inferred by the framework, reducing verbosity and cognitive load.
Fixes: https://github.com/microsoft/semantic-kernel/issues/9647
Fixes: https://github.com/microsoft/semantic-kernel/issues/9648
### Description
- Added example Step00 (process, steps )
- Added documentation
- Added the small refactoring on the StepProcessBuilder to support Function resolution when "there is only one"
### 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: Chris <[email protected]>
### Description
- Moving `ProcessStateMetadata` logic to factory/extension to try to
keep clean existing core components
- Adding check of step name when adding new steps/processes to process -
names must be unique so when applying saved state it propagates
properly. Currently there are issues if multiple steps have the same
name
- State versioning initial support:
- Processes with 1:1 step match previous and new version (step name
change and/or step logic change) - minor changes on process steps and
not in root process itself
Fixing #9358
#### Out of scope but will be addressed in next PRs
- Processes with N:M steps (process flow changed and potentially also
step logic changed)
- New samples showcasing how to make use of N:M mapping
### 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: Chris <[email protected]>
### Description
Adding Stateful Food Preparation Samples
- refactoring existing gatherIngredients step
- adding stateful gatherIngredients step
- adding stateful cutFoodStep with knifeSharpening to showcase state
persistance and use across functions in same step
- adding samples making use of different processes - state resets - and
the same process multiple times - last state gets reused
### 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 😄
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
Demonstrate use of agents within process framework.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
**Demonstrate patterns for:**
- Direct agent invocation
- Dynamic user interaction
- Group chat delegation (nested)
**Also addressed:**
- Fix case where `ScriptedUserInputStep` throwing exception (silent
failure)
- Updated `BaseTest` to make use of config helper when desire is to
preserve the `IKernelBuilder`
- Fixed indexing boundary condition when using
`ChatHistorySummarizationReducer`
- Fixed sequencing issue with `SequentialSelectionStrategy` when
`InitialAgent` is set
### 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 😄
### Description
- Fixing Processes Food Samples links to respective diagrams + adding
some steps specific names
- Reorganizing Process Food Samples in 2 files -> allows to build
concepts in more detail later: more samples to be added in another PR in
the near future
### 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 😄
### Description
Adding more SK Processes samples:
- Creating SK Process Event Builder: helps link process events to Steps
internal events
- Adding samples to showcase:
- reuse of steps]
- use of steps specific functions
- how to make use of step functions that output multiple events
- use of cycles: FoodRuined -> must prepare the food from scratch
For additional details check the `GettingStartedWithProcesses/README.md`
file
### 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 😄
### Motivation and Context
<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
1. Why is this change required?
2. What problem does it solve?
3. What scenario does it contribute to?
4. If it fixes an open issue, please link to the issue here.
-->
### Description
Adding New Processes Feature Sample - Create Account
This sample helps showcase the capabilities of process showing the use
of:
- cycles
- conditional outputs
- use of multiple outputs/inputs -> fan-in/fan-out behavior
- complex example that showcases a real life scenario
Adding Processes Samples README with diagrams to make it easier to
understand how the sample processes flow works
### 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]>