Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Bedrock agent #10307

Merged
merged 26 commits into from
Jan 31, 2025
Merged

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Jan 27, 2025

Motivation and Context

Address #10284

Integration of AWS Bedrock agent to SK Python

Description

  1. Implementation of Bedrock agent in SK (essentially an agent connector to the Bedrock agent service).
  2. A dedicated channel that works with Bedrock agents.
  3. Samples on how to use Bedrock agents.

Unit and integration tests will be included in another PR to prevent this PR from becoming too big.

Contribution Checklist

@TaoChenOSU TaoChenOSU added PR: in progress Under development and/or addressing feedback python Pull requests for the Python Semantic Kernel labels Jan 27, 2025
@TaoChenOSU TaoChenOSU self-assigned this Jan 27, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner January 27, 2025 18:31
@github-actions github-actions bot changed the title [WIP] Bedrock agent Python: [WIP] Bedrock agent Jan 27, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 27, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents
   agent.py57198%82
semantic_kernel/agents/bedrock
   action_group_utils.py28280%3–108
   bedrock_agent.py1831830%4–585
   bedrock_agent_base.py1621620%3–436
   bedrock_agent_settings.py880%3–33
semantic_kernel/agents/bedrock/models
   bedrock_action_group_model.py880%3–21
   bedrock_agent_event_type.py880%3–19
   bedrock_agent_model.py11110%3–24
   bedrock_agent_status.py12120%4–23
semantic_kernel/agents/channels
   bedrock_agent_channel.py80800%3–209
   chat_history_channel.py79297%167, 170
semantic_kernel/agents/chat_completion
   chat_completion_agent.py102793%82, 85, 94–99, 124, 189
TOTAL17596236187% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3048 4 💤 0 ❌ 0 🔥 1m 21s ⏱️

@TaoChenOSU TaoChenOSU changed the title Python: [WIP] Bedrock agent Python: Bedrock agent Jan 30, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@TaoChenOSU TaoChenOSU removed the PR: in progress Under development and/or addressing feedback label Jan 31, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jan 31, 2025
Merged via the queue into microsoft:main with commit 7789c5f Jan 31, 2025
25 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/python-bedrock-agent branch January 31, 2025 19:54
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2025
### 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.
-->
This PR adds the Bedrock Agent to the .Net SDK. It's equivalent to this
[PR](#10307) to the
Python SDK.

### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Integrate AWS Bedrock Agent to SK .Net. The integration includes the
following features:
1. Create a new Bedrock agent in code.
2. Retrieve an existing Bedrock agent in code.
3. Chat with the agent in streaming and non-streaming mode.
4. Enable code interpreter.
5. Function calling and execution.
6. Linking an AWS knowledge base.

Note: tests will be included in a separate PR.

### 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 😄
---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/microsoft/semantic-kernel/pull/10443?shareId=9bcffc75-6f2e-4ccb-864d-9b10890c22b1).

---------

Co-authored-by: Chris <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation python Pull requests for the Python Semantic Kernel
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants