CrewAI クイックスタート:10 分で最初のリサーチ Crew を作る
3 min read
この回の目的はシンプルです。手順どおりに進めれば、最初の AI リサーチレポートを出力できます。
最短ルートで進めます。
手順 1:プロジェクト作成
crewai create crew latest-ai-notes
cd latest-ai-notes以下を含む基本構成が作成されます。
src/latest_ai_notes/config/agents.yamlsrc/latest_ai_notes/config/tasks.yamlsrc/latest_ai_notes/crew.pysrc/latest_ai_notes/main.py
手順 2:依存関係のインストール
crewai installこのコマンドはプロジェクト設定を読み取り、仮想環境の作成とパッケージ導入を自動で実行します。
長い pip install を手で並べる必要はありません。
手順 3:Agent 設定
agents.yaml を編集:
researcher:
role: >
{topic} Researcher
goal: >
Find useful and current information about {topic}
backstory: >
You are good at collecting reliable information and summarizing key points.
reporter:
role: >
{topic} Reporter
goal: >
Convert research notes into a readable markdown report
backstory: >
You explain technical topics with simple language and clear structure.手順 4:Task 設定
tasks.yaml を編集:
research_task:
description: >
Research {topic}. Focus on trends, tools, and practical examples in 2026.
expected_output: >
10 bullet points with short explanations.
agent: researcher
report_task:
description: >
Expand the research notes into a complete markdown article for beginners.
expected_output: >
A beginner-friendly markdown report with sections and conclusion.
agent: reporter
context:
- research_task
output_file: output/report.md💡
contextは重要です。2 つ目のタスクが 1 つ目の結果を受け取ることを示します。
手順 5:Crew 実行
crewai run成功すると output/report.md に結果が出ます。
初回実行で遅いのは普通です。モデル呼び出しは、寝起きの猫みたいに少し待ちます。
よくある問題
| 問題 | 原因候補 | 解決策 |
|---|---|---|
API key missing |
環境変数が未設定 | .env に API キーを追加 |
Module not found |
依存が不足 | crewai install を再実行 |
| 出力が安定しない | タスク記述が曖昧 | expected_output の形式要件を強化 |
次へ
最初のフローは動きました。
次は最重要の分割スキルです。
👉 Agent と Task 入門