{"id":44425,"library":"brax","title":"Brax","description":"A differentiable physics engine written in JAX, used for robot locomotion, reinforcement learning, and simulation-based research. Current version: 0.14.2. Released under Apache 2.0, with updates approximately every 2-3 months.","status":"active","version":"0.14.2","language":"python","source_language":"en","source_url":"https://github.com/google/brax","tags":["physics","simulation","reinforcement-learning","jax"],"install":[{"cmd":"pip install brax","lang":"bash","label":"Default install"},{"cmd":"pip install brax[gpu]","lang":"bash","label":"With GPU support"}],"dependencies":[{"reason":"Core dependency for differentiable physics","package":"jax","optional":false},{"reason":"JAX backend","package":"jaxlib","optional":false},{"reason":"Neural network library for RL policies","package":"flax","optional":true},{"reason":"Optimizer for training","package":"optax","optional":true}],"imports":[{"note":"","wrong":"","symbol":"brax","correct":"import brax"},{"note":"","wrong":"","symbol":"Pipelines (env wrapper)","correct":"from brax.io import json"},{"note":"","wrong":"","symbol":"Environments","correct":"from brax.envs import create_environment"}],"quickstart":{"code":"import brax\nfrom brax import envs\nimport jax\n\nenv = envs.create_environment('ant', batch_size=8)\nstate = env.reset(rng=jax.random.PRNGKey(0))\nprint(state.obs.shape)","lang":"python","description":"Creates an Ant environment in Brax with batching."},"warnings":[{"fix":"Replace `env = brax.envs.env('ant')` with `env = brax.envs.create_environment('ant')`.","message":"Brax 0.10+ removed the `env` function from `brax.envs`. Use `create_environment` instead.","severity":"breaking","affected_versions":">=0.10"},{"fix":"Upgrade Python to 3.11+.","message":"Brax 0.14 dropped support for Python <3.11. Ensure Python 3.11 or later.","severity":"breaking","affected_versions":">=0.14"},{"fix":"Use `create_environment('ant', batch_size=None)` for unbatched.","message":"Brax environments return batches by default. For single-environment simulation, set `batch_size=None` (or omit).","severity":"gotcha","affected_versions":"all"},{"fix":"Set environment variable: `JAX_PLATFORM_NAME=cpu`","message":"The `jax.config.update('jax_platform_name', 'cpu')` pattern is discouraged. Use `JAX_PLATFORM_NAME=cpu` environment variable.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"search_vec":"'-3':32 '0.14.2':22 '2':31 '2.0':26 'apach':25 'approxim':29 'base':18 'brax':1 'current':20 'differenti':3 'engin':5 'everi':30 'jax':8,39 'learn':14,38 'locomot':12 'month':33 'physic':4,34 'reinforc':13,37 'reinforcement-learn':36 'releas':23 'research':19 'robot':11 'simul':17,35 'simulation-bas':16 'updat':28 'use':9 'version':21 'written':6","created_at":"2026-06-07T12:50:04.797048+00:00","updated_at":"2026-06-07T12:50:04.797048+00:00","problems":[{"fix":"Upgrade brax: `pip install --upgrade brax`","cause":"Brax version <0.10 had different module structure, or install is outdated.","error":"ModuleNotFoundError: No module named 'brax.envs'"},{"fix":"Use `env = brax.envs.create_environment('humanoid')`","cause":"Trying to use `env = brax.envs.env('humanoid')` which is removed in 0.10+.","error":"AssertionError: Pipeline is not a valid Brax environment"},{"fix":"Ensure `batch_size` matches between environment creation and state objects.","cause":"Passing a batch of states to a non-batched environment or vice versa.","error":"ValueError: The batch shape is not compatible with the environment"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"http://github.com/google/brax","github":"http://github.com/google/brax","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}