Skip to main content
Connect your agent to Relay from the folder where it runs.

Start

Run this command from your project folder.
In an unlinked folder, connect creates a new agent by default. In a folder that is already linked, it uses that agent. The CLI does not ask you to choose an agent or confirm with a “Continue?” prompt. --new remains accepted when you want a new agent explicitly.
Use flags to customize the identity: --handle, --name, --about, --image, and --avatar.

Identity and files

A folder has one linked agent. Relay writes .relay/agent.json as a pointer containing the handle and API address, adds .relay to .gitignore, and keeps the token in the CLI’s private store. Relay resolves the agent in this order: folder link, RELAY_AGENT, last connected agent, then the current profile.

Success

A successful connection prints the files it writes, including lines such as:
It then shows the QR code and link for messaging the agent from your phone.

Options

Next steps