Files
chatgpt-on-wechat/docs/ja/intro/architecture.mdx
2026-03-18 19:13:39 +09:00

78 lines
3.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: アーキテクチャ
description: CowAgent 2.0 のシステムアーキテクチャとコア設計
---
CowAgent 2.0 は、シンプルなチャットボットから、自律的な思考、タスク計画、長期記憶、Skill の拡張性を備えた Agent アーキテクチャのスーパーインテリジェントアシスタントへと進化しました。
## システムアーキテクチャ
CowAgent のアーキテクチャは以下のコアモジュールで構成されています:
<img src="https://cdn.link-ai.tech/doc/68ef7b212c6f791e0e74314b912149f9-sz_5847990.png" alt="CowAgent Architecture" />
### コアモジュール
| モジュール | 説明 |
| --- | --- |
| **Channels** | メッセージの受信と送信を行うメッセージチャネル層。Web、Feishu飛書、DingTalk釘釘、WeCom企業微信、WeChat公式アカウントなどをサポート |
| **Agent Core** | タスク計画、記憶システム、Skill エンジンを含む Agent エンジン |
| **Tools** | Agent が OS リソースにアクセスするためのツール層。10 以上の組み込みツール |
| **Models** | 主要な LLM への統一アクセスを提供するモデル層 |
## Agent モードのワークフロー
Agent モードが有効な場合、CowAgent は以下のワークフローで自律的な Agent として動作します:
1. **メッセージ受信** — チャネルを通じてユーザーの入力を受信
2. **意図の理解** — タスク要件とコンテキストを分析
3. **タスク計画** — 複雑なタスクを複数のステップに分解
4. **ツール呼び出し** — 各ステップに適切なツールを選択・実行
5. **記憶の更新** — 重要な情報を長期記憶に保存
6. **結果の返却** — 実行結果をユーザーに送信
## ワークスペースのディレクトリ構成
Agent のワークスペースはデフォルトで `~/cow` にあり、システムプロンプト、記憶ファイル、Skill ファイルを格納しています:
```
~/cow/
├── system.md # Agent システムプロンプト
├── user.md # ユーザープロフィール
├── memory/ # 長期記憶ストレージ
│ ├── core.md # コアメモリ
│ └── daily/ # デイリーメモリ
└── skills/ # カスタム Skill
├── skill-1/
└── skill-2/
```
シークレットキーはセキュリティのため `~/.cow` ディレクトリに別途保存されます:
```
~/.cow/
└── .env # Skill 用のシークレットキー
```
## コア設定
`config.json` で Agent モードのパラメータを設定します:
```json
{
"agent": true,
"agent_workspace": "~/cow",
"agent_max_context_tokens": 40000,
"agent_max_context_turns": 30,
"agent_max_steps": 15
}
```
| パラメータ | 説明 | デフォルト値 |
| --- | --- | --- |
| `agent` | Agent モードの有効化 | `true` |
| `agent_workspace` | ワークスペースのパス | `~/cow` |
| `agent_max_context_tokens` | 最大コンテキストトークン数 | `40000` |
| `agent_max_context_turns` | 最大コンテキストターン数 | `30` |
| `agent_max_steps` | タスクあたりの最大判断ステップ数 | `15` |