One of the YAML file I frequently edit in Solace Agent Mesh is a plain .env. The desktop app reads it on startup and applies every variable in it:
- macOS:
~/Library/Application Support/sam/.env - Windows:
%AppData%\sam\.env - Linux:
~/.config/sam/.env
Restart the app after you change it. Here are examples of ones I use often.
SOLACE_DEV_MODE: going from in-memory to a real broker
Out of the box the desktop app runs on an in-memory broker, which is perfect for trying things. The Event Mesh entrypoint and connector need a real Solace broker though. You have to turn dev mode off explicitly.
SOLACE_DEV_MODE=false
SOLACE_BROKER_URL=wss://your-broker.messaging.solace.cloud:443
SOLACE_BROKER_VPN=your-vpn
SOLACE_BROKER_USERNAME=your-username
SOLACE_BROKER_PASSWORD=your-password
NAMESPACE: sharing one broker with your team
All agent-to-agent traffic rides on topics under a namespace, solace-agent-mesh by default. When a few of us point at the same dev broker, each person gets their own prefix so our agents never pick up each other’s requests. In your app config, read it with a default:
namespace: ${NAMESPACE, solace-agent-mesh}
NAMESPACE=tamimi-dev
That ${VAR, default} form works anywhere in the YAML. There is also ${VAR:-default}, which falls back when the variable is set but empty.
Two more worth knowing
LLM_SERVICE_GENERAL_MODEL_NAME=openai/your-model
SAM_FEATURE_AUTO_TITLE_GENERATION=false
Any feature flag can be flipped with SAM_FEATURE_<NAME>, and that is the only way to set one. Since this file usually holds credentials, keep it readable only by your own account.
Docs worth bookmarking:
If you haven’t tried it yet, download the Solace Agent Mesh desktop app and point it at your own broker.
What’s in your .env? Reply with the variable you reach for most (minus the secrets) and what it saved you.