[Objective] In the eel(Monopterus albus) farming system used in feed distribution research of mechanical arm, the challenges included slow path planning speeds, excessive trajectory redundancy, and suboptimal obstacle avoidance success rates within confined operational spaces. To mitigate these issues, an improved path planning algorithm, based on the bidirectional rapidly-exploring random tree star (BI-RRT*) algorithm, was proposed. The primary aim was to significantly enhance the motion efficiency and task success rate of robotic arms operating in complex, constrained environments. [Methods] This research developed a hybrid path planning algorithm, building upon the foundational BI-RRT* algorithm. This novel approach integrated an adaptive goal-biased strategy with an enhanced artificial potential field (APF) method. The algorithm's framework comprised three core components: a high-quality sampling strategy, an efficient search strategy, and a path optimization algorithm. For the high-quality sampling strategy, an adaptive goal-biased approach was introduced to overcome the limitations of inefficient random sampling and slow convergence rates characteristic of traditional BI-RRT algorithms in complex environments. This strategy dynamically adjusted the generation of sampling points, moving beyond purely random selection. Instead, it prioritized sampling regions in the vicinity of the target, guided by the target direction and a predefined bias probability. This mechanism substantially augmented the growth propensity of the search tree towards the target area, effectively reducing the stochasticity of random sampling and consequently accelerating the path search process. For the efficient search strategy, an improved APF concept was incorporated into the node expansion process. This integration aimed to further enhance search efficiency and prevent the algorithm from converging to local optima. Traditional APF methods were prone to generating local minima when navigating complex obstacle environments, often leading to path planning failures. To address this, the APF was refined to achieve superior integration with the BI-RRT framework. During each new node expansion, in addition to considering the inherent random exploration characteristics of BI-RRT, a directional attractive field was superimposed. This attractive field not only originated from the ultimate target point but also factored in the current growth orientation of the search tree and localized environmental information. Specifically, a composite attractive function was devised, which synergized the attractive force exerted by the target point on the current node with the attraction from potential "guide points". Concurrently, the computation of the repulsive field was optimized to more precisely delineate the geometry and proximity of obstacles, thereby circumventing common issues such as "oscillation" and "deadlock" prevalent in traditional APF. Through this methodology, the algorithm was able to more effectively steer the search tree to circumvent obstacles and rapidly converge towards the target region, significantly bolstering the directedness of the search and successfully preventing the algorithm from becoming ensnared in suboptimal local solutions. For the path optimization algorithm, following the generation of an initial feasible path, a greedy optimization strategy was employed for path pruning and smoothing. This was executed to yield an optimal path characterized by reduced length, enhanced smoothness, and improved conformity with the kinematic properties of the robotic arm. Path pruning was initially applied to eliminate redundant nodes; if a collision-free direct connection existed between two non-adjacent nodes, intermediate nodes were excised, thereby substantially abbreviating the path length. Subsequently, path smoothing techniques, such as B-spline curves or cubic spline interpolation, were introduced. These techniques facilitated the insertion of smooth curves between the pruned key nodes, thereby eradicating sharp angular turns within the path. This enabled the robotic arm to execute movements with greater stability and efficiency during actual operation, mitigating impact and vibration. This two-stage optimization procedure ensured that the final generated path was not merely feasible but also optimal across metrics of length, smoothness, and motion efficiency. [Results and Discussion] To comprehensively validate the performance of the proposed algorithm, a two-stage experimental verification was conducted. Initially, comparative simulations were performed in both two-dimensional (2D) and three-dimensional (3D) environments utilizing the MATLAB platform. These simulation scenarios were meticulously engineered to encompass three archetypal environments—simple, complex, and narrow passages—thereby emulating the diverse obstacle configurations potentially encountered in industrialized eel (Monopterus albus) aquaculture. The results unequivocally demonstrated that, concerning both path planning speed and quality, the improved BI-RRT* algorithm significantly surpassed RRT, APF-RRT, and traditional BI-RRT algorithms across all tested environments. These simulation outcomes robustly substantiated the theoretical superiority and inherent robustness of the improved BI-RRT* algorithm proposed in this study across varying complex environments. To further ascertain the engineering applicability and practical potential of the algorithm, an eel (Monopterus albus) feeding robotic arm simulation system was meticulously constructed based on the robot operating system (ROS) and MoveIt frameworks. This system precisely emulated the kinematics, dynamics, and obstacle distribution pertinent to an industrialized eel (Monopterus albus) aquaculture environment. During simulated continuous feeding tasks, the improved BI-RRT* algorithm consistently exhibited impressive and outstanding performance. Its average running time was merely 2.1 s, representing a substantial 41.6% reduction compared to the traditional BI-RRT. The average length of the planned path was recorded at only 1 680 mm, with an average of 180 nodes, indicating a significant reduction in path redundancy. Furthermore, the algorithm achieved an impressive obstacle avoidance success rate of 96% in complex confined spaces. These empirical findings not only validated the algorithm's effectiveness but also underscored its immense potential for practical engineering applications. The discussion section of this study also provided an in-depth analysis of the differential performance of the algorithm across various scenarios and explored prospective avenues for future optimization, such as its adaptability in dynamic obstacle environments and its potential for integration with advanced visual sensing systems. [Conclusions] The experimental results conclusively demonstrated that the improved BI-RRT* algorithm significantly enhanced the path planning efficiency and trajectory quality of robotic arms operating within confined spaces. It also exhibited exceptionally high reliability in obstacle avoidance, thereby effectively addressing the automated feeding requirements of industrialized eel (*Monopterus albus*) aquaculture. The algorithmic framework possessed considerable generality, offering valuable theoretical insights and technical precedents for resolving analogous robotic arm path planning challenges in other agricultural automation contexts.