🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
PlaywrightLLMAgent
class PlaywrightLLMAgent:
High-level orchestration: snapshot ↔ LLM ↔ action executor.
init
def __init__(self):
_get_chat_agent
def _get_chat_agent(self):
Get or create the ChatAgent instance.
_safe_parse_json
def _safe_parse_json(self, content: str):
Safely parse JSON from LLM response with multiple fallback strategies.
_get_fallback_response
def _get_fallback_response(self, error_msg: str):
Generate a fallback response structure.
_llm_call
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.