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

# CrewAI

> Give CrewAI agents Keenable web search with the official SDK. Keyless by default.

*Agent framework*

Give CrewAI agents Keenable web search with a small tool that wraps the official Python SDK. You can try it without an API key. Set `KEENABLE_API_KEY` to use your organization's limits.

CrewAI's own `KeenableSearchTool` is in review upstream ([PR #7570](https://github.com/crewAIInc/crewAI/pull/7570)). Until it ships, this page wraps the SDK.

## Install

```bash theme={"system"}
pip install keenable 'crewai[tools]'
```

## Add search to a crew

Define a tool that calls the SDK, then give it to an agent:

```python theme={"system"}
from crewai import Agent, Task, Crew
from crewai.tools import tool
from keenable import Keenable

client = Keenable()  # keyless by default; reads KEENABLE_API_KEY when set


@tool("Keenable Web Search")
def keenable_search(query: str) -> str:
    """Search the web and return cited results for the agent."""
    return client.search(query, max_results=5).to_context()


researcher = Agent(
    role="Researcher",
    goal="Answer with live web sources",
    backstory="You search before you claim a fact.",
    tools=[keenable_search],
)

task = Task(
    description="What changed in the latest Python release? Cite sources.",
    expected_output="A short answer with numbered source URLs.",
    agent=researcher,
)

Crew(agents=[researcher], tasks=[task]).kickoff()
```

`to_context()` returns a numbered block of `[n] Title (url)` entries that the model can cite. To read a single page, add a tool that calls `page = client.fetch(url)` and returns `page.content`.

> [!NOTE]
>
> Set `KEENABLE_API_KEY` to remove the hourly request cap. If you don't set a key, calls run on the shared public tier at [lower rate limits](https://docs.keenable.ai/rate-limits.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.