mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-20 15:11:09 +00:00
Refactor DeerFlow to use Gateway's LangGraph-compatible API
- Updated documentation and comments to reflect the transition from LangGraph Server to Gateway. - Changed default URLs in ChannelManager and tests to point to Gateway. - Removed references to LangGraph Server in deployment scripts and configurations. - Updated Nginx configuration to route API traffic to Gateway. - Adjusted frontend configurations to utilize Gateway's API. - Removed LangGraph service from Docker Compose files, consolidating services under Gateway. - Added regression tests to ensure Gateway integration works as expected. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+11
-34
@@ -148,18 +148,15 @@ init() {
|
||||
}
|
||||
|
||||
# Start Docker development environment
|
||||
# Usage: start [--gateway]
|
||||
start() {
|
||||
local sandbox_mode
|
||||
local services
|
||||
local gateway_mode=false
|
||||
|
||||
# Check for --gateway flag
|
||||
for arg in "$@"; do
|
||||
if [ "$arg" = "--gateway" ]; then
|
||||
gateway_mode=true
|
||||
fi
|
||||
done
|
||||
if [ "$#" -gt 0 ]; then
|
||||
echo -e "${YELLOW}Unknown option for start: $1${NC}"
|
||||
echo "Usage: $0 start"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "=========================================="
|
||||
echo " Starting DeerFlow Docker Development"
|
||||
@@ -168,21 +165,12 @@ start() {
|
||||
|
||||
sandbox_mode="$(detect_sandbox_mode)"
|
||||
|
||||
if $gateway_mode; then
|
||||
services="frontend gateway nginx"
|
||||
if [ "$sandbox_mode" = "provisioner" ]; then
|
||||
services="frontend gateway provisioner nginx"
|
||||
fi
|
||||
else
|
||||
services="frontend gateway langgraph nginx"
|
||||
if [ "$sandbox_mode" = "provisioner" ]; then
|
||||
services="frontend gateway langgraph provisioner nginx"
|
||||
fi
|
||||
services="frontend gateway nginx"
|
||||
if [ "$sandbox_mode" = "provisioner" ]; then
|
||||
services="frontend gateway provisioner nginx"
|
||||
fi
|
||||
|
||||
if $gateway_mode; then
|
||||
echo -e "${BLUE}Runtime: Gateway mode (experimental) — no LangGraph container${NC}"
|
||||
fi
|
||||
echo -e "${BLUE}Runtime: Gateway embedded agent runtime${NC}"
|
||||
echo -e "${BLUE}Detected sandbox mode: $sandbox_mode${NC}"
|
||||
if [ "$sandbox_mode" = "provisioner" ]; then
|
||||
echo -e "${BLUE}Provisioner enabled (Kubernetes mode).${NC}"
|
||||
@@ -232,12 +220,6 @@ start() {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set nginx routing for gateway mode (envsubst in nginx container)
|
||||
if $gateway_mode; then
|
||||
export LANGGRAPH_UPSTREAM=gateway:8001
|
||||
export LANGGRAPH_REWRITE=/api/
|
||||
fi
|
||||
|
||||
echo "Building and starting containers..."
|
||||
cd "$DOCKER_DIR" && $COMPOSE_CMD up --build -d --remove-orphans $services
|
||||
echo ""
|
||||
@@ -247,12 +229,8 @@ start() {
|
||||
echo ""
|
||||
echo " 🌐 Application: http://localhost:2026"
|
||||
echo " 📡 API Gateway: http://localhost:2026/api/*"
|
||||
if $gateway_mode; then
|
||||
echo " 🤖 Runtime: Gateway embedded"
|
||||
echo " API: /api/langgraph/* → Gateway (compat)"
|
||||
else
|
||||
echo " 🤖 LangGraph: http://localhost:2026/api/langgraph/*"
|
||||
fi
|
||||
echo " 🤖 Runtime: Gateway embedded"
|
||||
echo " API: /api/langgraph/* → Gateway"
|
||||
echo ""
|
||||
echo " 📋 View logs: make docker-logs"
|
||||
echo " 🛑 Stop: make docker-stop"
|
||||
@@ -332,7 +310,6 @@ help() {
|
||||
echo "Commands:"
|
||||
echo " init - Pull the sandbox image (speeds up first Pod startup)"
|
||||
echo " start - Start Docker services (auto-detects sandbox mode from config.yaml)"
|
||||
echo " start --gateway - Start without LangGraph container (Gateway mode, experimental)"
|
||||
echo " restart - Restart all running Docker services"
|
||||
echo " logs [option] - View Docker development logs"
|
||||
echo " --frontend View frontend logs only"
|
||||
|
||||
Reference in New Issue
Block a user