Remove Agents class#213
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes the experimental Agent class and consolidates its functionality into ChatPrompt by adding an optional memory parameter to the ChatPrompt constructor. This change aligns the Python SDK with other language implementations and reduces API surface area.
Key changes:
- Added optional
memoryparameter toChatPrompt.__init__()to enable stateful conversations - Modified
ChatPrompt.send()to use constructor-provided memory as default when no explicit memory is passed - Removed the entire
Agentclass and its module - Updated all test applications to use
ChatPromptinstead ofAgent
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ai/src/microsoft/teams/ai/chat_prompt.py | Added memory parameter to constructor and updated send() to use it as fallback |
| packages/ai/src/microsoft/teams/ai/agent.py | Deleted the entire Agent class implementation |
| packages/ai/src/microsoft/teams/ai/init.py | Removed Agent from exports |
| tests/mcp-client/src/main.py | Replaced Agent with ChatPrompt, updated variable names and comments |
| tests/mcp-client/README.md | Updated documentation to reference ChatPrompt instead of Agent |
| tests/ai-test/src/main.py | Replaced Agent with ChatPrompt in multiple handlers |
| tests/ai-test/src/handlers/memory_management.py | Replaced Agent with ChatPrompt in stateful conversation handler |
| tests/ai-test/src/handlers/function_calling.py | Replaced Agent with ChatPrompt in function calling examples |
| tests/ai-test/README.md | Updated documentation to remove Agent reference |
MehakBindra
approved these changes
Nov 18, 2025
lilyydu
added a commit
that referenced
this pull request
Nov 22, 2025
## Release 2.0.0a6 ### Changes - Make images required for Thumbnail (#216) - Revert "Add comment" - Add comment - Move tests to examples (#199) - Bump glob from 11.0.3 to 11.1.0 in /tests/tab/Web (#215) - Remove Agents class (#213) - Add signin/failure invoke activity support (#206) - Update config.yml (#214) - Adds a github template when New issues are created (#212) - feat: add OAuth support for regional bots (#209) - [feat] Add BotBuilder Plugin package, sample and tests (#190) Co-authored-by: lilydu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We had this experimental class called Agents that was basically a "stateful" ChatPrompt. To align with other languages, this class doesn't add much value, and is taking on additional support pressure. So I'm going to remove it in interest of just ChatPrompt.
ChatPrompt now supports "memory" so if you give it memory when you construct it, it'll use that memory instance for subsequent calls (which is basically what Agent did).
So TLDR: Change
AgenttoChatPromptin your code to migrate.