Setup
April 21, 2026 ยท View on GitHub
This page covers installation, local model config, and repository layout. Dataset download/reporting policy lives in data.md, and CLI usage lives in running.md.
Repository Layout
src/core/ GraphFlow, Edge, GraphExecutor, BaseWorkflow, node runtime
src/catalog/ Dataset registry, answer-format registry, dataset-specific format prompts
src/evaluation/ Benchmark registry and evaluation runner
src/optimizer/ Workflow pruning/quantization heuristics, graph transforms, workspace and graph IO
src/pipeline/ MCTS, pruning, quantization, finetuning
src/prompts/ Optimizer prompts, workflow template, operator catalog
src/utils/ LLM config/loading, cost tracking, code execution, workspace IO
src/utils/optimizer_utils Ranking, experience, convergence, and optimizer parsing helpers
benchmarks/ Dataset-specific benchmark runners
data/ Dataset builders and local dataset directory
config/ Example model configuration
workspace/MATHDEMO Tracked demo dataset with two example rounds
Most experiment outputs are intentionally ignored by git. The tracked workspace/MATHDEMO directory serves as a minimal runnable example.
Environment
Option 1: conda
conda create -n agentslimming python=3.11
conda activate agentslimming
pip install -r requirements.txt
Option 2: venv
python3.11 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt
Model Config
Create a local config:
cp config/config.example.yaml config/config.yaml
Minimal example:
models:
"gpt-4.1-mini":
api_type: "openai"
base_url: "<your base url>"
api_key: "<your api key>"
temperature: 0
top_p: 1
input_price: 0.0004
output_price: 0.0016
Required fields:
api_typebase_urlapi_keyorkeytemperatureinput_priceoutput_price
Defaults:
model: defaults to the enclosing model entry name if omittedtop_p: defaults to1.0if omitted
There is no hardcoded pricing fallback in the code. If a workflow uses a model without input_price or output_price, execution fails early.
Config resolution order:
--config /path/to/config.yamlAGENT_SLIMMING_CONFIG=/path/to/config.yaml<repo_root>/config/config.yaml<cwd>/config/config.yaml<cwd>/config.yaml
When you run commands from the repository root, <repo_root>/config/config.yaml and <cwd>/config/config.yaml usually resolve to the same file.
Environment Variables
AGENT_SLIMMING_CONFIG: optional override for the default model config path. Used when you do not want to pass--configon every command.AGENT_SLIMMING_LOG_LEVEL: optional log verbosity override for the repository logger. Typical values areDEBUG,INFO,WARNING, andERROR. The default isINFO.
Dataset- and benchmark-specific variables such as HF_TOKEN and AGENT_SLIMMING_LIVECODE_USE_PRIVATE_TESTS are documented in data.md.