Instalation
Clone the repository
To get started with LayerPromptAI, you need to clone the official repository from GitHub:
git clone https://github.com/LayerPrompt/layer-prompt-cli
cd layerprompt-ai-cli
This command downloads the project files and navigates into the project directory.
Install Dependencies
Next, install all necessary dependencies required for LayerPrompt AI to function correctly:
npm install
This command fetches and installs all required Node.js packages.
Set Up Environment Variables
LayerPrompt AI requires certain environment variables to function. Create a
.env file in the root directory and add the following variables:
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
PRIVATE_KEY=<YOUR_WALLET_PRIVATE_KEY>
OPENAI_API_KEY: Your API key to interact with OpenAI services.
PRIVATE_KEY: Your blockchain private key pair for transaction signing.
Build the Agent
Once the environment variables are set up, build the LayerPrompt AI agent using:
npm run build
This compiles the necessary code and prepares the agent for execution.
Run the Agent
Finally, start the LayerPrompt AI agent by running:
npm run start
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.
Last updated