Skip to content

Commit 6be510c

Browse files
committed
send start msg on run
1 parent ea901e4 commit 6be510c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

aworld/core/agent/base.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from aworld.logs.util import logger
1818
from aworld.output.base import StepOutput
1919
from aworld.sandbox.base import Sandbox
20-
from aworld.utils.common import convert_to_snake, replace_env_variables
20+
from aworld.utils.common import convert_to_snake, replace_env_variables, sync_exec
2121

2222
INPUT = TypeVar('INPUT')
2323
OUTPUT = TypeVar('OUTPUT')
@@ -145,6 +145,13 @@ def desc(self) -> str:
145145
def run(self, message: Message, **kwargs) -> Message:
146146
self._init_context(message.context)
147147
observation = message.payload
148+
sync_exec(send_message, Message(
149+
category=Constants.OUTPUT,
150+
payload=StepOutput.build_start_output(name=f"{self.id()}", alias_name=self.name(), step_num=0),
151+
sender=self.id(),
152+
session_id=self.context.session_id,
153+
headers={"context": self.context}
154+
))
148155
self.pre_run()
149156
result = self.policy(observation, message=message, **kwargs)
150157
final_result = self.post_run(result, observation)

0 commit comments

Comments
 (0)