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

# autogen.tools.experimental.Crawl4AITool

<h2 id="autogen.tools.experimental.Crawl4AITool" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">Crawl4AITool</span>
</h2>

```python theme={null}
Crawl4AITool(
    llm_config: LLMConfig | dict[str, Any] | None = None,
    extraction_model: type[BaseModel] | None = None,
    llm_strategy_kwargs: dict[str, Any] | None = None
)
```

Crawl a website and extract information using the crawl4ai library.<br />Initialize the Crawl4AITool.<br />

<b>Parameters:</b>

| Name                  | Description                                                                                                                            |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `llm_config`          | **Type:** [LLMConfig](/docs/api-reference/autogen/llm_config/LLMConfig) \| dict\[str, typing.Any] \| None<br /><br />**Default:** None |
| `extraction_model`    | **Type:** type\[pydantic.main.BaseModel] \| None<br /><br />**Default:** None                                                          |
| `llm_strategy_kwargs` | **Type:** dict\[str, typing.Any] \| None<br /><br />**Default:** None                                                                  |

### Instance Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### description

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### func

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### function\_schema

<br />

Get the schema for the function.<br />This is the old way of handling function calls with OpenAI and compatible frameworks.<br />It is provided for backward compatibility.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### name

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### realtime\_tool\_schema

<br />

Get the schema for the tool.<br />This is the preferred way of handling function calls with OpeaAI and compatible frameworks.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### tool\_schema

<br />

Get the schema for the tool.<br />This is the preferred way of handling function calls with OpeaAI and compatible frameworks.

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### register\_for\_execution

```python theme={null}
register_for_execution(self, agent: ConversableAgent) -> 
```

Registers the tool for direct execution by a ConversableAgent.<br />This method registers the tool so that it can be executed by the agent,
typically outside of the context of an LLM interaction.<br />

<b>Parameters:</b>

| Name    | Description                                                                           |
| ------- | ------------------------------------------------------------------------------------- |
| `agent` | The agent to which the tool will be registered.<br /><br />**Type:** ConversableAgent |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### register\_for\_llm

```python theme={null}
register_for_llm(self, agent: ConversableAgent) -> 
```

Registers the tool for use with a ConversableAgent's language model (LLM).<br />This method registers the tool so that it can be invoked by the agent during
interactions with the language model.<br />

<b>Parameters:</b>

| Name    | Description                                                                           |
| ------- | ------------------------------------------------------------------------------------- |
| `agent` | The agent to which the tool will be registered.<br /><br />**Type:** ConversableAgent |

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### register\_tool

```python theme={null}
register_tool(self, agent: ConversableAgent) -> 
```

Register a tool to be both proposed and executed by an agent.<br />Equivalent to calling both `register_for_llm` and `register_for_execution` with the same agent.<br />Note: This will not make the agent recommend and execute the call in the one step. If the agent
recommends the tool, it will need to be the next agent to speak in order to execute the tool.<br />

<b>Parameters:</b>

| Name    | Description                                                                           |
| ------- | ------------------------------------------------------------------------------------- |
| `agent` | The agent to which the tool will be registered.<br /><br />**Type:** ConversableAgent |

<br />
