[Refactor, Fix]: Agent controller state/metrics management (#9012)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Rohit Malhotra
2025-06-16 11:24:13 -04:00
committed by GitHub
parent cbe32a1a12
commit 2fd1fdcd7e
27 changed files with 1404 additions and 667 deletions

View File

@@ -136,8 +136,10 @@ class CodeActAgent(Agent):
return tools
def reset(self) -> None:
"""Resets the CodeAct Agent."""
"""Resets the CodeAct Agent's internal state.
"""
super().reset()
# Only clear pending actions, not LLM metrics
self.pending_actions.clear()
def step(self, state: State) -> 'Action':