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

# LangChain

> Use the langchain-cloro Python package to give LangChain agents ready-made tools for Google Search, ChatGPT, Gemini, Perplexity, and Copilot.

The [`langchain-cloro`](https://pypi.org/project/langchain-cloro/) Python package wraps cloro's [sync monitor endpoints](/guides/making-requests/sync) as LangChain tools, so your agents can query AI engines and Google Search and reason over structured results with sources. It's listed in the [LangChain integrations docs](https://docs.langchain.com/oss/python/integrations/tools/cloro), and the source lives in the [langchain-cloro repository](https://github.com/cloro-dev/langchain-cloro).

## Prerequisites

* Python with [LangChain](https://python.langchain.com) installed
* A cloro API key from the [dashboard](https://dashboard.cloro.dev) (see [Authentication](/guides/authentication))

## Install the package

```bash theme={null}
pip install langchain-cloro
```

## Configure your API key

Set the key as an environment variable:

```bash theme={null}
export CLORO_API_KEY="YOUR_API_KEY"
```

Or pass it directly when initializing a tool:

```python theme={null}
from langchain_cloro import CloroGoogleSearch

tool = CloroGoogleSearch(cloro_api_key="YOUR_API_KEY")
```

## Available tools

| Tool                | Endpoint                                                                    |
| ------------------- | --------------------------------------------------------------------------- |
| `CloroGoogleSearch` | [`POST /v1/monitor/google`](/api-reference/endpoint/monitor-google)         |
| `CloroChatGPT`      | [`POST /v1/monitor/chatgpt`](/api-reference/endpoint/monitor-chatgpt)       |
| `CloroGemini`       | [`POST /v1/monitor/gemini`](/api-reference/endpoint/monitor-gemini)         |
| `CloroPerplexity`   | [`POST /v1/monitor/perplexity`](/api-reference/endpoint/monitor-perplexity) |
| `CloroGrok`         | [`POST /v1/monitor/grok`](/api-reference/endpoint/monitor-grok)             |
| `CloroCopilot`      | [`POST /v1/monitor/copilot`](/api-reference/endpoint/monitor-copilot)       |

Every tool accepts `country` (ISO 3166-1 alpha-2, defaults to `"US"`), `include_html`, and `include_markdown`. `CloroGoogleSearch` takes a `query` plus `device` (`"desktop"` or `"mobile"`), `pages` (1–20), `include_aioverview`, and `aioverview_markdown`; the assistant tools take a `prompt`, and `CloroChatGPT` additionally supports `include_raw_response` and `include_search_queries` (query fan-out).

The package also exports a `get_countries()` utility that fetches the [supported countries](/api-reference/endpoint/countries), optionally filtered by provider.

<Note>
  `CloroGrok` is still exported, but the provider is [temporarily unavailable](/guides/providers) — calls to it will fail until Grok access is restored.
</Note>

## Invoke a tool directly

```python theme={null}
from langchain_cloro import CloroGoogleSearch

tool = CloroGoogleSearch()

results = tool.invoke({
    "query": "best laptops for programming",
    "include_aioverview": True,
    "aioverview_markdown": True,
})
```

## Use with an agent

```python theme={null}
from langchain.agents import initialize_agent, AgentType
from langchain_openai import OpenAI
from langchain_cloro import CloroGoogleSearch, CloroChatGPT

llm = OpenAI(temperature=0)
tools = [CloroGoogleSearch(), CloroChatGPT()]

agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True,
)

agent.run("What are the latest developments in AI?")
```

<Note>
  Tool calls run synchronously and count against your [concurrency limits](/guides/concurrency). For large batches (tracking many prompts across engines), use the [async API](/guides/making-requests/async) directly instead of looping tool calls. Each call consumes credits at the standard per-provider rates — see [Providers](/guides/providers) and [Credits & limits](/guides/credits-and-limits).
</Note>
