fix(agent): expose human input flag on executor#6070
Conversation
|
I do not have permission to apply repository labels from this fork, but this PR is AI-assisted and should carry the required |
|
Closing this duplicate in favor of #6069, which contains the same fix with stronger validation and already has the CodeRabbit review completed. |
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAgentExecutor adds a public ChangesHuman Feedback Property on AgentExecutor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Summary
AgentExecutor.ask_for_human_inputproperty that delegates toAgentExecutorStateExecutorContext, whose human-input provider reads and writes the flag directlyFixes #6065.
Testing
uv run --package crewai --dev python -m pytest lib/crewai/tests/agents/test_agent_executor.py::TestAgentExecutor::test_ask_for_human_input_delegates_to_state lib/crewai/tests/agents/test_agent_executor.py::TestAgentExecutor::test_human_input_provider_can_update_executor_state_flag -quv run --package crewai --dev ruff check lib/crewai/src/crewai/experimental/agent_executor.py lib/crewai/tests/agents/test_agent_executor.pygit diff --checkI also ran the full
lib/crewai/tests/agents/test_agent_executor.pyfile locally; it reached76 passed, 13 failed. The failures were environment/extra dependency issues unrelated to this patch: local SOCKS proxy support missingsocksio, missingcrewai[anthropic], and missingcrewai_tools.This PR is AI-assisted and labeled
llm-generatedper the contribution guide.Summary by CodeRabbit
New Features
Tests