-
Notifications
You must be signed in to change notification settings - Fork 398
Clean up tool config and old code cleanup #145
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
Conversation
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.
Pull Request Overview
This PR cleans up configuration and outdated code by replacing inline comments with docstrings and removing unused tool-loading logic. The key changes include:
- Replacing commented documentation in tools classes with proper docstrings.
- Simplifying the agent tool configurations by removing legacy tool-loading code.
- Updating import statements and cleaning up redundant references.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/backend/kernel_tools/tech_support_tools.py | Replace inline comment with a docstring for tool definition. |
| src/backend/kernel_tools/procurement_tools.py | Replace inline comment with a docstring and adjust import ordering. |
| src/backend/kernel_tools/human_tools.py | Replace inline comment with a docstring for tool definition. |
| src/backend/kernel_tools/hr_tools.py | Replace inline comment with a docstring for tool definition. |
| src/backend/kernel_agents/*_agent.py | Update system_message assignments and clean up import paths. |
| src/backend/kernel_agents/agent_factory.py | Remove unused tool-loading logic. |
| src/backend/kernel_agents/agent_base.py | Remove legacy dead code for dynamic function creation and tool config loading. |
Comments suppressed due to low confidence (6)
src/backend/kernel_agents/tech_support_agent.py:50
- The system_message assignment concatenates a literal string 'system_message' with the intended message and ends with a trailing comma, which may result in unintended formatting (e.g. converting the message to a tuple or merging without a separator). Consider removing the prefix or adding an explicit separator so that the resulting system_message is a correctly formatted string.
system_message = ("system_message" + "You are a Tech Support agent. You can assist with technical issues, IT administration, equipment setup, and software/hardware troubleshooting. When asked to call a function, you should summarize back what was done.",)
src/backend/kernel_agents/product_agent.py:53
- The use of parentheses with a trailing comma converts the intended string into a tuple and may unintentionally merge strings; ensure the system_message is a single formatted string by removing the extraneous comma or the literal prefix if unnecessary.
system_message = ("system_message: You are a Product agent. You have knowledge about product management, development, and compliance guidelines. When asked to call a function, you should summarize back what was done.",)
src/backend/kernel_agents/procurement_agent.py:51
- The concatenation of 'system_message' with the intended message, together with the trailing comma, might produce an unintended tuple or improperly formatted string. Revise the assignment to ensure a proper string is formed.
system_message = ("system_message" + "You are an AI Agent. You are able to assist with procurement enquiries and order items. If you need additional information from the human user asking the question in order to complete a request, ask before calling a function.",)
src/backend/kernel_agents/human_agent.py:62
- The concatenation here unnecessarily prefixes the message with 'system_message: '. If this literal is not required, consider removing it or ensuring that proper concatenation (with separators and without converting to a tuple) is used.
system_message = ("system_message: " + "You are an AI Agent. You represent a human employee in our organization. You can perform day-to-day activities and collaborate with other functional agents. When someone asks you to complete a task, summarize what was done.")
src/backend/kernel_agents/hr_agent.py:51
- The system_message assignment concatenates a literal string without a clear separator, which may lead to an unintended string format. Consider removing the literal prefix or adding a separator to ensure clarity in the system_message.
system_message = ("system_message" + "You are an AI Agent. You have knowledge about HR (e.g., human resources), policies, procedures, and onboarding guidelines.")
src/backend/kernel_agents/generic_agent.py:48
- The current assignment may inadvertently form a tuple or improperly concatenate the literal prefix with the intended message. Verify that the system_message produces a single formatted string by removing the literal prefix or correcting the concatenation.
system_message = ("system_message" + "You are a generic agent. You are used to handle generic tasks that a general Large Language Model can assist with. You are being called as a fallback, when no other agents are able to use their specialized functions in order to solve the user's task. Summarize back to the user what was done.",)
| "You are an AI Agent. You have knowledge about marketing, including campaigns, market research, and promotional activities.", | ||
| ) | ||
|
|
||
| system_message = "system_message: You are an AI Agent. You have knowledge about marketing, including campaigns, market research, and promotional activities." |
Copilot
AI
Apr 30, 2025
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.
[nitpick] Consider whether the literal 'system_message:' prefix is intentional. If not, remove it or add appropriate spacing to ensure the system_message is clear and correctly formatted.
| system_message = "system_message: You are an AI Agent. You have knowledge about marketing, including campaigns, market research, and promotional activities." | |
| system_message = "You are an AI Agent. You have knowledge about marketing, including campaigns, market research, and promotional activities." |
|
Found an issue with tool calling in this one. Need to update before merging. |
Purpose
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information