-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
feat: add new agent components for context management and action routing #5319
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #5319 will degrade performances by 18.22%Comparing Summary
Benchmarks breakdown
|
…ing an error when no thought is generated
…oper state management
752e2ec
to
d77849d
Compare
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 8 changed files in this pull request and generated 2 comments.
Files not reviewed (3)
- src/backend/base/langflow/base/agents/context.py: Evaluated as low risk
- src/backend/base/langflow/components/agents/agent_context.py: Evaluated as low risk
- src/backend/base/langflow/components/agents/new_agent.py: Evaluated as low risk
Comments suppressed due to low confidence (3)
src/backend/base/langflow/components/agents/decide_action.py:39
- Ensure that action.log is a string before updating the context. Use str(action.log) to convert if necessary.
self.agent_context.update_context("Action", action.log)
src/backend/base/langflow/components/agents/execute_action.py:30
- [nitpick] The error message could be more descriptive. Consider including the action tool name and input in the message.
error_msg = f"Error: Action '{action}' not found in available tools."
src/backend/base/langflow/components/agents/agent_action_router.py:45
- [nitpick] The context message 'Router Decision' could be more specific to differentiate between different routing decisions.
self.agent_context.update_context("Router Decision", context_message)
src/backend/base/langflow/components/agents/agent_action_router.py
Outdated
Show resolved
Hide resolved
…ute independence" This reverts commit 5d0f143.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rity - Updated error handling to provide a more descriptive message when an action is not found in available tools. - The error message now includes the action name directly, enhancing the context for debugging and user feedback.
… and output structure
…ncy and enhancing context management
…and action handling
…on in LangflowAgent
…ng and final answer generation
This pull request introduces several improvements and new features to the agent components. Key changes include correcting the output model instantiation in
LangflowAgent
, handling invalid LLM responses inGenerateThoughtComponent
, and updating action logging inDecideActionComponent
. Additionally, the initial context is now included in the full context output. New components for context management and action routing have been implemented, enhancing the overall functionality and robustness of the agent system.