Skip to main content
The langchain-cloro Python package wraps cloro’s sync monitor endpoints 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, and the source lives in the langchain-cloro repository.

Prerequisites

Install the package

pip install langchain-cloro

Configure your API key

Set the key as an environment variable:
export CLORO_API_KEY="YOUR_API_KEY"
Or pass it directly when initializing a tool:
from langchain_cloro import CloroGoogleSearch

tool = CloroGoogleSearch(cloro_api_key="YOUR_API_KEY")

Available tools

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, optionally filtered by provider.
CloroGrok is still exported, but the provider is temporarily unavailable — calls to it will fail until Grok access is restored.

Invoke a tool directly

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

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?")
Tool calls run synchronously and count against your concurrency limits. For large batches (tracking many prompts across engines), use the async API directly instead of looping tool calls. Each call consumes credits at the standard per-provider rates — see Providers and Credits & limits.