behaviortrees
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Fail
- child_process — Shell command execution capability in apps/editor-classic/gulpfile.js
- rimraf — Recursive directory removal in apps/editor-classic/gulpfile.js
- fs module — File system access in apps/editor-classic/gulpfile.js
- rimraf — Recursive directory removal in apps/editor-classic/package.json
- exec() — Shell command execution in apps/editor-classic/src/app/app.js
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Visual editor for behavior trees — behaviortrees.com
Behavior Trees Editor

A free, open-source visual editor for behavior trees, live at behaviortrees.com. Model AI for games, robotics, and simulations, then export to an open JSON format you can load with any behavior3-compatible library.
Originally based on behavior3editor by Renato de Pontes Pereira, since rebuilt as a modern React editor on the Nocturne design system and extended with a guides site. The original AngularJS editor lives on at old.behaviortrees.com.
MCP server and CLI
This repo also contains an MCP (Model Context Protocol) server for behavior trees, so AI assistants like Claude can write a tree, check it, and hand you a link that opens it in the editor. Its source is in packages/cli and it's built on the official MCP TypeScript SDK (@modelcontextprotocol/sdk). The tools are registered in packages/cli/src/mcp.ts, and the Streamable HTTP transport is in src/http.ts.
| MCP tool | What it does |
|---|---|
validate_tree |
Checks a behavior3 JSON or BehaviorTree.CPP XML tree for structural errors: dangling children, nodes with two parents, cycles, decorators with more than one child, leaves with children, unknown node names |
create_editor_link |
Returns a URL that opens the tree in the editor at behaviortrees.com |
convert_tree |
Converts between behavior3 JSON and BehaviorTree.CPP XML (v4 for Groot2 and ROS 2 Jazzy, v3 for Humble) |
list_node_types |
Lists the built-in behavior3 nodes |
get_example |
Returns example trees |
read_guide |
Returns the behaviortrees.com guides as Markdown |
All tools are read-only. Connect to the hosted server, or run it yourself:
- Remote (Streamable HTTP):
https://www.behaviortrees.com/mcp - Local (stdio):
npx -y behaviortrees mcp. Thebehaviortreesnpm package is also a CLI (npx behaviortrees validate tree.json) and a library. - Claude Code:
claude mcp add --transport http behaviortrees https://www.behaviortrees.com/mcp
It's listed in the official MCP Registry as io.github.behaviortrees/behaviortrees. See packages/cli/README.md for details.
What's in this repo
A pnpm + Turborepo monorepo:
| Path | What it is | Where it deploys |
|---|---|---|
apps/editor/ |
Main editor (React + TypeScript + React Flow) | behaviortrees.com |
apps/editor-classic/ |
Classic editor (AngularJS + gulp) | old.behaviortrees.com |
apps/site/ |
Guides and articles (Astro) | behaviortrees.com/learn |
packages/cli/ |
behaviortrees MCP server, CLI and library |
npm, and behaviortrees.com/mcp |
packages/examples/ |
Shared example trees consumed by both editors | bundled into both editors |
apps/editor-classic is intentionally not a workspace member — its gulp 3 toolchain keeps its own npm lockfile. Never run pnpm inside it.
Features
- Custom nodes: create your own node types in any of the four basic categories — composite, decorator, action, or condition
- Node properties: edit titles, descriptions, and custom properties per node instance
- Manual and auto layout: drag nodes around, or press
ato auto-organize the whole tree - Multiple trees per project: create and manage as many trees as you need
- JSON import/export: an open format that works with any behavior3-compatible runtime
- BehaviorTree.CPP XML import/export: v4 and v3, including Groot2 and ROS 2 Nav2 trees
- Shareable links: Copy link puts the whole tree in a URL that opens it in the editor
- No lock-in: runs in the browser, no accounts, no external tools or engines required
Development
git clone https://github.com/behaviortrees/behaviortrees.git
cd behaviortrees
pnpm install
pnpm dev --filter @behaviortrees/editor # React editor (Vite)
pnpm dev --filter @behaviortrees/site # guides site (Astro)
pnpm build # build editor + site via Turborepo
pnpm test # editor test suite
Classic editor
Uses Node <= 22 (see .nvmrc) and its own npm toolchain:
pnpm build:classic # npm install + bower install + gulp build, from the repo root
# or, inside apps/editor-classic:
npm install --ignore-scripts
npx bower install
gulp serve # live reload at http://127.0.0.1:8000
Deployment
The React editor deploys to behaviortrees.com through apps/editor/vercel.json (Vercel root directory: apps/editor); its build also bundles the guides site so /learn is served from the same deploy. build-deploy.sh builds the classic editor and the guides site, merging both into deploy/ as the static site Netlify serves at old.behaviortrees.com (via netlify.toml).
License
- The classic editor and repo root are MIT — see LICENSE, © 2014 Renato de Pontes Pereira.
- The React editor (
apps/editor/) is AGPL-3.0 © Alan Hoskins, with portions derived from the MIT original — see apps/editor/LICENSE and apps/editor/LICENSE-MIT.
Credit to the original behavior3 team for the editor this project grew from.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found