[PR #64] [CLOSED] feat: research example with openai #436

Closed
opened 2026-02-16 09:16:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/64
Author: @WajeehGillani
Created: 8/21/2025
Status: Closed

Base: masterHead: feature/openai-example


📝 Commits (1)

  • 046e57e feat: research example with open

📊 Changes

4 files changed (+273 additions, -0 deletions)

View changed files

examples/research_openai/README.md (+78 -0)
examples/research_openai/langgraph.json (+7 -0)
examples/research_openai/requirements.txt (+7 -0)
examples/research_openai/research_agent_openai.py (+181 -0)

📄 Description

Add OpenAI Research Agent Example

What this PR does

Adds a new research agent example that mirrors the existing Anthropic-based research agent but uses OpenAI via LangChain's init_chat_model.


Changes made

  • New example folder: examples/research_openai/
  • New agent file: research_agent_openai.py — OpenAI-powered research agent with same functionality as the Anthropic version
  • Configuration: langgraph.json exposing the graph as research_openai
  • Dependencies: requirements.txt including langchain-openai
  • Documentation: Comprehensive README.md with setup instructions for macOS/Linux

Key Features

  • Uses OpenAI GPT-4o-mini instead of Claude Sonnet 4
  • Maintains identical research workflow: planning, sub-agents (research + critique), virtual filesystem
  • Same tools: Tavily search, file operations, todo management
  • Configurable model settings via init_chat_model

How to Test

  1. Navigate to the example folder:

    cd examples/research_openai/
    
  2. Set up your .env file with the following:

    OPENAI_API_KEY=your_openai_api_key
    TAVILY_API_KEY=your_tavily_api_key
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Run the agent:

    langgraph dev
    # or
    langgraph run research_openai
    

Why this is Useful

  • Provides an alternative model choice for users who prefer OpenAI
  • Demonstrates how to customize the DeepAgent framework with different LLM providers
  • Maintains feature parity with the existing research example
  • Shows the framework’s flexibility in model integration

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagents/pull/64 **Author:** [@WajeehGillani](https://github.com/WajeehGillani) **Created:** 8/21/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/openai-example` --- ### 📝 Commits (1) - [`046e57e`](https://github.com/langchain-ai/deepagents/commit/046e57e4e8d2a8f590c75eb46fa19a7dff90ac94) feat: research example with open ### 📊 Changes **4 files changed** (+273 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `examples/research_openai/README.md` (+78 -0) ➕ `examples/research_openai/langgraph.json` (+7 -0) ➕ `examples/research_openai/requirements.txt` (+7 -0) ➕ `examples/research_openai/research_agent_openai.py` (+181 -0) </details> ### 📄 Description # Add OpenAI Research Agent Example ## What this PR does Adds a new research agent example that mirrors the existing Anthropic-based research agent but uses OpenAI via LangChain's `init_chat_model`. --- ## Changes made - **New example folder:** `examples/research_openai/` - **New agent file:** `research_agent_openai.py` — OpenAI-powered research agent with same functionality as the Anthropic version - **Configuration:** `langgraph.json` exposing the graph as `research_openai` - **Dependencies:** `requirements.txt` including `langchain-openai` - **Documentation:** Comprehensive `README.md` with setup instructions for macOS/Linux --- ## Key Features - Uses **OpenAI GPT-4o-mini** instead of Claude Sonnet 4 - Maintains **identical research workflow**: planning, sub-agents (research + critique), virtual filesystem - Same tools: **Tavily search**, file operations, todo management - **Configurable model settings** via `init_chat_model` --- ## How to Test 1. Navigate to the example folder: ```bash cd examples/research_openai/ ``` 2. Set up your `.env` file with the following: ```env OPENAI_API_KEY=your_openai_api_key TAVILY_API_KEY=your_tavily_api_key ``` 3. Install dependencies: ```bash pip install -r requirements.txt ``` 4. Run the agent: ```bash langgraph dev # or langgraph run research_openai ``` --- ## Why this is Useful - Provides an **alternative model choice** for users who prefer OpenAI - Demonstrates how to **customize** the DeepAgent framework with different LLM providers - Maintains **feature parity** with the existing research example - Shows the framework’s **flexibility** in model integration --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 09:16:01 -05:00
yindo closed this issue 2026-02-16 09:16:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#436