Trying CrewAI for Agentic AI — What I Struggled With


# Getting Stuck While Setting Up CrewAI

I recently tried out the trending agent framework **CrewAI**. Long story short — **the installation process is a huge pain**.

Despite what many blog posts or videos might suggest, **it’s not as simple as just running a few Python commands**. Here's a breakdown of where I got stuck, what went wrong, and how I eventually got through it (or gave up).

## Is uv Really Required?

The official CrewAI documentation immediately recommends using `uv`, a relatively new Python package and environment manager:

- [Official installation instructions](https://docs.crewai.com/installation)

```bash
curl -fsSL https://astral.sh/uv/install.sh | sh
uv venv
uv pip install crewai
```

If you’ve never heard of `uv`, you’re not alone. While Python developers are typically used to `venv`, `pipenv`, or `poetry`, CrewAI has taken the approach of promoting `uv` heavily.

Installing `uv` itself on Windows wasn’t that hard — **but that’s just the beginning of the trouble**.

## Installing CrewAI: The “cl Not Found” Nightmare

Once I created the virtual environment with `uv` and ran the installation command, I hit an error:

```bash
cl : The term 'cl' is not recognized as the name of a cmdlet, function, script file, or operable program.
...
fatal error C1083: Cannot open include file: 'float.h': No such file or directory
...
```

And here's what it looked like on my end:

![crewai_00_error.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3457682/3376ac4f-d2b8-45b6-a2c0-5d13f379dfa8.jpeg)

After some digging, I realized that **Visual C++ Build Tools** was required for building `hnswlib`, a dependency of CrewAI.

- [Download Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)

Then I got told that `float.h` was missing — which means I also needed the **Windows SDK**. I had skipped installing it to save disk space and moved parts of my environment to drive D. That decision came back to haunt me — I lost several hours because of this.

The build tool and SDK installation were painfully slow, and unless you check “C++ Desktop Development” during the Visual Studio install process, `cl.exe` won’t even be usable.

**Required Visual Build Tool screen:**
![crewai_05_VisualBuildTool.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/3457682/4b334c56-3db0-452f-b243-df6bd96ed93e.jpeg)

> Who said this was “just a Python project”!?

## Differences Between GitHub and Official Docs

At one point I checked the [CrewAI GitHub README](https://github.com/crewAIInc/crewAI), only to realize that the steps listed there were a bit different from the [official site](https://docs.crewai.com/installation).

Also, early tutorials required signing up for a third-party service called [serper.dev](https://serper.dev/) for search capabilities. Luckily, that requirement seems to have been removed in recent versions.

If you're using the `BaseAgent` class, the `.env` file is automatically loaded — so configuration has become somewhat easier.

## How to Pass Parameters at Runtime

CrewAI is designed to be run via `crewai run`, but many users (like me) want to pass variables at runtime — such as the topic of a post or document.

This is possible by using placeholders like `{topic}` in your task definitions (`tasks.py`), and calling:

```python
crew.kickoff(inputs={"topic": "AI LLMs"})
```

This allows you to dynamically inject values from `sys.argv` or `.env` without modifying your code every time. This is super handy if you're looping over topics or running batch tasks. I haven’t fully automated this part yet, so I’ll follow up on that later.

## What About LangChain?

After all this hassle, I briefly considered switching to **LangChain**. It’s very popular, but after reviewing its structure, it seemed… **a bit too complex**.

If your use case is focused on simple but flexible agent flows, CrewAI still has an edge in readability and control. That said, LangChain is still widely supported and has more Japanese documentation and tutorials — so I may try it later.

## Final Thoughts

CrewAI has a solid architecture and flexible agent design — but **getting started is a serious barrier**. My key pain points were:

- Mandatory use of `uv`
- `cl.exe` missing (requires Build Tools)
- Windows SDK and C++ toolchain setup
- Constantly changing documentation
- Some tutorials are outdated or inconsistent

But once you get through the painful setup, defining your flows and tasks becomes relatively intuitive and clean.

Hopefully, future updates will streamline the installation process even further.

---

## Helpful Links

- [CrewAI Official Installation Guide](https://docs.crewai.com/installation)  
- [CrewAI GitHub Repository](https://github.com/crewAIInc/crewAI)  
- [Visual C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)  
- [Serper.dev (no longer needed, but part of older tutorials)](https://serper.dev/)