Skip to content

[BREAKING] Python: Add context mode to AgentExecutor#4668

Draft
TaoChenOSU wants to merge 2 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-workflow-add-context-mode-to-agent-executor
Draft

[BREAKING] Python: Add context mode to AgentExecutor#4668
TaoChenOSU wants to merge 2 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-workflow-add-context-mode-to-agent-executor

Conversation

@TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Mar 12, 2026

Motivation and Context

Closes #3688

Description

This is a breaking change because full_conversation is now a required argument in AgentExecutorResponse.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@TaoChenOSU TaoChenOSU self-assigned this Mar 12, 2026
@TaoChenOSU TaoChenOSU added python workflows Related to Workflows in agent-framework labels Mar 12, 2026
@github-actions github-actions bot changed the title Add context mode to AgentExecutor Python: Add context mode to AgentExecutor Mar 12, 2026
@TaoChenOSU TaoChenOSU changed the title Python: Add context mode to AgentExecutor [BREAKING] Python: Add context mode to AgentExecutor Mar 12, 2026
Comment on lines +72 to +73
retain_cache: A flag indicating whether the executor should retain its internal cache upon receiving new
messages. If False, the cache will be cleared before processing new messages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this here to allow the AgentExecutor to queue up messages for a future round (e.g. tool response)? This feels like something we should avoid as it causes the local and potentially remote conversation state to diverge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's for things like groupchat or handoff where the agent needs to cache responses from other agents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python workflows Related to Workflows in agent-framework

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Python: Add context_mode to control what gets sent to agents in workflows

2 participants