# Migration steps

{% hint style="success" %}
This is the official documentation of the `@forestadmin/agent` Node.js agent.
{% endhint %}

### Step 1: Run the new agent in "parallel" with the old one

The first step of every migration should be the creation of and the installation of a new environment. You can first, try our new experience by using a development environment, when you are satisfied create a temporary new remote environment, that will become your new production later.

Follow the [dedicated guide](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/migrating/steps/run-parallel) to learn more about running both agents.

### Step 2: Connect the new agent to your database

Some thoughts should be given to the way you connect your new agent to your databases.

Follow the [dedicated guide](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/migrating/steps/datasource) to learn more about the differences between the two agents and how to connect your new agent to your databases.

### Step 3: Port your code to the new API

A translation guide for most features is available in the `Code transformations` section.

### Step 4: Ensure compatibility between agents

Making an agent which works is not enough: you also need to make sure that it generates a schema where the naming of most entities is the same as the old one.

More information is in the [dedicated guide](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/migrating/steps/compare)

### Step 5: Replace the old agent with the new one

Once all those steps are done, you can go ahead and replace the old agent with the new one in your development environment!

More information in this last [dedicated guide](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/migrating/steps/replace)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/migrating/steps.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
