CLI platform mode vs. legacy mode
This page is specific to the Landbase CLI. The CLI supports two authentication and routing modes. Most users will never need to think about this distinction — platform mode is the default and is the right choice for almost everyone. MCP clients use the remote OAuth connection described in Connect Landbase MCP, not the CLI mode switch described here.Platform mode (default)
In platform mode, landbase-cli routes requests through the Landbase cloud gateway atapi.landbase.com. Authentication uses an OAuth session — you log in via browser and a short-lived token is stored in ~/.landbase/platform.json.
Credentials in platform mode:
- Session token prefix:
lbs_ - Stored at:
~/.landbase/platform.json - Created by:
landbase-cli auth login(browser OAuth)
LANDBASE_LEGACY_MODE=1.
Legacy mode
Legacy mode connects directly to the AgentOS backend, bypassing the cloud gateway. Authentication uses long-lived API keys. Credentials in legacy mode:- API key prefix:
lbk_ - Stored at:
~/.landbase/config.json - Created by:
landbase-cli auth login --key
Who should use legacy mode?
Legacy mode exists for backward compatibility. You might need it if:- You have an existing automation using a
lbk_API key and cannot migrate yet - You have been explicitly instructed by Landbase support to use it for a specific integration
- You are running a version of landbase-cli that predates platform mode
How to check which mode you are in
What changes between modes
Related
- How to troubleshoot authentication
- environment variables reference —
LANDBASE_LEGACY_MODEand related vars - Connect Landbase MCP — MCP connection and OAuth setup

