alfe setup
alfe setup connects an existing agent to the machine you run it on. When it
finishes, the agent’s runtime is installed and its gateway daemon is running as a
system service.
Before you start
Section titled “Before you start”Create the agent in the dashboard first, and select Run it yourself on the Hosting step. Then open the agent’s Overview tab and select Generate setup token under Get started locally.
Run setup
Section titled “Run setup”Pass the token in the environment:
ALFE_API_KEY=<SETUP_TOKEN> alfe setupIn Windows PowerShell, use this instead:
$env:ALFE_API_KEY="<SETUP_TOKEN>"; alfe setupWhat it does
Section titled “What it does”The wizard runs through these steps:
-
Authenticate. It validates
ALFE_API_KEYif it’s set. Otherwise it reuses a valid key from your config, or prompts you to paste one. -
Configure the runtime. It reads the agent’s runtime from Alfe, and offers to install it if it’s missing. It then prepares the agent’s workspace and applies the agent’s persona. A diagnostics helper is installed on a best-effort basis.
-
Install the gateway daemon. It installs the daemon as a system service and starts it, so the agent stays connected across reboots.
-
Register platform tools. It registers the Alfe platform MCP server so the agent can reach memory, model routing, and integrations.
Then confirm the daemon connected:
alfe gateway statusOptions
Section titled “Options”alfe setup takes one option:
--managed— run without prompts, for server provisioning. Seealfe setup --managed.
Where configuration is written
Section titled “Where configuration is written”Setup writes ~/.alfe/config.toml, including your API key, whether the runtime
should auto-start, the active runtime, and the runtime’s workspace path. You don’t
normally edit this file by hand.
Re-run setup
Section titled “Re-run setup”alfe setup is safe to re-run. Use it to repair a connection or to finish a
runtime switch. After a switch, it copies the previous
workspace into the new runtime when the new one is empty, then restarts the daemon
on the new runtime.