# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
  worker-rag-agent:
    image: opea/agent:latest
    container_name: rag-agent-endpoint
    volumes:
      - ${TOOLSET_PATH}:/home/user/tools/
    ports:
      - "9095:9095"
    ipc: host
    environment:
      ip_address: ${ip_address}
      strategy: rag_agent
      recursion_limit: ${recursion_limit_worker}
      llm_engine: openai
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      model: ${model}
      temperature: ${temperature}
      max_new_tokens: ${max_new_tokens}
      stream: false
      tools: /home/user/tools/worker_agent_tools.yaml
      require_human_feedback: false
      RETRIEVAL_TOOL_URL: ${RETRIEVAL_TOOL_URL}
      no_proxy: ${no_proxy}
      http_proxy: ${http_proxy}
      https_proxy: ${https_proxy}
      LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
      LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
      LANGCHAIN_PROJECT: "opea-worker-agent-service"
      port: 9095


  supervisor-react-agent:
    image: opea/agent:latest
    container_name: react-agent-endpoint
    depends_on:
      - worker-rag-agent
    volumes:
      - ${TOOLSET_PATH}:/home/user/tools/
    ports:
      - "9090:9090"
    ipc: host
    environment:
      ip_address: ${ip_address}
      strategy: react_langgraph
      recursion_limit: ${recursion_limit_supervisor}
      llm_engine: openai
      OPENAI_API_KEY: ${OPENAI_API_KEY}
      model: ${model}
      temperature: ${temperature}
      max_new_tokens: ${max_new_tokens}
      stream: false
      tools: /home/user/tools/supervisor_agent_tools.yaml
      require_human_feedback: false
      no_proxy: ${no_proxy}
      http_proxy: ${http_proxy}
      https_proxy: ${https_proxy}
      LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
      LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
      LANGCHAIN_PROJECT: "opea-supervisor-agent-service"
      CRAG_SERVER: $CRAG_SERVER
      WORKER_AGENT_URL: $WORKER_AGENT_URL
      port: 9090
