Skip to content

Commit 5113beb

Browse files
committed
Revert "Transit DeepResearchAgent implementation"
This reverts commit 30852c7.
1 parent 30852c7 commit 5113beb

File tree

17 files changed

+144
-968
lines changed

17 files changed

+144
-968
lines changed

ChatQnA/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ services:
109109
NUM_CARDS: ${NUM_CARDS}
110110
HF_HUB_OFFLINE: ${HF_HUB_OFFLINE:-0}
111111
VLLM_TORCH_PROFILER_DIR: "/mnt"
112-
VLLM_SKIP_WARMUP: true
113112
healthcheck:
114113
test: ["CMD-SHELL", "curl -f http://localhost:80/health || exit 1"]
115114
interval: 10s

DeepResearchAgent/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ ARG IMAGE_REPO=opea
55
ARG BASE_TAG=latest
66
FROM opea/comps-base:$BASE_TAG
77

8-
COPY ./research_agents $HOME/research_agents
8+
COPY ./deep_researcher.yaml $HOME/deep_researcher.yaml
9+
COPY ./utils.py $HOME/utils.py
910
COPY ./requirements.txt $HOME/requirements.txt
10-
COPY ./agent_factory.py $HOME/agent_factory.py
1111
COPY ./research_agent.py $HOME/research_agent.py
1212

1313
USER root

DeepResearchAgent/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ Deep Research Agents are a new class of autonomous AI systems designed to perfor
44

55
## Overview
66

7-
In this application, we leverage the deep research agent implementation of [langchain-ai/deepagents](https://github.com/langchain-ai/deepagents), and deploy it on the Intel platform with opea microserice.
7+
In this application, we leverage the deep research agent implementation of [langchain-ai/open_deep_research](https://github.com/langchain-ai/open_deep_research), and deploy it on the Intel platform with opea microserice.
88

9+
![Architecture Overview](assets/img/opea-deep-research-agent.png)
910

1011
## Setup Deployment Environment
1112

12-
```shell
13+
```
14+
# Configure deep_researcher.yaml with your llm model served by the vllm
15+
1316
# get your TAVILY_API_KEY from https://app.tavily.com/
1417
export TAVILY_API_KEY=""
15-
1618
# get your HuggingFace Access Token from https://huggingface.co/docs/transformers.js/en/guides/private#step-1-generating-a-user-access-token
1719
export HF_TOKEN=""
1820
@@ -29,8 +31,9 @@ source ./set_env.sh
2931

3032
To deploy the Deep Research Agent services, execute the docker compose up command with the appropriate arguments. For a default deployment, execute:
3133

32-
```shell
34+
```
3335
docker compose -f docker_compose/intel/hpu/gaudi/compose.yaml up -d
36+
3437
```
3538

3639
## Validate Microservice

DeepResearchAgent/agent_factory.py

Lines changed: 0 additions & 68 deletions
This file was deleted.
52.8 KB
Loading
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
agent:
5+
type: langchain_deep_researcher
6+
search_api: "tavily"
7+
planner_provider: "openai"
8+
planner_model: "meta-llama/Llama-3.3-70B-Instruct"
9+
writer_provider: "openai"
10+
writer_model: "meta-llama/Llama-3.3-70B-Instruct"
11+
max_search_depth: 2

DeepResearchAgent/docker_compose/intel/hpu/gaudi/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
cap_add:
4646
- SYS_NICE
4747
ipc: host
48-
command: --model ${LLM_MODEL_ID} --tensor-parallel-size ${NUM_CARDS} --enable-auto-tool-choice --tool-call-parser llama3_json --host 0.0.0.0 --port 8000 --max-seq-len-to-capture $MAX_LEN
48+
command: --model ${LLM_MODEL_ID} --tensor-parallel-size ${NUM_CARDS} --host 0.0.0.0 --port 8000 --max-seq-len-to-capture $MAX_LEN
4949

5050
deep-research-agent-server:
5151
image: ${REGISTRY:-opea}/deep-research-agent:${TAG:-latest}

DeepResearchAgent/docker_compose/intel/hpu/gaudi/set_env.sh

Lines changed: 18 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -3,102 +3,45 @@
33
# Copyright (C) 2024 Intel Corporation
44
# SPDX-License-Identifier: Apache-2.0
55

6-
# ==============================================================================
7-
# Environment Configuration for DeepResearchAgent on Intel Gaudi HPU
8-
# ==============================================================================
9-
10-
# Get the directory where this script is located
6+
# Navigate to the parent directory and source the environment
117
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
128

13-
# Source the parent environment configuration file
149
pushd "$SCRIPT_DIR/../../../../../" > /dev/null
1510
source .set_env.sh
1611
popd > /dev/null
1712

18-
# ------------------------------------------------------------------------------
19-
# Helper Functions
20-
# ------------------------------------------------------------------------------
21-
22-
# Validates that a required environment variable is set
13+
# Function to check if a variable is set
2314
check_var() {
2415
local var_name="$1"
2516
local var_value="${!var_name}"
2617
if [ -z "${var_value}" ]; then
2718
echo "Error: ${var_name} is not set. Please set ${var_name}."
28-
return 1 # Return error but don't exit to allow other checks to run
19+
return 1 # Return an error code but do not exit the script
2920
fi
3021
}
3122

32-
# ------------------------------------------------------------------------------
33-
# Validate Required API Keys
34-
# ------------------------------------------------------------------------------
35-
36-
check_var "HF_TOKEN" # HuggingFace token for model access
37-
check_var "TAVILY_API_KEY" # Tavily API key for web search functionality
38-
39-
# ------------------------------------------------------------------------------
40-
# Network Configuration
41-
# ------------------------------------------------------------------------------
42-
43-
# Detect the primary IP address of the host machine
23+
# Check critical variables
24+
check_var "HF_TOKEN"
4425
export ip_address=$(hostname -I | awk '{print $1}')
45-
export HOST_IP=${ip_address}
4626

47-
# Update proxy settings to include the host IP
48-
export no_proxy=${no_proxy},${ip_address}
49-
export http_proxy=${http_proxy}
50-
export https_proxy=${https_proxy}
51-
52-
# ------------------------------------------------------------------------------
53-
# vLLM Service Configuration
54-
# ------------------------------------------------------------------------------
55-
56-
# Port where vLLM service will be accessible
27+
# VLLM configuration
5728
export VLLM_PORT="${VLLM_PORT:-8000}"
58-
59-
# ------------------------------------------------------------------------------
60-
# Language Model Configuration
61-
# ------------------------------------------------------------------------------
62-
63-
# LLM model to use for the Deep Research Agent
64-
# See supported models and tool call parsers at:
65-
# https://docs.vllm.ai/en/stable/features/tool_calling/#automatic-function-calling
29+
export VLLM_VOLUME="${VLLM_VOLUME:-/data2/huggingface}"
30+
export VLLM_IMAGE="${VLLM_IMAGE:-opea/vllm-gaudi:latest}"
6631
export LLM_MODEL_ID="${LLM_MODEL_ID:-meta-llama/Llama-3.3-70B-Instruct}"
67-
68-
# Parser for handling function/tool calls (must match the model)
69-
export TOOL_CALL_PARSER="${TOOL_CALL_PARSER:-llama3_json}"
70-
71-
# Maximum sequence length for model context (131072 = ~128K tokens)
7232
export MAX_LEN="${MAX_LEN:-131072}"
73-
74-
# Number of Gaudi accelerator cards to use
7533
export NUM_CARDS="${NUM_CARDS:-4}"
76-
77-
# Directory for caching HuggingFace models
7834
export HF_CACHE_DIR="${HF_CACHE_DIR:-"./data"}"
35+
export OPENAI_BASE_URL="http://${ip_address}:8000/v1"
36+
export OPENAI_API_KEY="empty"
37+
export no_proxy=${no_proxy}
38+
export http_proxy=${http_proxy}
39+
export https_proxy=${https_proxy}
7940

80-
# OpenAI-compatible API endpoint URL for vLLM
81-
export OPENAI_BASE_URL="http://${ip_address}:${VLLM_PORT}/v1"
82-
83-
# ------------------------------------------------------------------------------
84-
# API Keys and Authentication
85-
# ------------------------------------------------------------------------------
86-
87-
export HF_TOKEN="${HF_TOKEN}" # HuggingFace authentication token
88-
export OPENAI_API_KEY="empty-api-key" # Placeholder for vLLM compatibility
89-
export TAVILY_API_KEY="${TAVILY_API_KEY}" # Tavily search API key
90-
91-
# ------------------------------------------------------------------------------
92-
# Deep Research Agent Configuration
93-
# ------------------------------------------------------------------------------
94-
95-
# Maximum number of research units that can run concurrently
96-
export MAX_CONCURRENT_RESEARCH_UNITS="${MAX_CONCURRENT_RESEARCH_UNITS:-3}"
9741

98-
# Maximum iterations per researcher before stopping
99-
export MAX_RESEARCHER_ITERATIONS="${MAX_RESEARCHER_ITERATIONS:-3}"
42+
# Hugging Face API token
43+
export HF_TOKEN="${HF_TOKEN}"
10044

101-
# Custom instructions for agent behavior (leave empty for defaults)
102-
export RESEARCHER_INSTRUCTIONS="" # Instructions for individual researchers
103-
export RESEARCH_WORKFLOW_INSTRUCTIONS="" # Instructions for overall research workflow
104-
export SUBAGENT_DELEGATION_INSTRUCTIONS="" # Instructions for task delegation between agents
45+
# API keys
46+
check_var "TAVILY_API_KEY"
47+
export TAVILY_API_KEY="${TAVILY_API_KEY}"

DeepResearchAgent/requirements.in

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)