4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenManusの動作分析と挙動解説

Posted at

OpenManusとは

OpenManusは、MetaGPTチームのメンバーによって開発されたオープンソースのAIエージェントシステムです。READMEによると、このプロジェクトは「Manusは素晴らしいが、OpenManusは招待コードなしにどんなアイデアも実現できる」というコンセプトで作られています。わずか3時間でプロトタイプが立ち上げられたという迅速な開発が特徴で、シンプルな実装ながらも強力な機能を提供しています。

開発チームは@mannaandpoem@XiangJinyu@MoshiQAQ@didiforgithub@Xinyu Zhangらで、MetaGPTプロジェクトからの貢献者です。また、イリノイ大学アーバナ・シャンペーン校の研究者とコラボレーションしたOpenManus-RLという強化学習ベースのLLMエージェントチューニング方法にも取り組んでいます。

動作の仕組み

OpenManusの動作の流れを分析しました。

1. 起動と指示入力

PS C:\Prj\OpenManus-JP> python main.py
INFO     [browser_use] BrowserUse logging setup complete with level info
INFO     [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.
Enter your prompt (or 'exit'/'quit' to quit): Appleの株の情報を取得して、今後のAppleの株価について分析するために複数サイトから情報を入手して、多角的に分析してから日本語でマークダウンファイルでレポートを作成して

ユーザーはpython main.pyでOpenManusを起動し、日本語で「Appleの株の情報を取得して、今後のAppleの株価について分析するために複数サイトから情報を入手して、多角的に分析してから日本語でマークダウンファイルでレポートを作成して」という指示を入力しています。

2. タスク処理の開始

2025-03-10 02:28:30.434 | WARNING  | __main__:main:19 - Processing your request...
2025-03-10 02:28:30.435 | INFO     | app.agent.base:run:137 - Executing step 1/30

システムがリクエストの処理を開始し、30ステップのうちの第1ステップを実行します。このことから、OpenManusは複雑なタスクを最大30の小さなステップに分解して処理する設計になっていることがわかります。

3. 思考プロセスとツール選択

2025-03-10 02:28:31.608 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: None
2025-03-10 02:28:31.608 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 1 tools to use
2025-03-10 02:28:31.609 | INFO     | app.agent.toolcall:think:58 - 🧰 Tools being prepared: ['google_search']

エージェントは最初のステップで何をすべきかを考え、google_searchというツールを使うことを決定します。エージェントには「思考」のプロセスがあり、タスクを遂行するために必要なツールを選択する能力があります。

4. 情報収集: Google検索

2025-03-10 02:28:31.609 | INFO     | app.agent.toolcall:execute_tool:140 - 🔧 Activating tool: 'google_search'...
2025-03-10 02:28:32.157 | INFO     | app.agent.toolcall:act:113 - 🎯 Tool 'google_search' completed its mission! Result: Observed output of cmd `google_search` executed:
['https://www.forbes.com/sites/greatspeculations/2025/03/08/apple-stock-to-fall-30/', 'https://investor.apple.com/stock-price/default.aspx', 'https://finance.yahoo.com/quote/AAPL/history/', 'https://www.statmuse.com/money/ask/apple-stock-price-in-sept-2023', 'https://www.morningstar.co.uk/uk/news/260486/after-earnings-is-apple-stock-a-buy-a-sell-or-fairly-valued.aspx']

エージェントはGoogle検索を実行して、Apple株に関する情報源となるWebサイトのリストを取得しました。5つの関連URLが見つかりました。

5. Webサイトの閲覧と情報抽出

2025-03-10 02:28:36.834 | INFO     | app.agent.toolcall:think:54 - 🛠️ Manus selected 5 tools to use
2025-03-10 02:28:36.834 | INFO     | app.agent.toolcall:think:58 - 🧰 Tools being prepared: ['browser_use', 'browser_use', 'browser_use', 'browser_use', 'browser_use']

次に、エージェントは5つのbrowser_useツールを選択し、見つかったURLにアクセスして情報を収集します。最初のURLへのアクセスはタイムアウトになりましたが、残りのURLにはアクセスできました:

2025-03-10 02:29:07.405 | INFO     | app.agent.toolcall:act:113 - 🎯 Tool 'browser_use' completed its mission! Result: Observed output of cmd `browser_use` executed:
Error: Browser action 'new_tab' failed: Page.goto: Timeout 30000ms exceeded.
Call log:
  - navigating to "https://www.forbes.com/sites/greatspeculations/2025/03/08/apple-stock-to-fall-30/", waiting until "load"

2025-03-10 02:29:12.190 | INFO     | app.agent.toolcall:act:113 - 🎯 Tool 'browser_use' completed its mission! Result: Observed output of cmd `browser_use` executed:
Opened new tab with URL https://investor.apple.com/stock-price/default.aspx

特に、Morningstarのサイトから詳細なApple株の分析情報を取得できました。この情報には、Appleの公正価値推定額、モーニングスター評価、経済的堀、不確実性評価などが含まれています。

6. レポート作成と保存

2025-03-10 02:29:52.413 | INFO     | app.agent.toolcall:execute_tool:140 - 🔧 Activating tool: 'file_saver'...
2025-03-10 02:29:52.415 | INFO     | app.agent.toolcall:act:113 - 🎯 Tool 'file_saver' completed its mission! Result: Observed output of cmd `file_saver` executed:
Content successfully saved to Apple_Stock_Analysis_Report.md

エージェントは収集した情報を分析し、マークダウン形式のレポートを作成してApple_Stock_Analysis_Report.mdというファイルに保存しました。

7. タスク完了と終了

最後に、エージェントは自身の思考をまとめ、タスクを完了したと判断します:

2025-03-10 02:29:57.475 | INFO     | app.agent.toolcall:think:53 - ✨ Manus's thoughts: The task of gathering and analyzing information about Apple's stock has been completed. Here's a summary of the steps taken and the results:

1. **Information Retrieval**: I performed a Google search to find relevant articles and analyses about Apple's stock. This included sources like Morningstar and Yahoo Finance.

2. **Data Extraction**: I accessed multiple websites to extract detailed information about Apple's stock performance, financial metrics, and future outlook.

3. **Report Creation**: I compiled the gathered information into a comprehensive markdown report, summarizing key insights such as Apple's fair value estimate, economic moat, and potential risks.

4. **File Saving**: The report was saved as a markdown file named `Apple_Stock_Analysis_Report.md`.

その後、エージェントはterminateツールを使用してプロセスを終了しました。

OpenManusの特徴と機能

ログファイルの分析から、OpenManusの主な特徴と機能は以下のようにまとめられます:

  1. 自然言語理解: 日本語で入力された複雑な指示を理解し、実行計画に変換できる
  2. タスク分解: 複雑なタスクを小さなステップに分解し、順番に実行する
  3. ツール使用: Google検索、ウェブブラウジング、ファイル保存などの様々なツールを状況に応じて使用できる
  4. 思考プロセス: タスクについて考え、最適な戦略を決定する能力を持つ
  5. マルチステップの計画: 30ステップまでの長期的なタスク実行計画をサポート
  6. 情報統合: 複数のソースから情報を収集し、一貫性のあるレポートにまとめる
  7. ファイル生成: マークダウンファイルなどの成果物を作成して保存する

まとめ

OpenManusは、複雑なタスクを自動化するための強力なAIエージェントシステムです。シンプルな実装ながらも、ウェブ検索、情報抽出、コンテンツ生成など、幅広いタスクを処理できます。特に、自然言語での指示理解、複数のツールの組み合わせによるタスク実行、そして思考プロセスを持つことで、より柔軟で高度なタスク処理が可能になっています。

インストールが簡単で、GitHubリポジトリから入手でき、様々なLLM APIと連携することができます。開発チームはコミュニティからのフィードバックを受け入れ、今後のロードマップでは計画能力の強化、評価指標の導入、モデル適応の拡大などの機能が予定されています。

日本語での指示にも対応している点からも、グローバルな利用を視野に入れた設計になっていることが窺えます。

リポジトリ

4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?