Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

Merge branch 'mgx_ops' of https://gitlab.deepwisdomai.com/pub/MetaGPT into mgx_ops

stellahsrf9e61807d5c0
diff --cc examples/mgx/run_mgx.py
index f4eb31579,4a1964d59..1dc59d71a
--- a/examples/mgx/run_mgx.py
+++ b/examples/mgx/run_mgx.py
@@@ -12,7 -14,7 +12,7 @@@ requirement =
async def main(requirement: str = ""):
-- mgx = MGX(use_intent=True)
++ mgx = MGX(use_intent=True, tools=["<all>"])
await mgx.run(requirement)
diff --cc metagpt/roles/di/mgx.py
index 0fa7c77b6,0fa7c77b6..1715b9b6c
--- a/metagpt/roles/di/mgx.py
+++ b/metagpt/roles/di/mgx.py
@@@ -28,6 -28,6 +28,7 @@@ class MGX(DataInterpreter)
if self.use_intent: # add mode
user_message = Message(content=goal, role="user")
goal = await self._detect_intent(user_message)
++
logger.info(f"Goal is {goal}")
await self.planner.update_plan(goal=goal)
diff --cc metagpt/strategy/task_type.py
index d21705c16,c5453f1aa..2bc53b964
--- a/metagpt/strategy/task_type.py
+++ b/metagpt/strategy/task_type.py
@@@ -67,6 -67,7 +67,10 @@@ class TaskType(Enum)
name="email login",
desc="For logging to an email.",
)
- DEVELOP_SOFTWARE = TaskTypeDef(name="develop software", desc="Develop software.")
++ DEVELOP_SOFTWARE = TaskTypeDef(
++ name="develop software",
++ desc="SOP related to develop software such as Writes a PRD, Writes a design, Writes a project plan and Writes code to implement designed features according to the project plan",
++ )
@property
def type_name(self):
diff --cc metagpt/tools/libs/software_development.py
index f8a409878,f8a409878..a5bfdd47d
--- a/metagpt/tools/libs/software_development.py
+++ b/metagpt/tools/libs/software_development.py
@@@ -48,6 -48,6 +48,7 @@@ async def write_prd(idea: str, project_
if project_path and Path(project_path).exists():
ctx.config.project_path = Path(project_path)
ctx.config.inc = True
++
role = ProductManager(context=ctx)
msg = await role.run(with_message=Message(content=idea, cause_by=UserRequirement))
await role.run(with_message=msg)
@@@ -84,8 -84,8 +85,9 @@@ async def write_design(prd_path: str |
Path: The path to the system design files under the project directory.
Example:
++ >>> from metagpt.tools.libs.software_development import write_prd
>>> from metagpt.tools.libs.software_development import write_design
-- >>> prd_path = '/path/to/project_path/docs/prd' # Returned by `write_prd`
++ >>> prd_path = await write_prd("Create a new feature for the application")
>>> system_design_path = await write_desgin(prd_path)
>>> print(system_design_path)
'/path/to/project_path/docs/system_design/'