> ## Documentation Index
> Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Camel.toolkits.hybrid browser toolkit.agent

<a id="camel.toolkits.hybrid_browser_toolkit.agent" />

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent" />

## PlaywrightLLMAgent

```python theme={"system"}
class PlaywrightLLMAgent:
```

High-level orchestration: snapshot ↔ LLM ↔ action executor.

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent.__init__" />

### **init**

```python theme={"system"}
def __init__(self):
```

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent._get_chat_agent" />

### \_get\_chat\_agent

```python theme={"system"}
def _get_chat_agent(self):
```

Get or create the ChatAgent instance.

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent._safe_parse_json" />

### \_safe\_parse\_json

```python theme={"system"}
def _safe_parse_json(self, content: str):
```

Safely parse JSON from LLM response with multiple fallback
strategies.

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent._get_fallback_response" />

### \_get\_fallback\_response

```python theme={"system"}
def _get_fallback_response(self, error_msg: str):
```

Generate a fallback response structure.

<a id="camel.toolkits.hybrid_browser_toolkit.agent.PlaywrightLLMAgent._llm_call" />

### \_llm\_call

```python theme={"system"}
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.
