.loom.toml files and environment variables. Configuration is loaded at startup and can be customized per-project.
Configuration File
Loom looks for a.loom.toml file in your project directory. If found, it merges your settings with the built-in defaults.
Location
Place.loom.toml in your project root:
Configuration Options
Model Configuration
Control which LLM models Loom uses for different tasks:Model Roles
- default - Primary model for the agent loop. Handles reasoning, planning, and tool execution.
- weak - Faster, cheaper model for simple tasks like commit message generation and summarization.
- architect - Strong model used in Architect Mode for planning edits.
- editor - Fast model used in Architect Mode for executing the plan.
Permission Configuration
Control which tools can run without asking for permission:.loom.toml
Available Tool Names
file_read- Reading file contentsfile_write- Creating or overwriting filesfile_edit- Modifying existing filesfile_search- Glob pattern file searchescontent_search- Regex searches in file contentsdirectory_list- Listing directory contentsshell- Running shell commandsgit- Git operationsdecision_log- Logging decisions to the graphdecision_query- Querying the decision graphsub_agent- Spawning read-only search agents
Context Configuration
Control token budget allocation for different context types:.loom.toml
Understanding Token Budgets
Loom manages context window size by allocating token budgets:Calculate Available Tokens
Start with the model’s total context window (e.g., 200K for Claude Sonnet)
Allocate Fixed Contexts
Assign tokens for repo map (
max_repo_map_tokens) and decision context (max_decision_context_tokens)Decision Configuration
Control the decision graph behavior:.loom.toml
Decision Options
- enabled - When
false, disables the decision graph entirely (saves memory and reduces context usage) - enforce_pre_edit - When
true, requires logging a decision before any file edit operation - auto_log_commits - When
true, automatically creates outcome nodes in the decision graph when commits are made
Repository Configuration
Control file watching and indexing:.loom.toml
Environment Variables
LLM Provider API Keys
Set the API key for your chosen provider:Database Location
By default, Loom stores its SQLite database in~/.loom/loom.db. Override this:
Web UI Port
The Phoenix LiveView web UI runs on port 4200 by default:Full Example Configuration
Here’s a complete.loom.toml with all options:
.loom.toml
Programmatic Configuration
You can also override configuration at runtime using theLoom.Config module:
Next Steps
Project Rules
Define project-specific instructions and constraints
Model Selection
Choose the right models for your use case