avoigt1121
Remove StateManager class and redundant PlanManager instantiations
29c2245
Raw
History Blame
554 Bytes
"""
Agent state creation for CodeAct Agent.
"""
import time
from typing import List, Dict, Optional
def create_agent_state(
messages: List = None,
step_count: int = 0,
error_count: int = 0,
start_time: float = None,
current_plan: Optional[str] = None,
) -> Dict:
"""Create a standardized agent state dictionary."""
return {
"messages": messages or [],
"step_count": step_count,
"error_count": error_count,
"start_time": start_time or time.time(),
"current_plan": current_plan,
}