🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
move stanford_town folder
better629186d61721b06
diff --git a/examples/stanford_town/.gitignore b/examples/stanford_town/.gitignoredeleted file mode 100644index fe77153f9..000000000--- a/examples/stanford_town/.gitignore+++ /dev/null@@ -1,2 +0,0 @@-storage/test*-storage/unittest*\ No newline at end of filediff --git a/examples/stanford_town/run_st_game.py b/examples/stanford_town/run_st_game.pyindex 4c3b3bb0e..732ae5efc 100644--- a/examples/stanford_town/run_st_game.py+++ b/examples/stanford_town/run_st_game.py@@ -7,15 +7,15 @@ from typing import Optionalimport fire-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.stanford_town import StanfordTown-from examples.stanford_town.utils.const import STORAGE_PATH-from examples.stanford_town.utils.mg_ga_transform import (+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.stanford_town import StanfordTown+from metagpt.ext.stanford_town.utils.const import STORAGE_PATH+from metagpt.ext.stanford_town.utils.mg_ga_transform import (get_reverie_meta,write_curr_sim_code,write_curr_step,)-from examples.stanford_town.utils.utils import copy_folder+from metagpt.ext.stanford_town.utils.utils import copy_folderfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/storage/.gitignore b/examples/stanford_town/storage/.gitignoreindex 72b125e04..962820861 100644--- a/examples/stanford_town/storage/.gitignore+++ b/examples/stanford_town/storage/.gitignore@@ -1,3 +1,4 @@# path to store simulation datatest_*+unittest*July*\ No newline at end of filediff --git a/examples/stanford_town/tests/__init__.py b/examples/stanford_town/tests/__init__.pydeleted file mode 100644index e69de29bb..000000000diff --git a/examples/stanford_town/utils/const.py b/examples/stanford_town/utils/const.pydeleted file mode 100644index 38e80f103..000000000--- a/examples/stanford_town/utils/const.py+++ /dev/null@@ -1,13 +0,0 @@-#!/usr/bin/env python-# -*- coding: utf-8 -*--# @Desc :--from pathlib import Path--ROOT_PATH = Path(__file__).parent.parent-STORAGE_PATH = ROOT_PATH.joinpath("storage")-TEMP_STORAGE_PATH = ROOT_PATH.joinpath("temp_storage")-MAZE_ASSET_PATH = ROOT_PATH.joinpath("static_dirs/assets/the_ville")-PROMPTS_DIR = ROOT_PATH.joinpath("prompts")--collision_block_id = "32125"diff --git a/examples/stanford_town/actions/__init__.py b/metagpt/ext/__init__.pysimilarity index 100%rename from examples/stanford_town/actions/__init__.pyrename to metagpt/ext/__init__.pydiff --git a/examples/stanford_town/README.md b/metagpt/ext/stanford_town/README.mdsimilarity index 100%rename from examples/stanford_town/README.mdrename to metagpt/ext/stanford_town/README.mddiff --git a/examples/stanford_town/README_CN.md b/metagpt/ext/stanford_town/README_CN.mdsimilarity index 100%rename from examples/stanford_town/README_CN.mdrename to metagpt/ext/stanford_town/README_CN.mddiff --git a/metagpt/ext/stanford_town/__init__.py b/metagpt/ext/stanford_town/__init__.pynew file mode 100644index 000000000..56ea35c9f--- /dev/null+++ b/metagpt/ext/stanford_town/__init__.py@@ -0,0 +1,3 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc : stanford town implementdiff --git a/examples/stanford_town/plan/__init__.py b/metagpt/ext/stanford_town/actions/__init__.pysimilarity index 100%rename from examples/stanford_town/plan/__init__.pyrename to metagpt/ext/stanford_town/actions/__init__.pydiff --git a/examples/stanford_town/actions/agent_chat_sum_rel.py b/metagpt/ext/stanford_town/actions/agent_chat_sum_rel.pysimilarity index 95%rename from examples/stanford_town/actions/agent_chat_sum_rel.pyrename to metagpt/ext/stanford_town/actions/agent_chat_sum_rel.pyindex 3e564a60c..98d370bb0 100644--- a/examples/stanford_town/actions/agent_chat_sum_rel.py+++ b/metagpt/ext/stanford_town/actions/agent_chat_sum_rel.py@@ -2,7 +2,7 @@# -*- coding: utf-8 -*-# @Desc : summarize relationship in a agent chat-from examples.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/decide_to_talk.py b/metagpt/ext/stanford_town/actions/decide_to_talk.pysimilarity index 98%rename from examples/stanford_town/actions/decide_to_talk.pyrename to metagpt/ext/stanford_town/actions/decide_to_talk.pyindex 414ee7e36..a393f31af 100644--- a/examples/stanford_town/actions/decide_to_talk.py+++ b/metagpt/ext/stanford_town/actions/decide_to_talk.py@@ -2,7 +2,7 @@# -*- coding: utf-8 -*-# @Desc : device to talk to another role, return yes or no-from examples.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/dummy_action.py b/metagpt/ext/stanford_town/actions/dummy_action.pysimilarity index 100%rename from examples/stanford_town/actions/dummy_action.pyrename to metagpt/ext/stanford_town/actions/dummy_action.pydiff --git a/examples/stanford_town/actions/gen_action_details.py b/metagpt/ext/stanford_town/actions/gen_action_details.pysimilarity index 99%rename from examples/stanford_town/actions/gen_action_details.pyrename to metagpt/ext/stanford_town/actions/gen_action_details.pyindex 0eb7cb701..3820ddc5b 100644--- a/examples/stanford_town/actions/gen_action_details.py+++ b/metagpt/ext/stanford_town/actions/gen_action_details.py@@ -5,10 +5,9 @@import randomfrom metagpt.environment.stanford_town.env_space import EnvObsParams, EnvObsType+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import logger-from .st_action import STAction-class GenActionSector(STAction):name: str = "GenActionSector"diff --git a/examples/stanford_town/actions/gen_daily_schedule.py b/metagpt/ext/stanford_town/actions/gen_daily_schedule.pysimilarity index 97%rename from examples/stanford_town/actions/gen_daily_schedule.pyrename to metagpt/ext/stanford_town/actions/gen_daily_schedule.pyindex 6deb6e6eb..5dffa8995 100644--- a/examples/stanford_town/actions/gen_daily_schedule.py+++ b/metagpt/ext/stanford_town/actions/gen_daily_schedule.py@@ -3,10 +3,9 @@# @Desc : gen_daily_schedule+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import logger-from .st_action import STAction-class GenDailySchedule(STAction):name: str = "GenDailySchedule"diff --git a/examples/stanford_town/actions/gen_hourly_schedule.py b/metagpt/ext/stanford_town/actions/gen_hourly_schedule.pysimilarity index 100%rename from examples/stanford_town/actions/gen_hourly_schedule.pyrename to metagpt/ext/stanford_town/actions/gen_hourly_schedule.pydiff --git a/examples/stanford_town/actions/gen_iter_chat_utt.py b/metagpt/ext/stanford_town/actions/gen_iter_chat_utt.pysimilarity index 97%rename from examples/stanford_town/actions/gen_iter_chat_utt.pyrename to metagpt/ext/stanford_town/actions/gen_iter_chat_utt.pyindex 82104b6ca..41460afba 100644--- a/examples/stanford_town/actions/gen_iter_chat_utt.py+++ b/metagpt/ext/stanford_town/actions/gen_iter_chat_utt.py@@ -2,9 +2,9 @@# -*- coding: utf-8 -*-# @Desc : generate_iterative_chat_utt-from examples.stanford_town.actions.st_action import STAction-from examples.stanford_town.utils.utils import extract_first_json_dictfrom metagpt.environment.stanford_town.env_space import EnvObsParams, EnvObsType+from metagpt.ext.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.utils.utils import extract_first_json_dictfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/inner_voice_action.py b/metagpt/ext/stanford_town/actions/inner_voice_action.pysimilarity index 89%rename from examples/stanford_town/actions/inner_voice_action.pyrename to metagpt/ext/stanford_town/actions/inner_voice_action.pyindex 121f1dcee..83cfa037b 100644--- a/examples/stanford_town/actions/inner_voice_action.py+++ b/metagpt/ext/stanford_town/actions/inner_voice_action.py@@ -1,4 +1,8 @@-from examples.stanford_town.actions.st_action import STAction+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc :++from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/new_decomp_schedule.py b/metagpt/ext/stanford_town/actions/new_decomp_schedule.pysimilarity index 98%rename from examples/stanford_town/actions/new_decomp_schedule.pyrename to metagpt/ext/stanford_town/actions/new_decomp_schedule.pyindex c7078be9c..759ec170f 100644--- a/examples/stanford_town/actions/new_decomp_schedule.py+++ b/metagpt/ext/stanford_town/actions/new_decomp_schedule.py@@ -4,7 +4,7 @@import datetime-from examples.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/run_reflect_action.py b/metagpt/ext/stanford_town/actions/run_reflect_action.pysimilarity index 99%rename from examples/stanford_town/actions/run_reflect_action.pyrename to metagpt/ext/stanford_town/actions/run_reflect_action.pyindex 055c03db4..895f6828f 100644--- a/examples/stanford_town/actions/run_reflect_action.py+++ b/metagpt/ext/stanford_town/actions/run_reflect_action.py@@ -4,7 +4,7 @@import re-from examples.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/st_action.py b/metagpt/ext/stanford_town/actions/st_action.pysimilarity index 98%rename from examples/stanford_town/actions/st_action.pyrename to metagpt/ext/stanford_town/actions/st_action.pyindex 72ef851e0..321676374 100644--- a/examples/stanford_town/actions/st_action.py+++ b/metagpt/ext/stanford_town/actions/st_action.py@@ -7,9 +7,9 @@ from abc import abstractmethodfrom pathlib import Pathfrom typing import Any, Optional, Union-from examples.stanford_town.utils.const import PROMPTS_DIRfrom metagpt.actions.action import Actionfrom metagpt.config2 import config+from metagpt.ext.stanford_town.utils.const import PROMPTS_DIRfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/summarize_conv.py b/metagpt/ext/stanford_town/actions/summarize_conv.pysimilarity index 96%rename from examples/stanford_town/actions/summarize_conv.pyrename to metagpt/ext/stanford_town/actions/summarize_conv.pyindex f01fb36ad..5be5fcaa4 100644--- a/examples/stanford_town/actions/summarize_conv.py+++ b/metagpt/ext/stanford_town/actions/summarize_conv.py@@ -2,7 +2,7 @@# -*- coding: utf-8 -*-# @Desc : summarize the content of agents' conversation-from examples.stanford_town.actions.st_action import STAction+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/actions/task_decomp.py b/metagpt/ext/stanford_town/actions/task_decomp.pysimilarity index 99%rename from examples/stanford_town/actions/task_decomp.pyrename to metagpt/ext/stanford_town/actions/task_decomp.pyindex d9d5ec9fa..a4e22c24d 100644--- a/examples/stanford_town/actions/task_decomp.py+++ b/metagpt/ext/stanford_town/actions/task_decomp.py@@ -4,10 +4,9 @@import datetime+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import logger-from ..actions.st_action import STAction-class TaskDecomp(STAction):name: str = "TaskDecomp"diff --git a/examples/stanford_town/actions/wake_up.py b/metagpt/ext/stanford_town/actions/wake_up.pysimilarity index 95%rename from examples/stanford_town/actions/wake_up.pyrename to metagpt/ext/stanford_town/actions/wake_up.pyindex d39115854..ea44cd3a4 100644--- a/examples/stanford_town/actions/wake_up.py+++ b/metagpt/ext/stanford_town/actions/wake_up.py@@ -3,10 +3,9 @@# @Desc : wake_up+from metagpt.ext.stanford_town.actions.st_action import STActionfrom metagpt.logs import logger-from ..actions.st_action import STAction-class WakeUp(STAction):name: str = "WakeUp"diff --git a/examples/stanford_town/memory/__init__.py b/metagpt/ext/stanford_town/memory/__init__.pysimilarity index 100%rename from examples/stanford_town/memory/__init__.pyrename to metagpt/ext/stanford_town/memory/__init__.pydiff --git a/examples/stanford_town/memory/agent_memory.py b/metagpt/ext/stanford_town/memory/agent_memory.pysimilarity index 100%rename from examples/stanford_town/memory/agent_memory.pyrename to metagpt/ext/stanford_town/memory/agent_memory.pydiff --git a/examples/stanford_town/memory/retrieve.py b/metagpt/ext/stanford_town/memory/retrieve.pysimilarity index 97%rename from examples/stanford_town/memory/retrieve.pyrename to metagpt/ext/stanford_town/memory/retrieve.pyindex db3a87bea..c4b32f965 100644--- a/examples/stanford_town/memory/retrieve.py+++ b/metagpt/ext/stanford_town/memory/retrieve.py@@ -7,8 +7,8 @@ import datetimefrom numpy import dotfrom numpy.linalg import norm-from examples.stanford_town.memory.agent_memory import BasicMemory-from examples.stanford_town.utils.utils import get_embedding+from metagpt.ext.stanford_town.memory.agent_memory import BasicMemory+from metagpt.ext.stanford_town.utils.utils import get_embeddingdef agent_retrieve(diff --git a/examples/stanford_town/memory/scratch.py b/metagpt/ext/stanford_town/memory/scratch.pysimilarity index 100%rename from examples/stanford_town/memory/scratch.pyrename to metagpt/ext/stanford_town/memory/scratch.pydiff --git a/examples/stanford_town/memory/spatial_memory.py b/metagpt/ext/stanford_town/memory/spatial_memory.pysimilarity index 100%rename from examples/stanford_town/memory/spatial_memory.pyrename to metagpt/ext/stanford_town/memory/spatial_memory.pydiff --git a/examples/stanford_town/roles/__init__.py b/metagpt/ext/stanford_town/plan/__init__.pysimilarity index 100%rename from examples/stanford_town/roles/__init__.pyrename to metagpt/ext/stanford_town/plan/__init__.pydiff --git a/examples/stanford_town/plan/converse.py b/metagpt/ext/stanford_town/plan/converse.pysimilarity index 94%rename from examples/stanford_town/plan/converse.pyrename to metagpt/ext/stanford_town/plan/converse.pyindex b0ff54b68..8eefbc9b4 100644--- a/examples/stanford_town/plan/converse.py+++ b/metagpt/ext/stanford_town/plan/converse.py@@ -4,9 +4,9 @@from typing import Tuple-from examples.stanford_town.actions.agent_chat_sum_rel import AgentChatSumRel-from examples.stanford_town.actions.gen_iter_chat_utt import GenIterChatUTT-from examples.stanford_town.memory.retrieve import new_agent_retrieve+from metagpt.ext.stanford_town.actions.agent_chat_sum_rel import AgentChatSumRel+from metagpt.ext.stanford_town.actions.gen_iter_chat_utt import GenIterChatUTT+from metagpt.ext.stanford_town.memory.retrieve import new_agent_retrievefrom metagpt.logs import loggerdiff --git a/examples/stanford_town/plan/st_plan.py b/metagpt/ext/stanford_town/plan/st_plan.pysimilarity index 97%rename from examples/stanford_town/plan/st_plan.pyrename to metagpt/ext/stanford_town/plan/st_plan.pyindex 080d87de1..6b6323b7a 100644--- a/examples/stanford_town/plan/st_plan.py+++ b/metagpt/ext/stanford_town/plan/st_plan.py@@ -7,21 +7,20 @@ import mathimport randomfrom typing import Tuple, Union+from metagpt.ext.stanford_town.actions.decide_to_talk import DecideToTalk+from metagpt.ext.stanford_town.actions.gen_action_details import GenActionDetails+from metagpt.ext.stanford_town.actions.gen_daily_schedule import GenDailySchedule+from metagpt.ext.stanford_town.actions.gen_hourly_schedule import GenHourlySchedule+from metagpt.ext.stanford_town.actions.new_decomp_schedule import NewDecompSchedule+from metagpt.ext.stanford_town.actions.summarize_conv import SummarizeConv+from metagpt.ext.stanford_town.actions.task_decomp import TaskDecomp+from metagpt.ext.stanford_town.actions.wake_up import WakeUp+from metagpt.ext.stanford_town.memory.retrieve import new_agent_retrieve+from metagpt.ext.stanford_town.plan.converse import agent_conversation+from metagpt.ext.stanford_town.utils.utils import get_embeddingfrom metagpt.llm import LLMfrom metagpt.logs import logger-from ..actions.decide_to_talk import DecideToTalk-from ..actions.gen_action_details import GenActionDetails-from ..actions.gen_daily_schedule import GenDailySchedule-from ..actions.gen_hourly_schedule import GenHourlySchedule-from ..actions.new_decomp_schedule import NewDecompSchedule-from ..actions.summarize_conv import SummarizeConv-from ..actions.task_decomp import TaskDecomp-from ..actions.wake_up import WakeUp-from ..memory.retrieve import new_agent_retrieve-from ..plan.converse import agent_conversation-from ..utils.utils import get_embedding-async def plan(role: "STRole", roles: dict["STRole"], new_day: bool, retrieved: dict) -> str:# PART 1: Generate the hourly schedule.diff --git a/metagpt/ext/stanford_town/prompts/__init__.py b/metagpt/ext/stanford_town/prompts/__init__.pynew file mode 100644index 000000000..2af51b8dc--- /dev/null+++ b/metagpt/ext/stanford_town/prompts/__init__.py@@ -0,0 +1,3 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc : stanford town prompt templatesdiff --git a/examples/stanford_town/prompts/action_location_object_vMar11.txt b/metagpt/ext/stanford_town/prompts/action_location_object_vMar11.txtsimilarity index 100%rename from examples/stanford_town/prompts/action_location_object_vMar11.txtrename to metagpt/ext/stanford_town/prompts/action_location_object_vMar11.txtdiff --git a/examples/stanford_town/prompts/action_location_sector_v1.txt b/metagpt/ext/stanford_town/prompts/action_location_sector_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/action_location_sector_v1.txtrename to metagpt/ext/stanford_town/prompts/action_location_sector_v1.txtdiff --git a/examples/stanford_town/prompts/action_object_v2.txt b/metagpt/ext/stanford_town/prompts/action_object_v2.txtsimilarity index 100%rename from examples/stanford_town/prompts/action_object_v2.txtrename to metagpt/ext/stanford_town/prompts/action_object_v2.txtdiff --git a/examples/stanford_town/prompts/daily_planning_v6.txt b/metagpt/ext/stanford_town/prompts/daily_planning_v6.txtsimilarity index 100%rename from examples/stanford_town/prompts/daily_planning_v6.txtrename to metagpt/ext/stanford_town/prompts/daily_planning_v6.txtdiff --git a/examples/stanford_town/prompts/decide_to_talk_v2.txt b/metagpt/ext/stanford_town/prompts/decide_to_talk_v2.txtsimilarity index 100%rename from examples/stanford_town/prompts/decide_to_talk_v2.txtrename to metagpt/ext/stanford_town/prompts/decide_to_talk_v2.txtdiff --git a/examples/stanford_town/prompts/generate_event_triple_v1.txt b/metagpt/ext/stanford_town/prompts/generate_event_triple_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/generate_event_triple_v1.txtrename to metagpt/ext/stanford_town/prompts/generate_event_triple_v1.txtdiff --git a/examples/stanford_town/prompts/generate_focal_pt_v1.txt b/metagpt/ext/stanford_town/prompts/generate_focal_pt_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/generate_focal_pt_v1.txtrename to metagpt/ext/stanford_town/prompts/generate_focal_pt_v1.txtdiff --git a/examples/stanford_town/prompts/generate_hourly_schedule_v2.txt b/metagpt/ext/stanford_town/prompts/generate_hourly_schedule_v2.txtsimilarity index 100%rename from examples/stanford_town/prompts/generate_hourly_schedule_v2.txtrename to metagpt/ext/stanford_town/prompts/generate_hourly_schedule_v2.txtdiff --git a/examples/stanford_town/prompts/generate_obj_event_v1.txt b/metagpt/ext/stanford_town/prompts/generate_obj_event_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/generate_obj_event_v1.txtrename to metagpt/ext/stanford_town/prompts/generate_obj_event_v1.txtdiff --git a/examples/stanford_town/prompts/generate_pronunciatio_v1.txt b/metagpt/ext/stanford_town/prompts/generate_pronunciatio_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/generate_pronunciatio_v1.txtrename to metagpt/ext/stanford_town/prompts/generate_pronunciatio_v1.txtdiff --git a/examples/stanford_town/prompts/insight_and_evidence_v1.txt b/metagpt/ext/stanford_town/prompts/insight_and_evidence_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/insight_and_evidence_v1.txtrename to metagpt/ext/stanford_town/prompts/insight_and_evidence_v1.txtdiff --git a/examples/stanford_town/prompts/iterative_convo_v1.txt b/metagpt/ext/stanford_town/prompts/iterative_convo_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/iterative_convo_v1.txtrename to metagpt/ext/stanford_town/prompts/iterative_convo_v1.txtdiff --git a/examples/stanford_town/prompts/memo_on_convo_v1.txt b/metagpt/ext/stanford_town/prompts/memo_on_convo_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/memo_on_convo_v1.txtrename to metagpt/ext/stanford_town/prompts/memo_on_convo_v1.txtdiff --git a/examples/stanford_town/prompts/new_decomp_schedule_v1.txt b/metagpt/ext/stanford_town/prompts/new_decomp_schedule_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/new_decomp_schedule_v1.txtrename to metagpt/ext/stanford_town/prompts/new_decomp_schedule_v1.txtdiff --git a/examples/stanford_town/prompts/planning_thought_on_convo_v1.txt b/metagpt/ext/stanford_town/prompts/planning_thought_on_convo_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/planning_thought_on_convo_v1.txtrename to metagpt/ext/stanford_town/prompts/planning_thought_on_convo_v1.txtdiff --git a/examples/stanford_town/prompts/poignancy_action_v1.txt b/metagpt/ext/stanford_town/prompts/poignancy_action_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/poignancy_action_v1.txtrename to metagpt/ext/stanford_town/prompts/poignancy_action_v1.txtdiff --git a/examples/stanford_town/prompts/poignancy_chat_v1.txt b/metagpt/ext/stanford_town/prompts/poignancy_chat_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/poignancy_chat_v1.txtrename to metagpt/ext/stanford_town/prompts/poignancy_chat_v1.txtdiff --git a/examples/stanford_town/prompts/poignancy_event_v1.txt b/metagpt/ext/stanford_town/prompts/poignancy_event_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/poignancy_event_v1.txtrename to metagpt/ext/stanford_town/prompts/poignancy_event_v1.txtdiff --git a/examples/stanford_town/prompts/poignancy_thought_v1.txt b/metagpt/ext/stanford_town/prompts/poignancy_thought_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/poignancy_thought_v1.txtrename to metagpt/ext/stanford_town/prompts/poignancy_thought_v1.txtdiff --git a/examples/stanford_town/prompts/summarize_chat_relationship_v2.txt b/metagpt/ext/stanford_town/prompts/summarize_chat_relationship_v2.txtsimilarity index 100%rename from examples/stanford_town/prompts/summarize_chat_relationship_v2.txtrename to metagpt/ext/stanford_town/prompts/summarize_chat_relationship_v2.txtdiff --git a/examples/stanford_town/prompts/summarize_conversation_v1.txt b/metagpt/ext/stanford_town/prompts/summarize_conversation_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/summarize_conversation_v1.txtrename to metagpt/ext/stanford_town/prompts/summarize_conversation_v1.txtdiff --git a/examples/stanford_town/prompts/task_decomp_v3.txt b/metagpt/ext/stanford_town/prompts/task_decomp_v3.txtsimilarity index 100%rename from examples/stanford_town/prompts/task_decomp_v3.txtrename to metagpt/ext/stanford_town/prompts/task_decomp_v3.txtdiff --git a/examples/stanford_town/prompts/wake_up_hour_v1.txt b/metagpt/ext/stanford_town/prompts/wake_up_hour_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/wake_up_hour_v1.txtrename to metagpt/ext/stanford_town/prompts/wake_up_hour_v1.txtdiff --git a/examples/stanford_town/prompts/whisper_inner_thought_v1.txt b/metagpt/ext/stanford_town/prompts/whisper_inner_thought_v1.txtsimilarity index 100%rename from examples/stanford_town/prompts/whisper_inner_thought_v1.txtrename to metagpt/ext/stanford_town/prompts/whisper_inner_thought_v1.txtdiff --git a/examples/stanford_town/reflect/__init__.py b/metagpt/ext/stanford_town/reflect/__init__.pysimilarity index 100%rename from examples/stanford_town/reflect/__init__.pyrename to metagpt/ext/stanford_town/reflect/__init__.pydiff --git a/examples/stanford_town/reflect/reflect.py b/metagpt/ext/stanford_town/reflect/reflect.pysimilarity index 97%rename from examples/stanford_town/reflect/reflect.pyrename to metagpt/ext/stanford_town/reflect/reflect.pyindex beec53dc2..954cbc1ac 100644--- a/examples/stanford_town/reflect/reflect.py+++ b/metagpt/ext/stanford_town/reflect/reflect.py@@ -5,7 +5,7 @@import datetimeimport time-from examples.stanford_town.actions.run_reflect_action import (+from metagpt.ext.stanford_town.actions.run_reflect_action import (AgentChatPoignancy,AgentEventPoignancy,AgentEventTriple,@@ -14,8 +14,8 @@ from examples.stanford_town.actions.run_reflect_action import (AgentMemoryOnConvo,AgentPlanThoughtOnConvo,)-from examples.stanford_town.memory.retrieve import new_agent_retrieve-from examples.stanford_town.utils.utils import get_embedding+from metagpt.ext.stanford_town.memory.retrieve import new_agent_retrieve+from metagpt.ext.stanford_town.utils.utils import get_embeddingfrom metagpt.logs import loggerdiff --git a/examples/stanford_town/tests/actions/__init__.py b/metagpt/ext/stanford_town/roles/__init__.pysimilarity index 100%rename from examples/stanford_town/tests/actions/__init__.pyrename to metagpt/ext/stanford_town/roles/__init__.pydiff --git a/examples/stanford_town/roles/st_role.py b/metagpt/ext/stanford_town/roles/st_role.pysimilarity index 96%rename from examples/stanford_town/roles/st_role.pyrename to metagpt/ext/stanford_town/roles/st_role.pyindex 414fd40b8..79f58b07d 100644--- a/examples/stanford_town/roles/st_role.py+++ b/metagpt/ext/stanford_town/roles/st_role.py@@ -20,21 +20,6 @@ from typing import TYPE_CHECKING, Optionalfrom pydantic import ConfigDict, Field, field_validator, model_validator-from examples.stanford_town.actions.dummy_action import DummyAction, DummyMessage-from examples.stanford_town.actions.inner_voice_action import AgentWhisperThoughtAction-from examples.stanford_town.actions.run_reflect_action import AgentEventTriple-from examples.stanford_town.memory.agent_memory import AgentMemory, BasicMemory-from examples.stanford_town.memory.scratch import Scratch-from examples.stanford_town.memory.spatial_memory import MemoryTree-from examples.stanford_town.plan.st_plan import plan-from examples.stanford_town.reflect.reflect import generate_poig_score, role_reflect-from examples.stanford_town.utils.const import STORAGE_PATH, collision_block_id-from examples.stanford_town.utils.mg_ga_transform import (- get_role_environment,- save_environment,- save_movement,-)-from examples.stanford_town.utils.utils import get_embedding, path_finderfrom metagpt.actions.add_requirement import UserRequirementfrom metagpt.environment.stanford_town.env_space import (EnvAction,@@ -42,6 +27,23 @@ from metagpt.environment.stanford_town.env_space import (EnvObsParams,EnvObsType,)+from metagpt.ext.stanford_town.actions.dummy_action import DummyAction, DummyMessage+from metagpt.ext.stanford_town.actions.inner_voice_action import (+ AgentWhisperThoughtAction,+)+from metagpt.ext.stanford_town.actions.run_reflect_action import AgentEventTriple+from metagpt.ext.stanford_town.memory.agent_memory import AgentMemory, BasicMemory+from metagpt.ext.stanford_town.memory.scratch import Scratch+from metagpt.ext.stanford_town.memory.spatial_memory import MemoryTree+from metagpt.ext.stanford_town.plan.st_plan import plan+from metagpt.ext.stanford_town.reflect.reflect import generate_poig_score, role_reflect+from metagpt.ext.stanford_town.utils.const import STORAGE_PATH, collision_block_id+from metagpt.ext.stanford_town.utils.mg_ga_transform import (+ get_role_environment,+ save_environment,+ save_movement,+)+from metagpt.ext.stanford_town.utils.utils import get_embedding, path_finderfrom metagpt.logs import loggerfrom metagpt.roles.role import Role, RoleContextfrom metagpt.schema import Messagediff --git a/examples/stanford_town/stanford_town.py b/metagpt/ext/stanford_town/stanford_town.pysimilarity index 91%rename from examples/stanford_town/stanford_town.pyrename to metagpt/ext/stanford_town/stanford_town.pyindex 17364f7c8..96f6a4b4e 100644--- a/examples/stanford_town/stanford_town.py+++ b/metagpt/ext/stanford_town/stanford_town.py@@ -4,10 +4,10 @@from typing import Any, Optional-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.utils.const import MAZE_ASSET_PATHfrom metagpt.context import Contextfrom metagpt.environment import StanfordTownEnv+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.utils.const import MAZE_ASSET_PATHfrom metagpt.logs import loggerfrom metagpt.team import Teamdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/agent_history_init_n25.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/agent_history_init_n25.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/agent_history_init_n25.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/agent_history_init_n25.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/agent_history_init_n3.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/agent_history_init_n3.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/agent_history_init_n3.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/agent_history_init_n3.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/arena_maze.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/arena_maze.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/arena_maze.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/arena_maze.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/collision_maze.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/collision_maze.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/collision_maze.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/collision_maze.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/game_object_maze.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/game_object_maze.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/game_object_maze.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/game_object_maze.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/sector_maze.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/sector_maze.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/sector_maze.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/sector_maze.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/spawning_location_maze.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/spawning_location_maze.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze/spawning_location_maze.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze/spawning_location_maze.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/maze_meta_info.json b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze_meta_info.jsonsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/maze_meta_info.jsonrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/maze_meta_info.jsondiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/arena_blocks.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/arena_blocks.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/arena_blocks.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/arena_blocks.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/game_object_blocks.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/game_object_blocks.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/game_object_blocks.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/game_object_blocks.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/sector_blocks.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/sector_blocks.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/sector_blocks.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/sector_blocks.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/spawning_location_blocks.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/spawning_location_blocks.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/spawning_location_blocks.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/spawning_location_blocks.csvdiff --git a/examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/world_blocks.csv b/metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/world_blocks.csvsimilarity index 100%rename from examples/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/world_blocks.csvrename to metagpt/ext/stanford_town/static_dirs/assets/the_ville/matrix/special_blocks/world_blocks.csvdiff --git a/examples/stanford_town/tests/plan/__init__.py b/metagpt/ext/stanford_town/utils/__init__.pysimilarity index 100%rename from examples/stanford_town/tests/plan/__init__.pyrename to metagpt/ext/stanford_town/utils/__init__.pydiff --git a/metagpt/ext/stanford_town/utils/const.py b/metagpt/ext/stanford_town/utils/const.pynew file mode 100644index 000000000..7a5c6fd24--- /dev/null+++ b/metagpt/ext/stanford_town/utils/const.py@@ -0,0 +1,15 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc :++from pathlib import Path++from metagpt.const import EXAMPLE_PATH++ST_ROOT_PATH = Path(__file__).parent.parent+STORAGE_PATH = EXAMPLE_PATH.joinpath("stanford_town/storage")+TEMP_STORAGE_PATH = EXAMPLE_PATH.joinpath("stanford_town/temp_storage")+MAZE_ASSET_PATH = ST_ROOT_PATH.joinpath("static_dirs/assets/the_ville")+PROMPTS_DIR = ST_ROOT_PATH.joinpath("prompts")++collision_block_id = "32125"diff --git a/examples/stanford_town/utils/mg_ga_transform.py b/metagpt/ext/stanford_town/utils/mg_ga_transform.pysimilarity index 96%rename from examples/stanford_town/utils/mg_ga_transform.pyrename to metagpt/ext/stanford_town/utils/mg_ga_transform.pyindex 521199a05..e0de76a6b 100644--- a/examples/stanford_town/utils/mg_ga_transform.py+++ b/metagpt/ext/stanford_town/utils/mg_ga_transform.py@@ -5,7 +5,7 @@from pathlib import Pathfrom typing import Optional-from examples.stanford_town.utils.const import STORAGE_PATH, TEMP_STORAGE_PATH+from metagpt.ext.stanford_town.utils.const import STORAGE_PATH, TEMP_STORAGE_PATHfrom metagpt.logs import loggerfrom metagpt.utils.common import read_json_file, write_json_filediff --git a/examples/stanford_town/utils/utils.py b/metagpt/ext/stanford_town/utils/utils.pysimilarity index 100%rename from examples/stanford_town/utils/utils.pyrename to metagpt/ext/stanford_town/utils/utils.pydiff --git a/examples/stanford_town/tests/roles/__init__.py b/tests/metagpt/ext/__init__.pysimilarity index 100%rename from examples/stanford_town/tests/roles/__init__.pyrename to tests/metagpt/ext/__init__.pydiff --git a/examples/stanford_town/utils/__init__.py b/tests/metagpt/ext/stanford_town/__init__.pysimilarity index 100%rename from examples/stanford_town/utils/__init__.pyrename to tests/metagpt/ext/stanford_town/__init__.pydiff --git a/examples/stanford_town/prompts/__init__.py b/tests/metagpt/ext/stanford_town/actions/__init__.pysimilarity index 61%rename from examples/stanford_town/prompts/__init__.pyrename to tests/metagpt/ext/stanford_town/actions/__init__.pyindex cb4131c76..2bcf8efd0 100644--- a/examples/stanford_town/prompts/__init__.py+++ b/tests/metagpt/ext/stanford_town/actions/__init__.py@@ -1,3 +1,3 @@#!/usr/bin/env python# -*- coding: utf-8 -*--# @Desc : prompt templates+# @Desc :diff --git a/examples/stanford_town/tests/actions/test_gen_action_details.py b/tests/metagpt/ext/stanford_town/actions/test_gen_action_details.pysimilarity index 92%rename from examples/stanford_town/tests/actions/test_gen_action_details.pyrename to tests/metagpt/ext/stanford_town/actions/test_gen_action_details.pyindex af4d94c4d..5dc5cbbe3 100644--- a/examples/stanford_town/tests/actions/test_gen_action_details.py+++ b/tests/metagpt/ext/stanford_town/actions/test_gen_action_details.py@@ -4,17 +4,17 @@import pytest-from examples.stanford_town.actions.gen_action_details import (+from metagpt.environment import StanfordTownEnv+from metagpt.environment.api.env_api import EnvAPIAbstract+from metagpt.ext.stanford_town.actions.gen_action_details import (GenActionArena,GenActionDetails,GenActionObject,GenActionSector,GenActObjDescription,)-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.utils.const import MAZE_ASSET_PATH-from metagpt.environment import StanfordTownEnv-from metagpt.environment.api.env_api import EnvAPIAbstract+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.utils.const import MAZE_ASSET_PATH@pytest.mark.asynciodiff --git a/examples/stanford_town/tests/actions/test_summarize_conv.py b/tests/metagpt/ext/stanford_town/actions/test_summarize_conv.pysimilarity index 82%rename from examples/stanford_town/tests/actions/test_summarize_conv.pyrename to tests/metagpt/ext/stanford_town/actions/test_summarize_conv.pyindex fa0de2031..5dfabcab9 100644--- a/examples/stanford_town/tests/actions/test_summarize_conv.py+++ b/tests/metagpt/ext/stanford_town/actions/test_summarize_conv.py@@ -4,7 +4,7 @@import pytest-from examples.stanford_town.actions.summarize_conv import SummarizeConv+from metagpt.ext.stanford_town.actions.summarize_conv import SummarizeConv@pytest.mark.asynciodiff --git a/tests/metagpt/ext/stanford_town/memory/__init__.py b/tests/metagpt/ext/stanford_town/memory/__init__.pynew file mode 100644index 000000000..2bcf8efd0--- /dev/null+++ b/tests/metagpt/ext/stanford_town/memory/__init__.py@@ -0,0 +1,3 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc :diff --git a/examples/stanford_town/tests/test_agent_memory.py b/tests/metagpt/ext/stanford_town/memory/test_agent_memory.pysimilarity index 94%rename from examples/stanford_town/tests/test_agent_memory.pyrename to tests/metagpt/ext/stanford_town/memory/test_agent_memory.pyindex e7ad3fc43..d17014898 100644--- a/examples/stanford_town/tests/test_agent_memory.py+++ b/tests/metagpt/ext/stanford_town/memory/test_agent_memory.py@@ -6,9 +6,9 @@ from datetime import datetime, timedeltaimport pytest-from examples.stanford_town.memory.agent_memory import AgentMemory-from examples.stanford_town.memory.retrieve import agent_retrieve-from examples.stanford_town.utils.const import STORAGE_PATH+from metagpt.ext.stanford_town.memory import AgentMemory+from metagpt.ext.stanford_town.memory.retrieve import agent_retrieve+from metagpt.ext.stanford_town.utils.const import STORAGE_PATHfrom metagpt.logs import logger"""diff --git a/examples/stanford_town/tests/test_basic_memory.py b/tests/metagpt/ext/stanford_town/memory/test_basic_memory.pysimilarity index 95%rename from examples/stanford_town/tests/test_basic_memory.pyrename to tests/metagpt/ext/stanford_town/memory/test_basic_memory.pyindex fa2a5c487..36a9b2f99 100644--- a/examples/stanford_town/tests/test_basic_memory.py+++ b/tests/metagpt/ext/stanford_town/memory/test_basic_memory.py@@ -6,7 +6,7 @@ from datetime import datetime, timedeltaimport pytest-from examples.stanford_town.memory.agent_memory import BasicMemory+from metagpt.ext.stanford_town.memory.agent_memory import BasicMemoryfrom metagpt.logs import logger"""diff --git a/examples/stanford_town/tests/test_spatial_memory.py b/tests/metagpt/ext/stanford_town/memory/test_spatial_memory.pysimilarity index 77%rename from examples/stanford_town/tests/test_spatial_memory.pyrename to tests/metagpt/ext/stanford_town/memory/test_spatial_memory.pyindex 822db753e..e05b273fd 100644--- a/examples/stanford_town/tests/test_spatial_memory.py+++ b/tests/metagpt/ext/stanford_town/memory/test_spatial_memory.py@@ -2,8 +2,8 @@# -*- coding: utf-8 -*-# @Desc : the unittest of MemoryTree-from ..memory.spatial_memory import MemoryTree-from ..utils.const import STORAGE_PATH+from metagpt.ext.stanford_town.memory.spatial_memory import MemoryTree+from metagpt.ext.stanford_town.utils.const import STORAGE_PATHdef test_spatial_memory():diff --git a/tests/metagpt/ext/stanford_town/plan/__init__.py b/tests/metagpt/ext/stanford_town/plan/__init__.pynew file mode 100644index 000000000..2bcf8efd0--- /dev/null+++ b/tests/metagpt/ext/stanford_town/plan/__init__.py@@ -0,0 +1,3 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc :diff --git a/examples/stanford_town/tests/plan/test_conversation.py b/tests/metagpt/ext/stanford_town/plan/test_conversation.pysimilarity index 83%rename from examples/stanford_town/tests/plan/test_conversation.pyrename to tests/metagpt/ext/stanford_town/plan/test_conversation.pyindex ff8664538..35dd216f9 100644--- a/examples/stanford_town/tests/plan/test_conversation.py+++ b/tests/metagpt/ext/stanford_town/plan/test_conversation.py@@ -6,12 +6,12 @@ from typing import Tupleimport pytest-from examples.stanford_town.plan.converse import agent_conversation-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.utils.const import MAZE_ASSET_PATH, STORAGE_PATH-from examples.stanford_town.utils.mg_ga_transform import get_reverie_meta-from examples.stanford_town.utils.utils import copy_folderfrom metagpt.environment import StanfordTownEnv+from metagpt.ext.stanford_town.plan.converse import agent_conversation+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.utils.const import MAZE_ASSET_PATH, STORAGE_PATH+from metagpt.ext.stanford_town.utils.mg_ga_transform import get_reverie_meta+from metagpt.ext.stanford_town.utils.utils import copy_folderasync def init_two_roles(fork_sim_code: str = "base_the_ville_isabella_maria_klaus") -> Tuple["STRole"]:diff --git a/examples/stanford_town/tests/plan/test_st_plan.py b/tests/metagpt/ext/stanford_town/plan/test_st_plan.pysimilarity index 90%rename from examples/stanford_town/tests/plan/test_st_plan.pyrename to tests/metagpt/ext/stanford_town/plan/test_st_plan.pyindex ad20d3068..18663a066 100644--- a/examples/stanford_town/tests/plan/test_st_plan.py+++ b/tests/metagpt/ext/stanford_town/plan/test_st_plan.py@@ -4,12 +4,12 @@import pytest-from examples.stanford_town.plan.st_plan import (+from metagpt.ext.stanford_town.plan.st_plan import (_choose_retrieved,_should_react,_wait_react,)-from examples.stanford_town.tests.plan.test_converse import init_two_roles+from tests.metagpt.ext.stanford_town.plan.test_conversation import init_two_rolesdef test_should_react():diff --git a/tests/metagpt/ext/stanford_town/roles/__init__.py b/tests/metagpt/ext/stanford_town/roles/__init__.pynew file mode 100644index 000000000..2bcf8efd0--- /dev/null+++ b/tests/metagpt/ext/stanford_town/roles/__init__.py@@ -0,0 +1,3 @@+#!/usr/bin/env python+# -*- coding: utf-8 -*-+# @Desc :diff --git a/examples/stanford_town/tests/roles/test_st_role.py b/tests/metagpt/ext/stanford_town/roles/test_st_role.pysimilarity index 75%rename from examples/stanford_town/tests/roles/test_st_role.pyrename to tests/metagpt/ext/stanford_town/roles/test_st_role.pyindex b2e4c6969..affa6e87f 100644--- a/examples/stanford_town/tests/roles/test_st_role.py+++ b/tests/metagpt/ext/stanford_town/roles/test_st_role.py@@ -4,10 +4,10 @@import pytest-from examples.stanford_town.memory.agent_memory import BasicMemory-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.utils.const import MAZE_ASSET_PATHfrom metagpt.environment import StanfordTownEnv+from metagpt.ext.stanford_town.memory.agent_memory import BasicMemory+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.utils.const import MAZE_ASSET_PATH@pytest.mark.asynciodiff --git a/examples/stanford_town/tests/test_reflect.py b/tests/metagpt/ext/stanford_town/test_reflect.pysimilarity index 94%rename from examples/stanford_town/tests/test_reflect.pyrename to tests/metagpt/ext/stanford_town/test_reflect.pyindex dbcbd974f..0be23166c 100644--- a/examples/stanford_town/tests/test_reflect.py+++ b/tests/metagpt/ext/stanford_town/test_reflect.py@@ -4,14 +4,14 @@import pytest-from examples.stanford_town.actions.run_reflect_action import (+from metagpt.environment import StanfordTownEnv+from metagpt.ext.stanford_town.actions.run_reflect_action import (AgentEventTriple,AgentFocusPt,AgentInsightAndGuidance,)-from examples.stanford_town.roles.st_role import STRole-from examples.stanford_town.utils.const import MAZE_ASSET_PATH-from metagpt.environment import StanfordTownEnv+from metagpt.ext.stanford_town.roles.st_role import STRole+from metagpt.ext.stanford_town.utils.const import MAZE_ASSET_PATH@pytest.mark.asyncio