Installation
ToolBrain is designed to be lightweight and modular. You can start with a minimal installation and add features as you need them. We recommend using pip and a virtual environment for installation.
1. Standard Installation
This is the recommended starting point. It installs the core toolbrain library, which is CPU-compatible and allows you to explore the main APIs and run basic examples.
pip install toolbrain2. GPU-Accelerated Training (Recommended for Performance)
To unlock the full power of ToolBrain, including significant speed improvements and memory savings via Unsloth and QLoRA, we highly recommend installing with the [unsloth] extra. This is essential for training larger models or working with long context windows.
⚠️ Note:
This requires an NVIDIA GPU with CUDA support.
pip install "toolbrain[unsloth]"3. Installation for Running Examples
Our repository includes a rich set of examples to help you get started. We offer two options for installing the necessary dependencies.
3.1. For Basic Examples (CPU/Mac Compatible)
To run simple examples and generate plots, install the [examples-base] extra. This includes libraries like pandas and matplotlib.
pip install "toolbrain[examples-base]"3.2. For All Examples (GPU Required)
To run all examples, including the advanced, high-performance use cases like the Email Search Agent, install the [examples-full] extra. This includes all base example dependencies plus Unsloth for GPU acceleration.
pip install "toolbrain[examples-full]"4. Full Development Setup
If you wish to contribute to ToolBrain or install all possible dependencies, you should first clone the repository and then install the library in editable mode with the [all] extra.
# 1. Clone the repository
git clone https://github.com/your-repo/ToolBrain.git
cd ToolBrain
# 2. Install in editable mode with all extras
pip install -e ".[all]"Installation Options Summary
| Installation Type | Command | Use Case |
|---|---|---|
| Standard | pip install toolbrain | Basic usage, CPU training |
| GPU-Accelerated | pip install "toolbrain[unsloth]" | High-performance training |
| Basic Examples | pip install "toolbrain[examples-base]" | Run simple examples |
| All Examples | pip install "toolbrain[examples-full]" | Run all examples with GPU |
| Development | pip install -e ".[all]" | Contributing, full features |
Verify Your Installation
After installation, verify that ToolBrain is working correctly:
# Quick verification test
import toolbrain
print(f"ToolBrain version: {toolbrain.__version__}")
# Test basic functionality
from toolbrain import Brain
brain = Brain()
print("✅ ToolBrain installed and working correctly!")🚀 Ready to Explore the Code?
Great! ToolBrain is now installed. Check out the source code, examples, and contribute to the project on GitHub.