Skip to content

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.

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.

Pass the token in the environment:

Terminal
ALFE_API_KEY=<SETUP_TOKEN> alfe setup

In Windows PowerShell, use this instead:

PowerShell
$env:ALFE_API_KEY="<SETUP_TOKEN>"; alfe setup

The wizard runs through these steps:

  1. Authenticate. It validates ALFE_API_KEY if it’s set. Otherwise it reuses a valid key from your config, or prompts you to paste one.

  2. 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.

  3. Install the gateway daemon. It installs the daemon as a system service and starts it, so the agent stays connected across reboots.

  4. 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:

Terminal
alfe gateway status

alfe setup takes one option:

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.

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.