class PlaywrightLLMAgent:
High-level orchestration: snapshot ↔ LLM ↔ action executor.
def __init__(self):
def _get_chat_agent(self):
Get or create the ChatAgent instance.
def _safe_parse_json(self, content: str):
Safely parse JSON from LLM response with multiple fallback strategies.
def _llm_call(
self,
prompt: str,
snapshot: str,
is_initial: bool,
history: Optional[List[Dict[str, Any]]] = None
):
Call the LLM (via CAMEL ChatAgent) to get plan & next action.