This release is a pre-release and may not be stable for production use.
clabe runs behavior experiments. You write a session as a list of Python steps: choose the animal, load its training stage and the rig's configuration, check the hardware, start Bonsai and Open Ephys, hand the data off. clabe runs those steps on the rig and asks the experimenter for what it needs, in the terminal or in a browser.
Each step is a function, and its parameters name the earlier steps it uses. That wiring is what makes going back cheap: if the experimenter changes the rig configuration halfway through, only the steps that depend on it run again. A step that fails can be retried, and steps that must never run twice, such as registering the session, lock everything before them.
Prompts are declared once and answered anywhere. The same question appears in the terminal on the rig, in a browser on a phone in the corridor, and to an AI agent through MCP; the first valid answer is kept. Forms are built from your Pydantic models and validated wherever they are filled in.
Every session leaves a record next to its data: each prompt and answer, each step's inputs and outputs, every command
it ran, the configuration it used, the repository's commit and lockfile, and the machine. clabe replay runs a
session again from that record.
When you have more than one rig, a small daemon on each PC lets you start experiments from a browser, and an optional hub shows every rig, every session in progress and every run waiting for an answer on one page.
Example
# main.py
from clabe import checks, steps, ui
from clabe.launcher import Launcher
from clabe.workflow import Workflow, concurrently
wf = Workflow("vr-foraging")
wf.step(steps.session()) # the experimenter and the animal
@wf.step
def trials() -> float:
return ui.number("Trials", minimum=1, maximum=500)
wf.step(steps.review("session", "trials", back_to="session"))
wf.step(steps.preflight(checks.free_space(200e9))) # reports every failed check at once
wf.step(steps.register()) # creates the session folder; the steps above are locked from here on
@wf.step(title="Acquire", cancellable=True)
async def acquire(launcher: Launcher, trials: float) -> dict:
async with open_ephys_recording(): # records while the apps run
return await concurrently(behavior=run_bonsai, fip=run_fip)
uv run clabe run # runs main.py in this terminal and serves it in the browser
uv run clabe shortcut # puts a desktop icon on the rig that does the same
Try it
From a checkout of this repository, with uv installed:
powershell -ExecutionPolicy ByPass -File scripts/demo-local.ps1
This runs examples/demo/main.py, a one-minute session that you can answer in the terminal
or in the browser tab it opens. scripts/demo.ps1 runs the same session with a daemon and a hub, and needs Docker.
Install
uv add "aind-clabe[frontend]" # in an experiment repository
uv add "aind-clabe[aind-services]" # AIND data schema, data transfer and watchdog
uv add "aind-clabe[otel]" # sending logs to OpenTelemetry
uv add "aind-clabe[agents]" # the MCP server (clabe mcp)
The frontend extra adds the terminal UI and the browser page (and the web server the daemon and the hub run on).
Without it, clabe asks its questions as plain console prompts and the rest works the same.
To install the daemon on a rig PC, see Deploy a rig.
Documentation
The documentation starts with a tutorial that builds a first workflow, then covers reusable steps, running on two PCs, deploying rigs, migrating an existing experiment, and the API. examples/behavior_launcher.py is a complete workflow to start from.
Development
git clone https://github.com/AllenNeuralDynamics/clabe.git && cd clabe
uv sync
uv run pytest
uv run ruff check
uv run docs/build.py && uv run zensical serve # the documentation, from the docs dependency group
The web UI in ui-web/ is a Blazor app. uv run python scripts/build_web.py builds it into
src/clabe/server/static, and uv run python scripts/openapi.py regenerates its models from the APIs (a test fails
when they are out of date).
Metadata
Release files for aind-clabe 0.18.0rc6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aind_clabe-0.18.0rc6.tar.gz | 3.5 MB | Without provenance | Details for aind_clabe-0.18.0rc6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aind_clabe-0.18.0rc6-py3-none-any.whl | Python 3 | none | any | Details for aind_clabe-0.18.0rc6-py3-none-any.whl |
Total release size: 7.0 MB
Release files / aind_clabe-0.18.0rc6.tar.gz
| Download URL | aind_clabe-0.18.0rc6.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f96c3fce4ab28d6e742365a458b56202611f03646a3b8c3a770ed39d4951a87b
|
|
BLAKE2b-256 checksum How to use checksums |
1b72565e05c81b6d8201b9fd60412afe6386b947443533368e1ab71e890948b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / aind_clabe-0.18.0rc6-py3-none-any.whl
| Download URL | aind_clabe-0.18.0rc6-py3-none-any.whl |
|---|---|
| Size | 3.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c909e482a3cacf2e9af1ae37ee63a754660e8efe306446572cb3fd4d9dc6fe16
|
|
BLAKE2b-256 checksum How to use checksums |
0d938e9bfc311612d50d9262efc343a2f8b61ba1708414dc38f02599a5d85196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for aind-clabe 0.18.0rc6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.