Skip to content

Commit cf19708

Browse files
authored
Merge pull request #104 from ks6088ts-labs/copilot/fix-103
Update documentation to reflect current source code changes
2 parents 75aab4d + 3f92b40 commit cf19708

File tree

2 files changed

+138
-18
lines changed

2 files changed

+138
-18
lines changed

docs/index.ja.md

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ uv run python scripts/elasticsearch_operator.py create-index \
8383
--verbose
8484
```
8585

86+
**任意: 追加データソースの設定:**
87+
88+
```shell
89+
# Azure AI Search
90+
make create-ai-search-index
91+
92+
# Azure Cosmos DB
93+
make create-cosmosdb-index
94+
95+
# またはオペレータースクリプトを直接使用:
96+
# uv run python scripts/ai_search_operator.py add-documents --verbose
97+
# uv run python scripts/cosmosdb_operator.py add-documents --verbose
98+
```
99+
86100
## プロジェクト構造
87101

88102
### コアコンポーネント
@@ -91,6 +105,11 @@ uv run python scripts/elasticsearch_operator.py create-index \
91105
- **`template_langgraph/`** - すべてのエージェント実装を含むメイン Python パッケージ
92106
- **`notebooks/`** - インタラクティブな例と説明付き Jupyter ノートブック
93107
- **`scripts/`** - エージェント実行用コマンドラインツール
108+
- `agent_operator.py` - プロダクションエージェント用メインランナー
109+
- `demo_agents_operator.py` - シンプルなデモエージェント用ランナー
110+
- データベース/検索オペレーター(`qdrant_operator.py``elasticsearch_operator.py``ai_search_operator.py``cosmosdb_operator.py`
111+
- LLM テストオペレーター(`azure_openai_operator.py``azure_ai_foundry_operator.py``ollama_operator.py`
112+
- その他ユーティリティ(`dify_operator.py``otel_operator.py`
94113

95114
### エージェントの例(`template_langgraph/agents/`
96115

@@ -104,9 +123,17 @@ uv run python scripts/elasticsearch_operator.py create-index \
104123
- `news_summarizer_agent/` — Web/YouTube 要約。取得 → 要約 → 通知。主要概念: 扇形サブタスク、Notifier/Scraper/Summarizer を差し替え。
105124
- `image_classifier_agent/` — 画像分類。ローカル画像を分類し通知。主要概念: 画像 ×LLM、並列サブタスク。
106125

126+
#### デモエージェント(`template_langgraph/agents/demo_agents/`
127+
128+
学習と実演用の追加シンプルエージェント:
129+
130+
- `weather_agent.py` — シンプルなツール呼び出しエージェント。モック天気検索ツールを使った基本的な ReAct パターン。主要概念: ツール呼び出し、基本エージェントパターン。
131+
- `multi_agent.py` — マルチエージェント協調。転送機能を使ったエージェント間の引き渡しを実演。主要概念: エージェント協調、ワークフロー転送。
132+
- `parallel_processor_agent/` — 並列実行タスク分解。目標をタスクに分解し並列処理。主要概念: 並列処理、タスク分解、Send 操作。
133+
107134
### サポートモジュール
108135

109-
- `template_langgraph/llms/`: LLM ラッパー(Azure OpenAI など
136+
- `template_langgraph/llms/`: LLM ラッパー(Azure OpenAI、Azure AI Foundry、Ollama
110137
- `template_langgraph/tools/`: ツール実装
111138
- Azure AI Search(`ai_search_tool.py`
112139
- Azure Cosmos DB Vector Search(`cosmosdb_tool.py`
@@ -242,6 +269,32 @@ uv run python scripts/agent_operator.py image-classifier-agent \
242269
--verbose
243270
```
244271

272+
### デモエージェント実行例
273+
274+
- Weather agent(シンプルなツール呼び出し):
275+
276+
```shell
277+
uv run python scripts/demo_agents_operator.py weather-agent \
278+
--query "日本の天気はどうですか?" \
279+
--verbose
280+
```
281+
282+
- Multi agent(エージェント協調):
283+
284+
```shell
285+
uv run python scripts/demo_agents_operator.py multi-agent \
286+
--query "東京の天気はどうですか?" \
287+
--verbose
288+
```
289+
290+
- Parallel processor agent(タスク分解):
291+
292+
```shell
293+
uv run python scripts/demo_agents_operator.py parallel-processor-agent \
294+
--goal "ソフトウェア会社立ち上げのための情報収集戦略を計画する" \
295+
--verbose
296+
```
297+
245298
Makefile のショートカット(例: `make run-chat-with-tools-agent`, `make run-issue-formatter-agent`, `make run-news-summarizer-agent`, `make run-image-classifier-agent`)も用意しています。
246299

247300
## 実演されている主要概念
@@ -289,6 +342,11 @@ LangGraph が複数のインタラクションステップにわたってコン
289342
- `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_API_VERSION`
290343
- `AZURE_OPENAI_MODEL_CHAT`, `AZURE_OPENAI_MODEL_EMBEDDING`, `AZURE_OPENAI_MODEL_REASONING`
291344
- Entra ID 認証の任意設定: `AZURE_OPENAI_USE_MICROSOFT_ENTRA_ID=true`
345+
- Azure AI Foundry
346+
- `AZURE_AI_FOUNDRY_INFERENCE_ENDPOINT`, `AZURE_AI_FOUNDRY_INFERENCE_API_VERSION`
347+
- `AZURE_AI_FOUNDRY_INFERENCE_MODEL_CHAT`
348+
- Ollama(ローカル)
349+
- `OLLAMA_MODEL_CHAT`
292350
- Azure AI Search
293351
- `AI_SEARCH_ENDPOINT`, `AI_SEARCH_KEY`, `AI_SEARCH_INDEX_NAME`
294352
- Azure Cosmos DB(ベクター)
@@ -319,9 +377,10 @@ make mcp-inspector
319377
## 次のステップ
320378

321379
1. **基本から始める**: `kabuto_helpdesk_agent`の例を実行
322-
2. **実装を理解する**: `chat_with_tools_agent`と比較
323-
3. **高度なパターンを探索**: タスク分解器とスーパーバイザーエージェントを試す
324-
4. **独自のものを構築**: このテンプレートをあなたのユースケースの出発点として使用
380+
2. **デモエージェントを試す**: `weather_agent``multi_agent``parallel_processor_agent`でシンプルなパターンを探索
381+
3. **実装を理解する**: `chat_with_tools_agent`と比較
382+
4. **高度なパターンを探索**: タスク分解器とスーパーバイザーエージェントを試す
383+
5. **独自のものを構築**: このテンプレートをあなたのユースケースの出発点として使用
325384

326385
## 可観測性(任意)
327386

@@ -340,10 +399,11 @@ uv run python scripts/otel_operator.py run -q "health check" -v
340399

341400
このテンプレートは複数の実証済みエージェントアーキテクチャを実演しています:
342401

343-
1. **ツール付きシングルエージェント** - 基本的なツール呼び出しパターン
344-
2. **ReAct エージェント** - ループでの推論と行動
345-
3. **構造化出力エージェント** - フォーマットされたデータの返却
346-
4. **計画エージェント** - 複雑なタスクの分解
347-
5. **スーパーバイザーエージェント** - 複数エージェントの協調
402+
1. **ツール付きシングルエージェント** - 基本的なツール呼び出しパターン(`weather_agent`
403+
2. **ReAct エージェント** - ループでの推論と行動(`kabuto_helpdesk_agent`
404+
3. **構造化出力エージェント** - フォーマットされたデータの返却(`issue_formatter_agent`
405+
4. **計画エージェント** - 複雑なタスクの分解(`task_decomposer_agent`
406+
5. **マルチエージェントシステム** - 複数エージェントの協調(`supervisor_agent``multi_agent`
407+
6. **並列処理** - 同時タスク実行(`parallel_processor_agent`
348408

349409
各パターンは、いつどのように使用するかを理解するのに役立つ明確な例と文書で実装されています。

docs/index.md

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ uv run python scripts/elasticsearch_operator.py create-index \
8383
--verbose
8484
```
8585

86+
**Optional: Set up additional data sources:**
87+
88+
```shell
89+
# Azure AI Search
90+
make create-ai-search-index
91+
92+
# Azure Cosmos DB
93+
make create-cosmosdb-index
94+
95+
# Or use the operator scripts directly:
96+
# uv run python scripts/ai_search_operator.py add-documents --verbose
97+
# uv run python scripts/cosmosdb_operator.py add-documents --verbose
98+
```
99+
86100
## Project Structure
87101

88102
### Core Components
@@ -91,6 +105,11 @@ uv run python scripts/elasticsearch_operator.py create-index \
91105
- **`template_langgraph/`** - Main Python package containing all agent implementations
92106
- **`notebooks/`** - Jupyter notebooks with interactive examples and explanations
93107
- **`scripts/`** - Command-line tools for running agents
108+
- `agent_operator.py` - Main agent runner for production agents
109+
- `demo_agents_operator.py` - Runner for simple demo agents
110+
- Database/search operators (`qdrant_operator.py`, `elasticsearch_operator.py`, `ai_search_operator.py`, `cosmosdb_operator.py`)
111+
- LLM testing operators (`azure_openai_operator.py`, `azure_ai_foundry_operator.py`, `ollama_operator.py`)
112+
- Other utilities (`dify_operator.py`, `otel_operator.py`)
94113

95114
### Agent Examples (`template_langgraph/agents/`)
96115

@@ -104,9 +123,17 @@ This project includes several agent implementations, each demonstrating differen
104123
- `news_summarizer_agent/` — Web/YouTube summarization. Scrapes content, summarizes to `StructuredArticle`, and notifies. Key: fan-out subtasks, notifier/scraper/summarizer plugins.
105124
- `image_classifier_agent/` — Vision classification. Classifies local images and notifies results. Key: LLM-based image classification, parallel subtasks.
106125

126+
#### Demo Agents (`template_langgraph/agents/demo_agents/`)
127+
128+
Additional simple agents for learning and demonstration:
129+
130+
- `weather_agent.py` — Simple tool-calling agent. Basic ReAct pattern with mock weather search tool. Key: tool calling, basic agent pattern.
131+
- `multi_agent.py` — Multi-agent coordination. Demonstrates agent-to-agent handoff using transfer functions. Key: agent coordination, workflow transfer.
132+
- `parallel_processor_agent/` — Task decomposition with parallel execution. Breaks down goals into tasks and processes them in parallel. Key: parallel processing, task decomposition, Send operations.
133+
107134
### Supporting Modules
108135

109-
- `template_langgraph/llms/`: LLM wrappers (Azure OpenAI, etc.)
136+
- `template_langgraph/llms/`: LLM wrappers (Azure OpenAI, Azure AI Foundry, Ollama)
110137
- `template_langgraph/tools/`: Tool implementations used by agents
111138
- Azure AI Search (`ai_search_tool.py`)
112139
- Azure Cosmos DB Vector Search (`cosmosdb_tool.py`)
@@ -242,6 +269,32 @@ uv run python scripts/agent_operator.py image-classifier-agent \
242269
--verbose
243270
```
244271

272+
### Demo agent runs
273+
274+
- Weather agent (simple tool calling):
275+
276+
```shell
277+
uv run python scripts/demo_agents_operator.py weather-agent \
278+
--query "What's the weather in Japan?" \
279+
--verbose
280+
```
281+
282+
- Multi agent (agent coordination):
283+
284+
```shell
285+
uv run python scripts/demo_agents_operator.py multi-agent \
286+
--query "What's the weather in Tokyo?" \
287+
--verbose
288+
```
289+
290+
- Parallel processor agent (task decomposition):
291+
292+
```shell
293+
uv run python scripts/demo_agents_operator.py parallel-processor-agent \
294+
--goal "Plan information gathering strategy for launching a software company" \
295+
--verbose
296+
```
297+
245298
Makefile shortcuts are also available (e.g., `make run-chat-with-tools-agent`, `make run-issue-formatter-agent`, `make run-news-summarizer-agent`, `make run-image-classifier-agent`).
246299

247300
## Key Concepts Demonstrated
@@ -289,6 +342,11 @@ The default toolset is configured in `template_langgraph/tools/common.py` and in
289342
- `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_API_VERSION`
290343
- `AZURE_OPENAI_MODEL_CHAT`, `AZURE_OPENAI_MODEL_EMBEDDING`, `AZURE_OPENAI_MODEL_REASONING`
291344
- Optional Entra ID auth: `AZURE_OPENAI_USE_MICROSOFT_ENTRA_ID=true`
345+
- Azure AI Foundry
346+
- `AZURE_AI_FOUNDRY_INFERENCE_ENDPOINT`, `AZURE_AI_FOUNDRY_INFERENCE_API_VERSION`
347+
- `AZURE_AI_FOUNDRY_INFERENCE_MODEL_CHAT`
348+
- Ollama (local)
349+
- `OLLAMA_MODEL_CHAT`
292350
- Azure AI Search
293351
- `AI_SEARCH_ENDPOINT`, `AI_SEARCH_KEY`, `AI_SEARCH_INDEX_NAME`
294352
- Azure Cosmos DB (vector)
@@ -321,9 +379,10 @@ make mcp-inspector
321379
## Next Steps
322380

323381
1. **Start with the basics**: Run the `kabuto_helpdesk_agent` example
324-
2. **Understand the implementation**: Compare it with `chat_with_tools_agent`
325-
3. **Explore advanced patterns**: Try the task decomposer and supervisor agents
326-
4. **Build your own**: Use this template as a starting point for your use case
382+
2. **Try demo agents**: Explore the simple patterns with `weather_agent`, `multi_agent`, and `parallel_processor_agent`
383+
3. **Understand the implementation**: Compare it with `chat_with_tools_agent`
384+
4. **Explore advanced patterns**: Try the task decomposer and supervisor agents
385+
5. **Build your own**: Use this template as a starting point for your use case
327386

328387
## Observability (optional)
329388

@@ -342,10 +401,11 @@ uv run python scripts/otel_operator.py run -q "health check" -v
342401

343402
This template demonstrates several proven agent architectures:
344403

345-
1. **Single Agent with Tools** - Basic tool-calling pattern
346-
2. **ReAct Agent** - Reasoning and acting in loops
347-
3. **Structured Output Agent** - Returning formatted data
348-
4. **Planning Agent** - Breaking down complex tasks
349-
5. **Supervisor Agent** - Coordinating multiple agents
404+
1. **Single Agent with Tools** - Basic tool-calling pattern (`weather_agent`)
405+
2. **ReAct Agent** - Reasoning and acting in loops (`kabuto_helpdesk_agent`)
406+
3. **Structured Output Agent** - Returning formatted data (`issue_formatter_agent`)
407+
4. **Planning Agent** - Breaking down complex tasks (`task_decomposer_agent`)
408+
5. **Multi-Agent Systems** - Coordinating multiple agents (`supervisor_agent`, `multi_agent`)
409+
6. **Parallel Processing** - Concurrent task execution (`parallel_processor_agent`)
350410

351411
Each pattern is implemented with clear examples and documentation to help you understand when and how to use them.

0 commit comments

Comments
 (0)