# コード例 SDK のさまざまなサンプル実装については、[リポジトリ](https://github.com/openai/openai-agents-python/tree/main/examples) のコード例セクションをご覧ください。これらのコード例は、異なるパターンや機能を示すいくつかのカテゴリーに整理されています。 ## カテゴリー - **[agent_patterns](https://github.com/openai/openai-agents-python/tree/main/examples/agent_patterns):** このカテゴリーのコード例では、よく使われるエージェント設計パターンを紹介しています。 - 決定論的なワークフロー - ツールとしてのエージェント - エージェントの並列実行 - **[basic](https://github.com/openai/openai-agents-python/tree/main/examples/basic):** これらのコード例では、SDK の基本的な機能を紹介しています。 - 動的なシステムプロンプト - ストリーミング出力 - ライフサイクルイベント - **[tool examples](https://github.com/openai/openai-agents-python/tree/main/examples/tools):** OpenAI がホストするツール(Web 検索やファイル検索など)の実装方法や、それらをエージェントに統合する方法を学べます。 - **[model providers](https://github.com/openai/openai-agents-python/tree/main/examples/model_providers):** OpenAI 以外のモデルを SDK で利用する方法を紹介しています。 - **[handoffs](https://github.com/openai/openai-agents-python/tree/main/examples/handoffs):** エージェントのハンドオフの実践的なコード例をご覧いただけます。 - **[mcp](https://github.com/openai/openai-agents-python/tree/main/examples/mcp):** Model context protocol (MCP) を使ったエージェントの構築方法を学べます。 - **[customer_service](https://github.com/openai/openai-agents-python/tree/main/examples/customer_service)** および **[research_bot](https://github.com/openai/openai-agents-python/tree/main/examples/research_bot):** 実際のユースケースを示す、より発展的な 2 つのコード例です。 - **customer_service**: 航空会社向けカスタマーサービスシステムの例。 - **research_bot**: シンプルなディープリサーチクローン。 - **[voice](https://github.com/openai/openai-agents-python/tree/main/examples/voice):** TTS および STT モデルを利用した音声エージェントのコード例をご覧いただけます。