> For the complete documentation index, see [llms.txt](https://docs.layerprompt.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerprompt.ai/instalation.md).

# Instalation

1. **Clone the repository**

To get started with LayerPromptAI, you need to clone the official repository from GitHub:

<kbd>git clone <https://github.com/LayerPrompt/layer-prompt-cli></kbd>

<kbd>cd layerprompt-ai-cli</kbd>

This command downloads the project files and navigates into the project directory.

2. **Install Dependencies**

Next, install all necessary dependencies required for LayerPrompt AI to function correctly:

<kbd>npm install</kbd>

This command fetches and installs all required Node.js packages.

3. **Set Up Environment Variables**

LayerPrompt AI requires certain environment variables to function. Create a&#x20;

.env file in the root directory and add the following variables:

<kbd>OPENAI\_API\_KEY=\<YOUR\_OPENAI\_API\_KEY></kbd>

<kbd>PRIVATE\_KEY=\<YOUR\_WALLET\_PRIVATE\_KEY></kbd>

* **OPENAI\_API\_KEY**: Your API key to interact with OpenAI services.
* **PRIVATE\_KEY**: Your blockchain private key pair for transaction signing.

4. **Build the Agent**

Once the environment variables are set up, build the LayerPrompt AI agent using:

<kbd>npm run build</kbd>

This compiles the necessary code and prepares the agent for execution.

5. **Run the Agent**

Finally, start the LayerPrompt AI agent by running:

<kbd>npm run start</kbd>

This launches the AI agent and allows it to interact with the blockchain and other services.

By following these steps, you will have a fully functional LayerPrompt AI agent running and ready for use.
