Configure models
Toolang automatically lists models from supported providers when their credentials are available. It also discovers models from local servers.
View available models
List models available in the current environment:
too modelsUse the following options to explore available models:
| Task | Command |
|---|---|
| List all models and their availability | too models --all --json |
| Show models from a specific provider | too models --query 'openai/*' |
| Show models available to an agent | too eve models |
Commands without an agent name use the Toolang root configuration, located at ~/.toolang by default. Agents have their own environments and catalogs, so available models may differ.
Configure hosted models
Toolang includes a built-in model catalog with configurations for many providers. To use hosted models, make the required provider credentials available to Toolang.
Check supported providers and their required environment variables:
too providers --allSet the appropriate environment variable in your shell. For example:
export OPENAI_API_KEY=...You can also store credentials in ~/.toolang/.env.
Verify that the provider's models are available:
too models --query 'openai/*'Custom catalogs
Toolang's bundled model catalog is derived from models.dev and maintained in the openhat-ai/models repository.
To add or override providers, models, or endpoints, create a catalog.json file following the catalog format.
Load it for a single command:
too models --catalog ./catalog.json --allTo use a custom catalog automatically, place it in one of these locations:
| Scope | Path |
|---|---|
| Toolang root | ~/.toolang/catalog.json |
Agent eve | ~/.toolang/agents/eve/catalog.json |
An agent's catalog takes precedence over the root catalog, while --catalog overrides both for the current command.
Toolang selects one static catalog at a time. See Static model catalogs for the complete selection order.
Configure local models
Toolang automatically discovers models from running Ollama and llama.cpp servers, provided they expose at least one model.
| Server | Default endpoint | Environment variable |
|---|---|---|
| Ollama | http://127.0.0.1:11434 | OLLAMA_HOST |
| llama.cpp | http://127.0.0.1:8080 | LLAMA_CPP_HOST |
To use a non-default endpoint, set the corresponding environment variable. For example, if Ollama runs on port 11435:
export OLLAMA_HOST=http://127.0.0.1:11435
too models --query 'ollama/*'Use LLAMA_CPP_HOST in the same way for llama.cpp.
Local model discovery supplements the selected static catalog. See Local model catalogs for additional endpoint settings.
Configure agent environments
For security, Toolang does not pass all environment variables to agent processes by default. It passes only one provider API key, which may not be the one you expect when multiple providers are configured.
To explicitly control which variables an agent can access, use an environment file. For an agent named eve, there are two locations:
| File | Purpose |
|---|---|
~/.toolang/.eve.env | Root-managed agent environment |
~/.toolang/agents/eve/.env | Environment defined in the agent home |
The root-managed file takes precedence, allowing you to control the agent's environment independently of its own files.
For example, create ~/.toolang/.eve.env with:
OPENAI_API_KEY
OLLAMA_HOSTA variable name without a value imports its value from the root environment, without duplicating credentials or endpoint settings.
When an explicit agent environment file is present, Toolang passes only the variables selected by that file.
Verify the models available to eve:
too eve modelsSee Environment selection for the complete precedence rules and script environments.