# Import recipes from client code

An import reads the code of an application that calls your API, such as its web or mobile front end, and finds where that application chains several calls into one user action. Each sequence becomes a proposed recipe. Use it when your front end already contains the workflows you want agents to have.

## Before you begin

- The API's analysis has finished. The import uses the operations the API already has and never adds operations.
- The client application's code, in a repository Faustine can read or as a ZIP. See [Connect GitHub](https://docs.faustine.ai/technologies/github/).

## Start an import

1. In the portal, go to [**APIs**](https://auth.faustine.ai/go?to=%2Fintegrations%2Fapis) and select your API.
2. Select the **Recipes** tab, then **New recipe**.
3. Select **Import from client code**.

### Client application

1. Select an application that is already listed, or select **Another repository** to connect one. You can also upload the application as a ZIP.
2. For a repository, select the **Repository** and the **Branch**. If the application lives in a folder of a monorepo, enter the folder in **Client app path**.
3. Optionally, describe the application in **What is this app?**.
4. Select **Continue**.

### What to look for

1. Optionally, enter notes for the import: which flows matter and what to ignore. For example, "Focus on checkout and refunds" or "Ignore the admin pages".
2. Select **Continue**.

### Review

1. Check the application and its source.
2. Select **Start import**.

The import is a run on your model provider, like an analysis. The portal opens the run's page. You can leave it, and the **Recipes** tab shows the run's progress while it is in flight. An API runs one import at a time, and **Publish** is unavailable until the run ends.

## Read the result

When the run finishes, its page lists what it found:

| Section | Content |
| --- | --- |
| **Proposed** | The new recipes, each with a **Confidence** badge that says how sure the import is that the sequence is one user action with a fixed order. **Review** opens the recipe. |
| **Skipped** | Sequences the application performs that already exist as recipes, or that you rejected before. |
| **Findings** | Calls the application makes that match no operation of this API. The API's analysis can be out of date, or the application calls another service. |

A proposal marked **needs a fix** has code that does not pass validation. Open it and correct it before you accept it.

Every proposal is also in the **Recipes** tab with the **client code** badge. The chip **from client code** filters the list to them. In the recipe editor, the file **From the client code** shows the files and lines the recipe was taken from.

To decide on each proposal, see [Accept or reject a proposed recipe](https://docs.faustine.ai/apis/review-proposed-recipes/).

## Run it again

You can import from the same application again, for example after it gains a feature. Recipes that already exist, whether proposed, accepted or rejected, are not proposed a second time.

## Next steps

- [Accept or reject a proposed recipe](https://docs.faustine.ai/apis/review-proposed-recipes/): turn proposals into operations.
- [Recipes](https://docs.faustine.ai/apis/recipes/): what a recipe's code can use.
- [Keep the API up to date](https://docs.faustine.ai/apis/keep-up-to-date/): update the API first if **Findings** lists calls that should be operations.
