Files
semantic-kernel/python/samples/README.md
Tao ChenandEvan Mattson 15ca7a7192 Python: Agent get_response API (#10701)
### 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.
-->
With the recent push for improving developer's quality of life, we have
decided to make it easier for developers to get started with agents by
introducing a new `get_response` API, that hides the complexity of
interacting with agents when developers are ramping up with the Agent
concept.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add the `get_response` API on all agent types. This API skips hides
the intermediate steps of the agent execution and only returns the final
results as a single message.
2. Add tests and samples.
3. Updates the `Agent` class to be an `ABC`, and adds `get_response`,
`invoke`, and `invoke_stream` methods as overridable.

### 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: Evan Mattson <[email protected]>
2025-02-27 20:22:05 +09:00

1.6 KiB

Semantic Kernel Samples

Type Description
getting_started Take this step by step tutorial to get started with Semantic Kernel and get introduced to the key concepts.
getting_started_with_agents Take this step by step tutorial to get started with Semantic Kernel Agents and get introduced to the key concepts.
getting_started_with_processes Take this step by step tutorial to get started with Semantic Kernel Processes and get introduced to the key concepts.
concepts This section contains focused samples which illustrate all of the concepts included in Semantic Kernel.
demos Look here to find a sample which demonstrate how to use many of Semantic Kernel features.
learn_resources Code snippets that are related to online documentation sources like Microsoft Learn, DevBlogs and others