> For the complete documentation index, see [llms.txt](/llms.txt).

# Install and set up the Smart Accounts Kit

This page provides instructions to install and set up the Smart Accounts Kit in your dapp, enabling you to create and interact with [MetaMask Smart Accounts](/smart-accounts-kit/development/reference/glossary#metamask-smart-account)**MetaMask smart account** A smart contract account created using the Smart Accounts Kit that supports programmable behavior, flexible signing options, and ERC-7710 delegations..

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

- Install [Node.js](https://nodejs.org/en/blog/release/v18.18.0) v18 or later.
- Install [Yarn](https://yarnpkg.com/), [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm), or another package manager.
- If you plan to use any smart contracts (for example, to [create a custom caveat enforcer](/tutorials/create-custom-caveat-enforcer/)), install [Foundry](https://book.getfoundry.sh/getting-started/installation).

## Steps[​](#steps "Direct link to Steps")

### 1. Install the Smart Accounts Kit[​](#1-install-the-smart-accounts-kit "Direct link to 1. Install the Smart Accounts Kit")

Install the [Smart Accounts Kit](https://www.npmjs.com/package/@metamask/smart-accounts-kit):

- npm
- Yarn
- pnpm
- Bun

```
npm install @metamask/smart-accounts-kit

```

```
yarn add @metamask/smart-accounts-kit

```

```
pnpm add @metamask/smart-accounts-kit

```

```
bun add @metamask/smart-accounts-kit

```

### 2. (Optional) Install the contracts[​](#2-optional-install-the-contracts "Direct link to 2. (Optional) Install the contracts")

If you plan to extend the [Delegation Framework](/smart-accounts-kit/development/reference/glossary#delegation-framework)**Delegation Framework** A set of audited smart contracts that handle smart account creation, the delegation lifecycle, and caveat enforcement. smart contracts (for example, to [create a custom caveat enforcer](/tutorials/create-custom-caveat-enforcer/)), install the contract package using Foundry's command-line tool, Forge:

```
forge install metamask/delegation-framework@v1.3.0

```

Add `@metamask/delegation-framework/=lib/metamask/delegation-framework/` in your `remappings.txt` file.

### 3. Get started[​](#3-get-started "Direct link to 3. Get started")

You're now ready to start using the Smart Accounts Kit. See the [MetaMask Smart Accounts quickstart](/smart-accounts-kit/development/get-started/smart-account-quickstart/) to walk through a simple example.
