# Phases and contracts

Files enter Data Mover during the **input phase**. Either an **input contract** or a **connection contract** can be defined, depending on whether Data Mover collects the files or receives them:

* **Input contract**: Data Mover connects to the data producer and collects the files. This role is referred to as the **Data Mover client role**.
* **Connection contract**: Data Mover receives the files from the producer. This role is referred to as the **Data Mover server role**.

In the **mediation phase**, when files are transformed for the output phase, a **mediation contract** is defined to apply specific actions to the files, such as encryption, renaming, and zipping.

In the **output phase**, when the files leave Data Mover, either an **output contract** or a **connection contract** can be defined, depending on whether Data Mover sends the files or waits for the consumer to collect them:&#x20;

* **Output contract**: Data Mover sends the files to the data consumer. This role is referred to as the **Data Mover client role**.
* **Connection contract**: Data Mover waits for the consumer to collect files. This role is referred to as the **Data Mover server role**.


---

# 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.primeur.com/data-mover-1.21/contracts/what-is-a-contract/phases-and-contracts.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.
