{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/8"},{"label":"Artificial Intelligence","url":"https://skillfed.io/packages/category/scientific-engineering-artificial-intelligence/7"}],"enrichment":{"capability":"py_trees implements behaviour trees in Python, providing composable decision-making primitives (behaviours, decorators, sequences, selectors, parallels) and a blackboard for data sharing to build medium-sized decision engines.","skillfed_tags":["behavior-trees","robotics","decision-engine"],"use_cases":["Build a robot control layer that sequences sensor checks, decision logic, and motor commands using tree composites.","Implement game AI that selects actions (attack, flee, heal) based on game state stored in a shared blackboard.","Create a workflow engine where tasks are behaviours and control flow (try-catch, retry, parallel execution) is expressed as tree structure.","Visualize and debug decision logic by rendering the tree to ASCII/Unicode or exporting to dot graphs.","Define complex conditional logic declaratively in XML rather than imperative code, then parse and execute it at runtime."],"what_it_does":"py_trees is a Python library for building behaviour trees\u2014hierarchical, composable decision-making structures commonly used in robotics and game AI. It provides core primitives like behaviours (leaf nodes representing actions), decorators (wrappers that modify behaviour), composites (sequences, selectors, parallels that combine children), and a blackboard system for sharing state across the tree. Trees can be constructed programmatically or declaratively via XML, serialized to dot graphs for visualization, and rendered in the terminal.\n\nThe library is designed for medium-sized decision engines where you need to orchestrate complex conditional logic and state management without writing deeply nested if-else chains. It includes a library of ready-made behaviours and idioms, plus tools for introspection and debugging. Recent versions add typed input/output ports for behaviours and a ForEach decorator for iteration patterns.","worth_installing":"Yes. py_trees is actively maintained, has low install friction, carries no known vulnerabilities, and offers a clean abstraction for hierarchical decision-making. Install it if you are building a robotics system, game AI, or any medium-complexity state machine that benefits from tree-structured control flow and shared state management."},"id":"py-trees","links":{"html":"https://skillfed.io/packages/py-trees","md":"https://skillfed.io/packages/py-trees.md","pypi":"https://pypi.org/project/py-trees/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-14","license_spdx":null,"license_treatment":"permissive","name":"py_trees","python_support":"unspecified","summary":"pythonic implementation of behaviour trees"},"popularity":{"monthly_downloads":192161,"position":9868,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.5.0"}
