Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Agentic AIとMCPを利用したサービス作成入門

Agentic AIとMCPを利用したサービス作成入門

Manusによる生成

Avatar for MIKIO KUBO

MIKIO KUBO

May 27, 2025
Tweet

More Decks by MIKIO KUBO

Other Decks in Research

Transcript

  1. 目次 1. イントロダクション Agentic AIとMCPの概要 本スライドの目的と対象者 2. Agentic AI の基礎

    Agentic AIとは何か 従来のAIとの違い アーキテクチャと動作原理
  2. 目次(続き) 3. MCP (Model Context Protocol) の基礎 MCPとは何か MCPの目的と利点 アーキテクチャと主要コンポーネント

    4. Python による実装準備 環境構築 必要なライブラリのインストール 基本的な設定
  3. 目次(続き) 7. Agentic AI とMCP の連携 連携の基本概念 連携のメリット 実装例 8.

    実用的なユースケース カスタマーサービス アプリケーション開発 データ分析と意思決定支援 9. まとめと次のステップ
  4. Agentic AI とMCP の概要 Agentic AI (エージェンティックAI ) 自律的に行動し、目標達成のために複数のステップを実行できるAIシステム 人間の指示を理解し、適切なアクションを取ることができる

    複雑な問題解決や意思決定を支援 MCP (Model Context Protocol) AIモデルとデータソース・ツールを接続するための標準プロトコル 異なるシステム間でのデータやコンテキストの共有を容易にする AIアプリケーション開発を効率化する「USB-C」のような役割
  5. アーキテクチャと動作原理 基本アーキテクチャ 1. 知覚(Perception ): 環境やユーザー入力からの情報収集 2. 理解(Understanding ): 収集した情報の解釈と理解

    3. 計画(Planning ): 目標達成のための行動計画の作成 4. 実行(Execution ): 計画に基づいたアクションの実行 5. 学習(Learning ): 結果からのフィードバックと改善
  6. MCP の重要性 なぜMCP が重要か 1. 標準化: 異なるAIシステム間の連携を容易にする 2. 相互運用性: 様々なデータソースやツールとの連携

    3. 効率化: 開発時間とコストの削減 4. セキュリティ: データ保護のベストプラクティスを組み込み 5. 柔軟性: ベンダーロックインの回避
  7. MCP の主要コンポーネント(続き) MCP サーバー 標準化されたModel Context Protocolを通じて特定の機能を公開する軽量プログ ラム リソース、ツール、プロンプトなどを提供 データソース

    ローカルデータソース: コンピューターのファイル、データベース、サービス リモートサービス: インターネット経由で利用可能な外部システム(API等)
  8. 環境構築 必要なもの Python 3.8以上 pip(Pythonパッケージマネージャー) 仮想環境(venv, conda, uvなど) 推奨ツール Visual

    Studio Code(コードエディタ) Git(バージョン管理) Jupyter Notebook(実験と学習)
  9. 環境構築手順 1. Python のインストール # Ubuntuの場合 sudo apt update sudo

    apt install python3 python3-pip # macOSの場合(Homebrewを使用) brew install python # Windowsの場合 # python.orgからインストーラーをダウンロード
  10. 環境構築手順(続き) 2. 仮想環境の作成 # venvを使用する場合 python -m venv agentic_ai_env source

    agentic_ai_env/bin/activate # Linuxの場合 agentic_ai_env\Scripts\activate # Windowsの場合 # uvを使用する場合(推奨) pip install uv uv init agentic_ai_project cd agentic_ai_project
  11. 必要なライブラリのインストール MCP のインストール # uvを使用する場合(推奨) uv add "mcp[cli]" # pipを使用する場合

    pip install "mcp[cli]" その他の有用なライブラリ # uvを使用する場合 uv add httpx pydantic fastapi # pipを使用する場合 pip install httpx pydantic fastapi
  12. 基本的な設定 プロジェクト構造の作成 agentic_ai_project/ ├── src/ │ ├── __init__.py │ ├──

    agent.py # Agentic AI実装 │ ├── mcp_server.py # MCPサーバー実装 │ └── integration.py # 連携実装 ├── tests/ │ ├── __init__.py │ └── test_agent.py ├── examples/ │ ├── simple_agent.py │ └── simple_mcp.py ├── requirements.txt └── README.md
  13. 基本的な設定(続き) requirements.txt の作成 mcp[cli]>=1.9.0 httpx>=0.24.0 pydantic>=2.0.0 fastapi>=0.100.0 README.md の作成 #

    Agentic AI & MCP Project Agentic AIとMCPを利用したサービスの実装例。 ## インストール方法 ...
  14. シンプルなAI エージェントの作成 基本的なエージェントクラス # src/agent.py from typing import List, Dict,

    Any, Optional class SimpleAgent: def __init__(self, name: str, capabilities: List[str]): self.name = name self.capabilities = capabilities self.memory = [] def perceive(self, input_data: Any) -> None: """環境からの入力を処理""" self.memory.append(input_data) def think(self) -> Dict[str, Any]: """入力に基づいて推論""" # 簡単な実装例 return {"thoughts": f"Processing input as {self.name}"}
  15. シンプルなAI エージェントの作成(続き) # src/agent.py(続き) def plan(self) -> List[Dict[str, Any]]: """行動計画を作成"""

    # 簡単な実装例 return [ {"action": "analyze", "params": {"data": self.memory[-1]}}, {"action": "respond", "params": {"message": "計画的な応答"}} ] def act(self, plan: Optional[List[Dict[str, Any]]] = None) -> Dict[str, Any]: """計画に基づいて行動""" if plan is None: plan = self.plan() results = [] for step in plan: # 実際には各アクションの実装が必要 results.append(f"Executed {step['action']}") return {"results": results}
  16. シンプルなAI エージェントの作成(続き) エージェントの使用例 # examples/simple_agent.py from src.agent import SimpleAgent #

    エージェントの作成 assistant = SimpleAgent( name="HelperAgent", capabilities=["text_analysis", "response_generation"] ) # エージェントの使用 assistant.perceive("こんにちは、天気を教えてください") thoughts = assistant.think() plan = assistant.plan() result = assistant.act(plan) print(f"思考: {thoughts}") print(f"計画: {plan}")
  17. エージェントの機能拡張 LLM を活用したエージェント # src/llm_agent.py import httpx from typing import

    List, Dict, Any, Optional class LLMAgent: def __init__(self, name: str, api_key: str, api_url: str): self.name = name self.api_key = api_key self.api_url = api_url self.memory = [] self.conversation_history = [] async def get_llm_response(self, prompt: str) -> str: """LLM APIを呼び出して応答を取得""" headers = {"Authorization": f"Bearer {self.api_key}"} data = {"prompt": prompt, "max_tokens": 500} async with httpx.AsyncClient() as client: response = await client.post(self.api_url, json=data, headers=headers)
  18. エージェントの機能拡張(続き) # src/llm_agent.py(続き) async def perceive(self, input_data: str) -> None:

    """ユーザー入力を処理""" self.memory.append(input_data) self.conversation_history.append({"role": "user", "content": input_data}) async def think(self) -> Dict[str, Any]: """LLMを使用して推論""" conversation = "\n".join([ f"{msg['role']}: {msg['content']}" for msg in self.conversation_history ]) thinking_prompt = f""" 以下は会話の履歴です: {conversation} あなたは{self.name}として、次にどのように対応すべきか考えてください。 思考プロセス: """ thoughts = await self.get_llm_response(thinking_prompt) return {"thoughts": thoughts}
  19. エージェントの機能拡張(続き) # src/llm_agent.py(続き) async def plan(self) -> List[Dict[str, Any]]: """LLMを使用して計画を立てる"""

    thoughts = await self.think() planning_prompt = f""" 思考プロセス: {thoughts['thoughts']} 上記の思考に基づいて、具体的な行動計画をJSON形式で作成してください。 例: [{"action": "search", "params": {"query": "天気 東京"}}] 行動計画: """ plan_text = await self.get_llm_response(planning_prompt) # 実際の実装ではJSON解析とバリデーションが必要 import json try: return json.loads(plan_text) except: return [{"action": "respond", "params": {"message": "計画の作成に失敗しました"}}]
  20. エージェントの機能拡張(続き) # src/llm_agent.py(続き) async def act(self, plan: Optional[List[Dict[str, Any]]] =

    None) -> Dict[str, Any]: """計画に基づいて行動""" if plan is None: plan = await self.plan() results = [] for step in plan: action = step["action"] params = step.get("params", {}) if action == "respond": message = params.get("message", "応答内容がありません") self.conversation_history.append({"role": "assistant", "content": message}) results.append({"type": "response", "content": message}) elif action == "search": # 検索機能の実装(実際にはAPIを呼び出すなど) query = params.get("query", "") results.append({"type": "search", "query": query, "results": f"{query}の検索結果"}) # 他のアクションタイプも同様に実装 return {"results": results}
  21. エージェント間の連携 マルチエージェントシステム # src/multi_agent_system.py from typing import List, Dict, Any

    from src.agent import SimpleAgent class MultiAgentSystem: def __init__(self, agents: List[SimpleAgent]): self.agents = agents self.coordinator = None def set_coordinator(self, coordinator: SimpleAgent): """コーディネーターエージェントを設定""" self.coordinator = coordinator async def process_task(self, task: str) -> Dict[str, Any]: """タスクを処理するためにエージェント間で協力""" if self.coordinator is None: raise ValueError("コーディネーターが設定されていません") # コーディネーターがタスクを分析
  22. エージェント間の連携(続き) # src/multi_agent_system.py(続き) # タスクを適切なエージェントに割り当て assignments = [] for agent

    in self.agents: # 各エージェントの能力に基づいて割り当てを決定 # 実際の実装ではより洗練された割り当てロジックが必要 if any(capability in task.lower() for capability in agent.capabilities): assignments.append(agent) if not assignments: return {"status": "error", "message": "適切なエージェントが見つかりません"} # 割り当てられたエージェントにタスクを実行させる results = [] for agent in assignments: agent.perceive(task) agent_plan = await agent.plan() agent_result = await agent.act(agent_plan) results.append({ "agent": agent.name, "result": agent_result })
  23. エージェント間の連携(続き) # src/multi_agent_system.py(続き) # コーディネーターが結果を統合 self.coordinator.perceive(results) integration_plan = await self.coordinator.plan()

    final_result = await self.coordinator.act(integration_plan) return { "status": "success", "analysis": analysis, "agent_results": results, "integrated_result": final_result } 使用例 # 実装例は省略(後のセクションで連携の完全な例を示します)
  24. 基本的なMCP サーバーの作成 MCP サーバーの基本構造 # src/mcp_server.py from mcp.server.fastmcp import FastMCP

    # MCPサーバーの作成 mcp_server = FastMCP("SimpleDemo") # サーバーの基本情報を設定 mcp_server.set_description("シンプルなMCPサーバーのデモ") mcp_server.set_version("1.0.0")
  25. 基本的なMCP サーバーの作成(続き) サーバーの実行方法 # examples/run_mcp_server.py import asyncio from src.mcp_server import

    mcp_server async def main(): # サーバーを起動 await mcp_server.serve() if __name__ == "__main__": asyncio.run(main()) コマンドラインからの実行 # MCPのCLIツールを使用 mcp install src/mcp_server.py
  26. リソースの実装 静的リソースの実装 # src/mcp_server.py from mcp.server.fastmcp import FastMCP mcp_server =

    FastMCP("ResourceDemo") @mcp_server.resource("config://app") def get_app_config() -> str: """アプリケーション設定を取得""" return """ { "name": "DemoApp", "version": "1.0.0", "settings": { "max_items": 100, "cache_enabled": true } }
  27. リソースの実装(続き) 動的リソースの実装 # src/mcp_server.py(続き) @mcp_server.resource("users://{user_id}/profile") def get_user_profile(user_id: str) -> str:

    """ユーザープロファイルを取得""" # 実際の実装ではデータベースからユーザー情報を取得 return f""" {{ "user_id": "{user_id}", "name": "サンプルユーザー", "email": "user{user_id}@example.com", "created_at": "2025-01-01T00:00:00Z" }} """ @mcp_server.resource("weather://{city}") async def get_weather(city: str) -> str: """指定した都市の天気情報を取得""" # 実際の実装では外部APIを呼び出す import random weather_types = ["晴れ", "曇り", "雨", "雪"] temp = random.randint(0, 35) weather = random.choice(weather_types)
  28. ツールの実装 基本的なツールの実装 # src/mcp_server.py(続き) @mcp_server.tool() def add(a: int, b: int)

    -> int: """2つの数値を加算""" return a + b @mcp_server.tool() def multiply(a: int, b: int) -> int: """2つの数値を乗算""" return a * b
  29. ツールの実装(続き) より複雑なツールの実装 # src/mcp_server.py(続き) @mcp_server.tool() async def analyze_sentiment(text: str) ->

    dict: """テキストの感情分析を行う""" # 実際の実装では感情分析APIを使用 # ここではシンプルな例として、ポジティブ/ネガティブワードのカウントで代用 positive_words = ["良い", "素晴らしい", "嬉しい", "楽しい", "好き"] negative_words = ["悪い", "ひどい", "悲しい", "嫌い", "残念"] positive_count = sum(1 for word in positive_words if word in text) negative_count = sum(1 for word in negative_words if word in text) # スコアの計算(-1.0〜1.0の範囲) total = positive_count + negative_count if total == 0: score = 0.0 else: score = (positive_count - negative_count) / total return { "sentiment": "positive" if score > 0 else "negative" if score < 0 else "neutral", "score": score, "positive_count": positive_count,
  30. ツールの実装(続き) 外部API を使用するツール # src/mcp_server.py(続き) import httpx @mcp_server.tool() async def

    fetch_news(topic: str, count: int = 5) -> list: """指定したトピックに関するニュースを取得""" # 実際の実装ではニュースAPIを使用 # ここではダミーデータを返す news_items = [ { "title": f"{topic}に関する最新ニュース {i}", "source": "サンプルニュース", "published_at": "2025-05-24T12:00:00Z", "summary": f"{topic}についての詳細な記事内容がここに表示されます。" } for i in range(1, count + 1) ]
  31. ライフスパンの管理 アプリケーションのライフサイクル管理 # src/mcp_server_with_lifespan.py from contextlib import asynccontextmanager from collections.abc

    import AsyncIterator from dataclasses import dataclass from mcp.server.fastmcp import Context, FastMCP # データベース接続のシミュレーション class Database: @classmethod async def connect(cls): print("データベースに接続中...") db = cls() return db async def disconnect(self): print("データベース接続を閉じています...")
  32. ライフスパンの管理(続き) # src/mcp_server_with_lifespan.py(続き) @dataclass class AppContext: db: Database @asynccontextmanager async

    def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]: """アプリケーションのライフサイクルを型安全なコンテキストで管理""" # 起動時の初期化 db = await Database.connect() try: yield AppContext(db=db) finally: # シャットダウン時のクリーンアップ await db.disconnect() # ライフスパンをサーバーに渡す mcp_server = FastMCP("LifespanDemo", lifespan=app_lifespan)
  33. ライフスパンの管理(続き) # src/mcp_server_with_lifespan.py(続き) # 型安全なライフスパンコンテキストをツールで使用 @mcp_server.tool() def query_db(ctx: Context, sql:

    str) -> str: """データベースクエリを実行するツール""" db = ctx.request_context.lifespan_context.db return db.query(sql) # リソースでもコンテキストを使用可能 @mcp_server.resource("database://tables") def get_tables(ctx: Context) -> str: """データベースのテーブル一覧を取得""" db = ctx.request_context.lifespan_context.db return db.query("SHOW TABLES")
  34. 連携の基本概念 Agentic AI とMCP の連携とは Agentic AIがMCPを通じて外部データソースや ツールにアクセスし、より高度なタスクを実行 できるようにする仕組み 連携の主な目的

    1. AIエージェントの能力拡張 2. 外部データへのアクセス 3. 実世界のアクションの実行 4. 複雑なワークフローの自動化
  35. 連携の実装例 基本的な連携の実装 # src/integration.py from src.llm_agent import LLMAgent from mcp.client

    import MCPClient import asyncio class AgenticAIWithMCP: def __init__(self, agent: LLMAgent, mcp_server_url: str): self.agent = agent self.mcp_client = MCPClient(mcp_server_url) async def connect(self): """MCPサーバーに接続""" await self.mcp_client.connect() async def disconnect(self): """MCPサーバーとの接続を閉じる""" await self.mcp_client.disconnect()
  36. 連携の実装例(続き) # src/integration.py(続き) async def get_resource(self, resource_uri: str) -> str:

    """MCPリソースを取得""" return await self.mcp_client.get_resource(resource_uri) async def call_tool(self, tool_name: str, **params) -> Any: """MCPツールを呼び出す""" return await self.mcp_client.call_tool(tool_name, **params) async def process_task(self, task: str) -> Dict[str, Any]: """タスクを処理""" # エージェントにタスクを認識させる await self.agent.perceive(task) # エージェントに考えさせる thoughts = await self.agent.think() # エージェントに計画を立てさせる plan = await self.agent.plan()
  37. 連携の実装例(続き) # src/integration.py(続き) # 計画に基づいてMCPリソースとツールを使用 results = [] for step

    in plan: action = step["action"] params = step.get("params", {}) if action == "get_resource": resource_uri = params.get("uri", "") if resource_uri: resource_data = await self.get_resource(resource_uri) results.append({ "type": "resource", "uri": resource_uri, "data": resource_data }) elif action == "call_tool": tool_name = params.get("name", "") tool_params = params.get("params", {}) if tool_name: tool_result = await self.call_tool(tool_name, **tool_params) results.append({ "type": "tool", "name": tool_name, "params": tool_params, "result": tool_result })
  38. 連携の実装例(続き) # src/integration.py(続き) # エージェントに結果を処理させる for result in results: await

    self.agent.perceive(result) # 最終的な応答を生成 final_response = await self.agent.act() return { "task": task, "thoughts": thoughts, "plan": plan, "results": results, "response": final_response }
  39. 連携の実装例(続き) 使用例 # examples/integration_example.py import asyncio from src.llm_agent import LLMAgent

    from src.integration import AgenticAIWithMCP async def main(): # LLMエージェントの作成 agent = LLMAgent( name="AssistantAgent", api_key="your_api_key", api_url="https://api.example.com/llm" ) # 統合システムの作成 integration = AgenticAIWithMCP( agent=agent, mcp_server_url="http://localhost:8000" ) # MCPサーバーに接続 await integration.connect() try: # タスクの処理 result = await integration.process_task( "東京の天気を教えて、その後におすすめのアクティビティを提案してください" ) print("処理結果:") print(f"思考: {result['thoughts']}") print(f"計画: {result['plan']}") print(f"結果: {result['results']}") print(f"応答: {result['response']}") finally: # 接続を閉じる await integration.disconnect()
  40. 実際のユースケース例 天気情報に基づく旅行プランの提案 # examples/travel_planner.py import asyncio from src.llm_agent import LLMAgent

    from src.integration import AgenticAIWithMCP async def travel_planner_demo(): # エージェントとMCPの設定(省略) # タスクの処理 task = """ 今週末の京都の天気を調べて、天気に適した観光プランを提案してください。 以下の条件を考慮してください: - 雨の場合は屋内の観光スポットを中心に - 晴れの場合は屋外の観光スポットを中心に - 食事の提案も含めてください """ result = await integration.process_task(task) # 結果の表示(省略)
  41. カスタマーサービス 自動カスタマーサポートシステム # examples/customer_service.py from src.llm_agent import LLMAgent from src.integration

    import AgenticAIWithMCP from mcp.server.fastmcp import FastMCP # MCPサーバーの設定 support_server = FastMCP("CustomerSupport") @support_server.resource("faq://{category}") def get_faq(category: str) -> str: """カテゴリ別のFAQを取得""" faqs = { "account": "アカウント関連のFAQ...", "billing": "支払い関連のFAQ...", "product": "製品関連のFAQ..." } return faqs.get(category, "該当するFAQがありません") @support_server.tool() def create_ticket(customer_id: str, issue: str, priority: str) -> dict: """サポートチケットを作成""" ticket_id = f"TKT-{hash(customer_id + issue) % 10000:04d}" return { "ticket_id": ticket_id, "status": "created",
  42. カスタマーサービス(続き) # examples/customer_service.py(続き) @support_server.tool() def check_account_status(customer_id: str) -> dict: """顧客アカウントの状態を確認"""

    # 実際の実装ではデータベースから情報を取得 return { "customer_id": customer_id, "status": "active", "subscription": "premium", "last_login": "2025-05-20T14:30:00Z" } # エージェントとの連携コード(省略) # 実際の実装では、顧客の問い合わせを受け取り、 # 適切なFAQを提供したり、必要に応じてチケットを作成したりする
  43. アプリケーション開発 コード生成と最適化 # examples/code_assistant.py from src.llm_agent import LLMAgent from src.integration

    import AgenticAIWithMCP from mcp.server.fastmcp import FastMCP # MCPサーバーの設定 code_server = FastMCP("CodeAssistant") @code_server.resource("docs://{language}/{topic}") def get_documentation(language: str, topic: str) -> str: """プログラミング言語とトピックに関するドキュメントを取得""" # 実際の実装では外部APIやローカルデータベースからドキュメントを取得 return f"{language}の{topic}に関するドキュメント..." @code_server.tool() def analyze_code(code: str) -> dict: """コードを分析し、問題点や最適化の提案を行う""" # 実際の実装では静的解析ツールを使用 return { "issues": ["変数名が不明確", "未使用の変数がある"],
  44. アプリケーション開発(続き) # examples/code_assistant.py(続き) @code_server.tool() def generate_test(code: str, test_framework: str =

    "pytest") -> str: """コードに対するテストケースを生成""" # 実際の実装ではLLMを使用してテストを生成 return f""" def test_functionality(): # {test_framework}を使用したテストコード assert function_name(input) == expected_output """ @code_server.tool() def refactor_code(code: str, goal: str) -> str: """指定された目標に基づいてコードをリファクタリング""" # 実際の実装ではLLMを使用してリファクタリングを行う return f"# リファクタリングされたコード\n# 目標: {goal}\n{code.replace('old', 'new')}" # エージェントとの連携コード(省略)
  45. データ分析と意思決定支援 ビジネスインテリジェンスアシスタント # examples/business_intelligence.py import pandas as pd import matplotlib.pyplot

    as plt import io import base64 from mcp.server.fastmcp import FastMCP # MCPサーバーの設定 bi_server = FastMCP("BusinessIntelligence") @bi_server.resource("sales://{period}") def get_sales_data(period: str) -> str: """期間ごとの売上データを取得""" # 実際の実装ではデータベースからデータを取得 if period == "daily": return "日次売上データ..." elif period == "weekly": return "週次売上データ..." elif period == "monthly": return "月次売上データ..."
  46. データ分析と意思決定支援(続き) # examples/business_intelligence.py(続き) @bi_server.tool() def analyze_trends(data: str, metric: str) ->

    dict: """データのトレンドを分析""" # 実際の実装ではデータ分析ライブラリを使用 return { "trend": "上昇傾向", "growth_rate": "15%", "key_factors": ["新製品の導入", "マーケティングキャンペーン"] } @bi_server.tool() def generate_chart(data: str, chart_type: str) -> str: """データからチャートを生成""" # サンプルデータの作成(実際の実装ではデータを解析して使用) df = pd.DataFrame({ 'Month': ['Jan', 'Feb', 'Mar', 'Apr', 'May'], 'Sales': [100, 120, 140, 130, 150] }) # チャートの作成 plt.figure(figsize=(10, 6)) if chart_type == "bar": df.plot(kind='bar', x='Month', y='Sales') elif chart_type == "line": df.plot(kind='line', x='Month', y='Sales') else: return "サポートされていないチャートタイプです" plt.title('Monthly Sales') plt.ylabel('Sales (in thousands)') # 画像をBase64エンコード buffer = io.BytesIO() plt.savefig(buffer, format='png') buffer.seek(0) image_base64 = base64.b64encode(buffer.read()).decode('utf-8') return f"data:image/png;base64,{image_base64}"
  47. データ分析と意思決定支援(続き) # examples/business_intelligence.py(続き) @bi_server.tool() def forecast(data: str, periods: int) ->

    dict: """将来の予測を行う""" # 実際の実装では時系列予測モデルを使用 return { "forecast": [160, 170, 175], "confidence_interval": { "lower": [150, 155, 160], "upper": [170, 185, 190] }, "accuracy": "85%" } @bi_server.tool() def generate_report(analysis: dict, charts: list, recommendations: list) -> str: """分析結果からレポートを生成""" # 実際の実装ではテンプレートエンジンを使用 return f""" # ビジネス分析レポート ## トレンド分析 {analysis['trend']} ## 予測 今後の見通し: {analysis.get('forecast', '予測なし')} ## 推奨アクション {', '.join(recommendations)} """ # エージェントとの連携コード(省略)
  48. 本スライドのまとめ 学んだこと Agentic AIの基本概念と特徴 MCP (Model Context Protocol)の目的と仕組み Pythonを使ったAgentic AIの実装方法

    MCPサーバーの作成と設定 Agentic AIとMCPの連携方法 実用的なユースケースと実装例 重要なポイント Agentic AIは自律的に行動し、複雑なタスクを実行できる MCPは標準化されたプロトコルでAIとデータ/ツールを接続 両者の連携により、強力なAIサービスを構築可能
  49. 次のステップ スキルの向上 1. より複雑なAgentic AIシステムの実装 2. 高度なMCPサーバーの開発 3. 実際のビジネス課題への適用 探求すべき関連技術

    LangChain, AutoGPT, BabyAGIなどのフレームワーク ベクトルデータベースと埋め込み マルチモーダルAIの統合
  50. 用語集 Agentic AI: 自律的に行動し、目標達成のために複数のステップを実行できるAIシステ ム MCP (Model Context Protocol): AIモデルとデータソース・ツールを接続するための

    標準プロトコル LLM (Large Language Model): GPT-4、Claude、Llamaなどの大規模言語モデル リソース (Resource): MCPにおいて、データを提供するためのエンドポイント ツール (Tool): MCPにおいて、アクションを実行するためのエンドポイント エージェント (Agent): 特定の目標を達成するために自律的に行動するAIシステム