Files
agent-framework/python/packages/core/tests
T
Kartik Madan d20f9b5f97 Add AgentExecutorResponse.with_text() to preserve conversation history through custom executors (#5255)
Fixes #5246

When a custom @executor transforms agent output and sends a plain str,
the downstream AgentExecutor.from_str handler loses the full conversation
context. This adds a with_text() helper that creates a new
AgentExecutorResponse with replaced text while preserving the prior
conversation chain, so AgentExecutor.from_response is invoked instead.

- Add with_text(text) method to AgentExecutorResponse dataclass
- Add 3 regression tests in test_full_conversation.py

Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
d20f9b5f97 ยท 2026-04-16 08:39:19 +00:00
History
..