Skip to content

Conversation

@ahgpt
Copy link
Collaborator

@ahgpt ahgpt commented Jan 9, 2026

No description provided.

@ahgpt ahgpt requested review from SzekiHou and rainsonGain January 9, 2026 07:46
@gemini-code-assist
Copy link

Summary of Changes

Hello @ahgpt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the aworld-cli by integrating a robust built-in agent system and a new plugin management framework. It introduces the 'Aworld' agent as a powerful default, capable of orchestrating agent teams, and provides a dedicated skill to guide users in creating their own Multi-Agent Systems. These changes aim to make the CLI more extensible, user-friendly, and capable of handling complex tasks through coordinated AI agents, while also improving the safety of terminal interactions and the clarity of agent outputs.

Highlights

  • Introduction of Built-in Agents and Plugin System: The aworld-cli now supports built-in agents and a new plugin management system. Built-in agents, such as the versatile 'Aworld' AI assistant, are automatically loaded from inner_plugins/*/agents directories, simplifying agent discovery and usage. A new CLI command aworld-cli plugin allows users to install, list, and remove plugins from local paths or GitHub repositories.
  • Default 'Aworld' Agent with Team Delegation Capabilities: A new 'Aworld' agent has been implemented as a versatile AI assistant. It can execute tasks directly or delegate complex tasks to specialized agent teams (TeamSwarm). This agent is now the default when running aworld-cli --task without specifying an agent, enhancing out-of-the-box functionality.
  • New 'Agent Creator' Skill: A new skill, 'agent-creator', has been added to guide users in building Multi-Agent Systems (MAS). It provides templates and best practices for creating centralized (TeamSwarm) and decentralized (Swarm) agent structures, emphasizing the use of filesystem-server tools for file generation and critical advice on Python file indentation.
  • Safe Terminal Execution Tool: A new terminal-server MCP tool has been introduced, enabling agents to execute terminal commands safely. This tool includes features like safety checks for dangerous commands, configurable timeouts, cross-platform compatibility, and LLM-friendly output formatting, significantly expanding agent capabilities while maintaining security.
  • Improved Agent Loading and UI: The agent loading mechanism has been refined to prioritize built-in agents, followed by installed plugins, and then user-configured local agents. Additionally, the CLI output for agent messages now includes the agent's name in the panel title, improving clarity in multi-agent interactions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Collaborator

@SzekiHou SzekiHou left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant new feature for aworld_cli, adding support for built-in agents and a plugin system. This is a great enhancement for extensibility. The changes include updates to agent loading logic, a new Aworld agent, a terminal server for executing commands, and documentation updates.

My review focuses on several areas. I've identified a couple of critical runtime errors in the new terminal_server.py and workspace.py files that need to be addressed. There's also a logic bug in the agent loading mechanism in local.py that could lead to incorrect behavior. Additionally, I've pointed out some areas for improvement regarding code practices, such as avoiding sys.path manipulation and removing debug statements. Overall, the changes are good, but these key issues should be fixed to ensure the stability and maintainability of the new features.

**{"metadata": {}} # Pass as additional fields
)

_color_log(f"🔧 Executing command: {command}", Color.cyan)

Choose a reason for hiding this comment

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

critical

The function _color_log is called here, but it is not defined in this file. The defined function is color_log (without the leading underscore). This will cause a NameError at runtime.

Suggested change
_color_log(f"🔧 Executing command: {command}", Color.cyan)
color_log(f"🔧 Executing command: {command}", Color.cyan)

Comment on lines +538 to +542
async def search_artifact_chunks(self, user_query: str, search_filter: dict =None, top_k: int = None)-> Any:
if search_filter is None:
search_filter = {}
result = await self.retriever.async_search(self.workspace_id, user_query, search_filter, top_k)
return result

Choose a reason for hiding this comment

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

critical

The new method search_artifact_chunks calls self.retriever.async_search. However, the retriever attribute is not defined or initialized anywhere in the WorkSpace class. This will result in an AttributeError when this method is called. You need to initialize self.retriever in the __init__ method, likely from a parameter.


from aworld.tools.human.human import HUMAN

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

Choose a reason for hiding this comment

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

high

Modifying sys.path dynamically is generally considered an anti-pattern in Python as it can lead to unpredictable import behavior and makes the project structure harder to understand and maintain. It's better to rely on Python's standard import mechanisms. Given the file structure, you should be able to use relative imports or configure your project's PYTHONPATH to include the project root. Please consider refactoring this to avoid sys.path manipulation.

Comment on lines +57 to +66
for agents_dir in self.inner_plugins_agent_dirs:
try:
self.cli.console.print(f"📦 Loading built-in agents from: {agents_dir}")
init_agents(str(agents_dir))
inner_agents = LocalAgentRegistry.list_agents()
for agent in inner_agents:
agent_info = AgentInfo.from_source(agent, source_location=str(agents_dir))
all_agents_info.append(agent_info)
except Exception as e:
self.cli.console.print(f"[dim]⚠️ Failed to load built-in agents from {agents_dir}: {e}[/dim]")

Choose a reason for hiding this comment

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

high

The agent loading logic in this loop is flawed. On each iteration, LocalAgentRegistry.list_agents() fetches all agents registered so far, not just the ones from the current agents_dir. This leads to duplicate AgentInfo objects being created and added to all_agents_info. You should modify this to only process newly loaded agents in each iteration. One way to do this is to get the set of agent names before calling init_agents, and then iterate through the agents after init_agents to find the new ones.

Comment on lines +303 to +304
# logger.warning(f"LocalAgent '{agent.name}' is already registered")
return

Choose a reason for hiding this comment

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

medium

The change from raising a ValueError to silently returning when a duplicate agent is registered is a key part of the new agent loading priority. However, silently ignoring duplicates can hide potential configuration issues where an agent is unintentionally being shadowed. It would be better to log a warning to inform the user about the duplicate registration.

Please uncomment the warning log. You'll also need to add import logging and logger = logging.getLogger(__name__) at the top of the file.

Suggested change
# logger.warning(f"LocalAgent '{agent.name}' is already registered")
return
logger.warning(f"LocalAgent '{agent.name}' is already registered, skipping.")
return

# Load custom skills from skills directory
SKILLS_DIR = cur_dir / "skills"

print(f"agent_config: {cur_dir}")

Choose a reason for hiding this comment

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

medium

This print() statement appears to be for debugging purposes. It should be removed before merging to keep the console output clean. If this information is needed for logging, consider using the logging module instead.

Comment on lines +466 to +470



logger.warning(f"⚠️ Failed to load sub-agents: {e}, creating Aworld TeamSwarm without sub-agents")
return TeamSwarm(aworld_agent)

Choose a reason for hiding this comment

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

medium

This except block contains empty lines, which can be confusing and is not ideal practice. Also, catching a broad Exception is not ideal; it's better to catch more specific exceptions if possible. Please remove the empty lines for better readability.

Suggested change
logger.warning(f"⚠️ Failed to load sub-agents: {e}, creating Aworld TeamSwarm without sub-agents")
return TeamSwarm(aworld_agent)
except Exception as e:
logger.warning(f"⚠️ Failed to load sub-agents: {e}, creating Aworld TeamSwarm without sub-agents")
return TeamSwarm(aworld_agent)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants