Repository navigation
Configure a provider
Connect malac to OpenAI, Anthropic, an LLM gateway or a local model, and pick the default model.
malac talks to models through providers. A provider is an endpoint plus a wire format: openai (chat completions) or anthropic (the Messages API). Anything that speaks one of the two works, including gateways and local servers. You can configure several providers at once and switch between their models at any time.
Two providers are always defined:
| Provider | Kind | Base URL | Key variable |
|---|---|---|---|
anthropic |
anthropic |
https://api.anthropic.com |
ANTHROPIC_API_KEY |
openai |
openai |
https://api.openai.com/v1 |
OPENAI_API_KEY |
If no model is configured, malac picks anthropic/claude-sonnet-5-5 when ANTHROPIC_API_KEY is set, otherwise openai/gpt-5 when OPENAI_API_KEY is set. With neither, it asks you to add a provider.
malac provider add writes a [providers.<name>] table to ~/.malac/config.toml, replacing any provider with the same name:
printf '%s' "$LORA_API_KEY" | malac provider add lora \
--base-url https://lora.example.com/v1 --model default --api-key-stdin --set-defaultThis adds a provider called lora for an OpenAI-compatible gateway at lora.example.com, stores its key, and makes lora/default the default model.
| Flag | Meaning |
|---|---|
<name> |
Provider name, used in model specs such as lora/smart
|
--base-url <url> |
Endpoint. Required. |
--kind openai|anthropic |
Wire format. Default openai. |
--model <id> |
Model to list for this provider and to use with --set-default
|
--api-key-env <VAR> |
Read the key from this environment variable |
--api-key-stdin |
Read the key from stdin and store it in ~/.malac/credentials.toml (mode 0600) |
--set-default |
Make <name>/<model> the default model. Needs --model. |
To keep the key in your environment instead of on disk:
malac provider add anthropic-work --kind anthropic \
--base-url https://api.anthropic.com --api-key-env WORK_ANTHROPIC_KEY \
--model claude-sonnet-5-5When malac needs a key, it looks in the provider's api_key_env variable first, then in ~/.malac/credentials.toml.
Tip
Never paste an API key into a prompt. Everything you type ends up in the session transcript. Use --api-key-stdin, api_key_env, the web UI's settings, or ask malac to store it (it uses a dedicated tool that writes credentials.toml).
malac provider list # providers, base URLs and whether a key is set
malac provider models lora # models one provider serves
malac models # every model of every provider; * marks the default# ~/.malac/config.toml
model = "lora/default" # default model, as provider/model
small_model = "lora/fast" # used for compaction summaries
vision_model = "lora/vision" # describes images for models without vision
[providers.lora]
kind = "openai"
base_url = "https://lora.example.com/v1"
api_key_env = "LORA_API_KEY"
models = ["default", "smart", "fast", "vision"]
[providers.local]
kind = "openai"
base_url = "http://localhost:11434/v1"models lists the ids offered by /model, the model picker and the web UI. headers adds extra HTTP headers to every request:
[providers.lora]
headers = { "X-Team" = "platform" }A model is written provider/model, for example lora/smart. A bare name such as smart uses the provider of the default model. If the part before the first / is not a provider name, the whole string is a model id on the default provider, so deepseek/v4 with a default of lora/default means model deepseek/v4 on lora.
Pick a model per run with -m, or switch inside a session with /model:
malac -m lora/smart review the auth module[models."lora/default"]
context_window = 200000 # compaction starts at 80% of this
max_output_tokens = 16384 # max_tokens sent with each request
vision = false # route images through vision_model
temperature = 0.2
[models."anthropic/claude-sonnet-5-5"]
thinking_budget = 8000 # Anthropic extended thinkingAll keys are optional; see Configuration for the defaults.
A profile is a named overlay applied with --profile:
[profiles.fast]
model = "lora/fast"
[profiles.yolo]
mode = "autopilot"malac --profile fast summarize the open TODOs- Using an LLM gateway: one key, many models, both wire formats.
- Running models locally: Ollama and vLLM.
Getting started
Tutorials
- Tutorials
- Tutorial 1: Your first task
- Tutorial 2: Delegating to subagents
- Tutorial 3: Automating a browser
- Tutorial 4: Long-term memory with Milvus
- Tutorial 5: Running malac unattended
- Tutorial 6: Customizing malac
- Tutorial 7: Running malac on a server
Using malac
- Workspaces, tabs and the daemon
- The terminal UI
- Plain mode and scripting
- Sessions
- Jobs
- Permissions and autopilot
- Subagents
- Memory
- Project context
- Plugins and marketplaces
- Computer and browser control
- Web UI
- VS Code
- Remote access
- Mobile (preview)
- MCP servers
- Configure malac by asking
- Updating
Reference
- CLI
- Slash commands
- Configuration
- Tools
- Control service tools
- JSON events
- Protocol
- Environment variables
Guides
- Using an LLM gateway
- Running models locally
- Vector memory with Milvus
- Controlling a remote machine
- Writing agent types, skills and commands
- Security model
- Things to know
Project