OpenThoughts-Agent is a research toolkit providing the recipes and infrastructure needed to train small, high-capability agent models. It offers comprehensive support for high-throughput data generation (Datagen), supervised fine-tuning (SFT), and reinforcement learning (RL). The system uses a modular HPC launcher to connect code directly with high-performance compute clusters, bypassing rigid integrations by using customizable generation scripts and training configurations compatible with Llama Factory, vLLM, and Harbor. Harbor manages containerized tool deployment across diverse HPC environments, enabling remote container runtimes without requiring a workflow re-architecture.
conda, mamba, or a similar manager.pip install .
OpenThoughts-Agent has a broad dependency footprint. Using a fast package manager like uv is recommended to maintain environment stability.
pip install .[datagen]
pip install .[datagen,datagen-swesmith]
git submodule update --init --recursive sft/llamafactory
[sft] extension.cd sft/llamafactory
pip install -e .[train,liger-kernel,deepspeed] # Select components as required
cd -
Training configurations are located in sft/lf_configs/**. Refer to sft/llamafactory/README.md for parameter details and dependency requirements.
Dataset tool documentation is available in data/README.md. After installing the datagen extension, specific generators may require additional dependencies.
Several launch modes compile CUDA/C++ extensions (such as flash-infer, flash-attn, and triton) on the fly. The build process is sensitive to compiler and CUDA versions. Ensure your toolchain matches the PyTorch CUDA version, which you can verify with:
python - <<<'import torch; print(torch.version.cuda)'
module load gcc/14.2.0
module load cuda/12.8
singularity shell --nv \
--bind $SCRATCH/ot-agent \
$SCRATCH/cuda-img/cuda-cudnn-12.8-ubuntu22.sif
mamba install -c conda-forge c-compiler cxx-compiler -y
mamba install -c conda-forge gcc_linux-64 gxx_linux-64 sysroot_linux-64 -y
mamba install -c conda-forge libstdcxx-ng=12 libgcc-ng=12 gcc_impl_linux-64 \
gxx_impl_linux-64 sysroot_linux-64 -y
GCC_ROOT="$(dirname "$(dirname "$(which gcc)")")"
export CUDA_HOME=/usr/local/cuda
export CPATH="$CUDA_HOME/include${CPATH:+:$CPATH}"
export LIBRARY_PATH="$CUDA_HOME/lib64${LIBRARY_PATH:+:$LIBRARY_PATH}"
export LD_LIBRARY_PATH="$GCC_ROOT/lib64:$GCC_ROOT/lib:$CUDA_HOME/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export PATH="$CUDA_HOME/bin${PATH:+:$PATH}"
flash-attn often require manual compilation. Install these last.UV_COMPILE_THREADS=4 MAX_JOBS=4 NVCC_THREADS=4 TORCH_CUDA_ARCH_LIST="9.0" \
pip install -v --no-build-isolation "flash-attn==2.8.1"
Most scripts require credentials—including Hugging Face tokens, Daytona keys, W&B API keys, or Supabase credentials. Store these in a private .env file excluded from version control and point the system to it:
export DC_AGENT_SECRET_ENV=/secure/path/to/my_dc_agent_secrets.env
The file should contain standard exports (e.g., export HF_TOKEN=...). Launchers and helper scripts reference the DC_AGENT_SECRET_ENV variable.
hpc/README.md and use hpc/dotenv/tacc.env as a base.source hpc/dotenv/<your-cluster>.env
eval "$DCFT_ACTIVATE_ENV"
cd "$DCFT"
data/.... The script must implement the BaseDataGenerator class (see data/generation/base.py for reference).python -m hpc.launch \
--job_type datagen \
--datagen_script data/<dataset>/generate.py \
--datagen_target_repo <org/dataset-tasks> \
--datagen_engine vllm_local \
--datagen_extra_args "--stage both --limit 200" \
--experiments_dir "$DCFT/experiments" \
--time_limit 12:00:00
--enable_trace_gen \
--trace_target_repo <org/dataset-traces> \
--trace_harbor_config path/to/harbor_job.yaml
sbatch scripts and configurations under $experiments_dir. Use --dry_run to verify the setup before submission.git submodule update --init --remote sft/llamafactory
cd sft/llamafactory
pip install -e .[train,liger-kernel,deepspeed]
cd -
sft/lf_configs.python -m hpc.launch \
--job_type train \
--train_config_path sft/lf_configs/<path-to-config>.yaml \
--dataset <org/dataset> \
--num_nodes 8 \
--time_limit 24:00:00 \
--experiments_dir "$DCFT/experiments"
--train_extra_args. The launcher will generate the job-specific YAML and sbatch script, submitting the job automatically.hpc/dotenv/ (e.g., my_cluster.env). Define the following:DCFT: Path to the OpenThoughts-Agent directory.DCFT_ACTIVATE_ENV: Command to activate the Python environment.EXPERIMENTS_DIR, DATASETS_DIR, MODELS_DIR.SIF paths for Apptainer images.HPC_NAME and related fields in the dotenv or pass them as arguments (e.g., --account, --partition, --gpus_per_node).hpc/sbatch_data/. Use placeholders like {time_limit}, {job_name}, and {experiments_dir}, which the launcher populates during execution.hpc/sbatch_data_requirements.json to enable validation.python -m hpc.launch \
--job_type datagen \
--datagen_script data/<dataset>/generate.py \
--datagen_target_repo test-org/test-dataset \
--experiments_dir "$DCFT/experiments" \
--dry_run
hpc/hpc.py or modify hpc/launch.py. The JURECA/JUWELS implementation is a useful reference for complex network configurations.
Wan2.2-Animate: Local Setup Guide for Image-to-Video and Character Consistency
withoutbg: Free Local & API-Based AI Background Removal Tool
VibeVoice: Long-Form Multi-Speaker TTS for Natural Dialogue Generation
Eigent: Multi-Agent Workflow Desktop App with CAMEL and MCP
Strapi Setup Guide: Local Development & Cloud Deployment
Agentic-Trading: Multi-Agent Simulator with A2A Protocol and ADK
Turn Google Gemini CLI Into a Standard API Proxy for Any OpenAI Client
AI-Powered Stock Research Generator with Automated Financial Charting
CodeIndexer: Semantic Code Search for IDEs (AI-Powered)
Graph-Code: Query Your Codebase via Natural Language with LLM-Powered RAG
DeerFlow: Modular Multi-Agent Research With LangGraph and MCP
MM-Wiki: A Lightweight Enterprise Wiki & Team Collaboration Tool