Deploy agent
This guide walks you through deploying an agent using the FrausAI Framework. Follow the steps below carefully to ensure a successful deployment.
Step 1: Clone the Framework
Clone the FrausAI Framework repository to your local machine:
Copy
git clone https://github.com/frausai/frausai-framework-v.1.git cd frausai-framework-v.1
Step 2: Set Up Your .env
File
.env
FileInside the main directory, locate the
.env.example
file.Rename it to
.env
:Copy
cp .env.example .env
Open the
.env
file and replace placeholders with your private key and other required configurations:Copy
# Example .env configuration PRIVATE_KEYPAIR=your-private-key-here OPENAI_API_KEY=your-openai-api-key-here RPC_ENDPOINT=https://api.mainnet-beta.solana.com API_KEY=your-api-key-here ACTION=buy MINT=TokenContractAddressHere AMOUNT=100
Step 3: Configure defineAgent.ts
defineAgent.ts
Open the
defineAgent.ts
file located in thesrc
folder:Copy
/src/defineAgent.ts
Modify the
agentDetails
object with your agent's specific details:Copy
export const agentDetails = { name: "YourAgentName", // Replace with your agent's name symbol: "agent", // Replace with your agent's symbol initialBuyAmount: 100, // Initial amount of tokens to buy description: "Your AI agent token description here", twitter: "https://twitter.com/yourprofile", // Optional: your Twitter link telegram: "https://t.me/yourgroup", // Optional: your Telegram group website: "https://yourwebsite.com", // Optional: your website link imagePath: "src/agent_logo/example.png", // Path to your agent's logo image };
Save the changes.
Step 4: Build the Project
Run the following commands to build the project:
Copy
npm install npm run build
If TypeScript compilation is required:
npx tsc
Step 5: Deploy the Agent
Run:
npm run deployfraus
Example Output
Deploying agent...
Agent details:
Name: MyFirstAgent
Symbol: mfa
Description: My first AI agent token deployed on frausAI Framework.
Website: https://myagent.com
Sending transaction to the Solana blockchain...
Transaction successful!
✅ Transaction Signature: xxxx....xxxxx
🔗 View on SolScan: https://solscan.io/tx/xxxx....xxxxxx
Your agent has been successfully deployed and is now live.
Output Breakdown
Agent Details: Displays the details of the agent being deployed, including the name, symbol, description, and website.
Transaction Status:
Confirms that the transaction has been sent to the blockchain.
Transaction Successful:
Indicates that the deployment was successful and provides the transaction signature.
SolScan Link:
The
🔗 View on SolScan
section provides a clickable URL to view the transaction details on SolScan. This allows you to verify the deployment, view the status, and confirm the token creation.
How to Verify on SolScan
Copy the transaction signature from the output:
Copy
xxx....xxxx
Open the SolScan link provided:
Copy
https://solscan.io/tx/xxx....xxxx
Review the transaction details, including:
The token creation.
The wallet that initiated the transaction.
The gas fees paid.
Example SolScan Page
On SolScan, you'll see:
Transaction Status:
Confirmed
Token Details: Includes the agent token name, symbol, and supply.
Wallet Information: The wallet address that deployed the agent.
Step 6: Verify Deployment
After deployment:
Use the
npm run interactfraus
command to interact with your agent:Copy
npm run interactfraus YourAgentName ask "What is your purpose?"
Use the API or CLI commands to fetch details about your agent or perform actions like trading tokens.
Example defineAgent.ts
Configuration
defineAgent.ts
ConfigurationtypescriptCopy codeexport const agentDetails = {
name: "MyFirstAgent",
symbol: "mfa",
initialBuyAmount: 100,
description: "My first AI agent token deployed on frausAI Framework.",
twitter: "https://twitter.com/MyAgent",
telegram: "https://t.me/MyAgentGroup",
website: "https://myagent.com",
imagePath: "src/agent_logo/example.png",
};
Dependencies: This framework uses Solana RPC endpoints, so ensure the
RPC_ENDPOINT
is configured properly.Private Key: Ensure your private key in
.env
is secure. Do not share it with others.
Last updated