> ## Documentation Index
> Fetch the complete documentation index at: https://docs.remoteagent.chat/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-project

> Register multiple agents for different projects and control them all from the same Telegram bot.

RemoteAgent.CHAT supports running multiple agents — one per project — all connected to the same Telegram bot. This lets you switch between projects without leaving Telegram: one message fixes a bug in your API, the next deploys a feature in your frontend.

## Registering a second agent

Each agent is initialized in its own project directory. Navigate to the second project and run `remoteagent init`:

```bash theme={null}
cd /path/to/second-project
remoteagent init
```

First, generate a new pairing code: go to [remoteagent.chat/dashboard](https://remoteagent.chat/dashboard), click **Pair new agent**, enter a project name, and note the code. Then run the init wizard and paste the code when prompted.

The bot now has two agents registered. Each has a unique agent ID and a project name you assigned during init.

<Note>
  The number of projects you can register depends on your plan. Solo allows
  1 project. Trial and Pro allow unlimited projects. See
  [Pricing](/pricing) for details.
</Note>

## Starting a specific agent

Each agent process runs independently on your machine. Navigate to the project directory and start it:

```bash theme={null}
cd /path/to/first-project
remoteagent start

# In another terminal
cd /path/to/second-project
remoteagent start
```

You can also start an agent by name from anywhere:

```bash theme={null}
remoteagent start "my-api"
remoteagent start "frontend"
```

The name matches the project name you assigned during `remoteagent init`.

## How the bot routes commands

When you send a message to the bot, routing works as follows:

* **One agent online** — the command is sent directly to that agent, no selection needed.
* **Multiple agents online** — the command is sent to the currently active project. There is always one project selected; use `/projects` to switch.
* **All agents offline** — the bot notifies you that no agents are reachable and suggests running `remoteagent start`.

## Switching the active project

To switch which project receives your commands, send:

```
/projects
```

The bot responds with an inline keyboard listing all your projects. Tap the one you want to target. All subsequent commands go to that project until you switch again.

## Listing your projects

Send `/projects` to the bot to see all registered projects and their current status. The bot displays an inline keyboard — tap any project to switch to it.

## Managing agents from the dashboard

The [dashboard](https://remoteagent.chat/dashboard) shows all registered agents with their status, last seen time, and session history. You can delete an agent from the dashboard if you no longer need it.

Deleting an agent from the dashboard does not remove the local config files on your machine. To fully remove an agent:

1. Delete it from the dashboard
2. Remove the config file: `rm ~/.remoteagent/agents/{agentId}.json`

## Running agents as background services

For agents on a server or a machine that stays on, consider running them as system services so they restart automatically after a reboot.

<CodeGroup>
  ```bash systemd (Linux) theme={null}
  # /etc/systemd/system/remoteagent-myapi.service
  [Unit]
  Description=RemoteAgent.CHAT — my-api
  After=network.target

  [Service]
  User=youruser
  WorkingDirectory=/path/to/my-api
  ExecStart=remoteagent start
  Restart=on-failure
  RestartSec=5

  [Install]
  WantedBy=multi-user.target
  ```

  ```bash pm2 (Node.js process manager) theme={null}
  pm2 start "remoteagent start" --name my-api --cwd /path/to/my-api
  pm2 start "remoteagent start" --name frontend --cwd /path/to/frontend
  pm2 save
  pm2 startup
  ```
</CodeGroup>
