Deploy agent

This guide walks you through deploying an agent using the QudeAI Framework. Follow the steps below carefully to ensure a successful deployment.

Step 1: Clone the Framework

  1. Clone the QudeAI Framework repository to your local machine:

    git clone https://github.com/qudeai/qudeai-framework-v.1.git
    cd qudeai-framework-v.1

Step 2: Set Up Your .env File

  1. Inside the main directory, locate the .env.example file.

  2. Rename it to .env:

    cp .env.example .env
  3. Open the .env file and replace placeholders with your private key and other required configurations:

    # 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

  1. Open the defineAgent.ts file located in the src folder:

    /src/defineAgent.ts
  2. Modify the agentDetails object with your agent's specific details:

    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
    };
  3. Save the changes.


Step 4: Build the Project

  1. Run the following commands to build the project:

    npm install
    npm run build
  2. If TypeScript compilation is required:

npx tsc

Step 5: Deploy the Agent

Run:

npm run deployqude

Example Output

Deploying agent...
Agent details:
Name: MyFirstAgent
Symbol: mfa
Description: My first AI agent token deployed on QudeAI 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

  1. Agent Details: Displays the details of the agent being deployed, including the name, symbol, description, and website.

  2. Transaction Status:

    • Confirms that the transaction has been sent to the blockchain.

  3. Transaction Successful:

    • Indicates that the deployment was successful and provides the transaction signature.

  4. 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

  1. Copy the transaction signature from the output:

    xxx....xxxx
  2. Open the SolScan link provided:

    https://solscan.io/tx/xxx....xxxx
  3. 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:

  1. Use the npm run interactqude command to interact with your agent:

    npm run interactqude YourAgentName ask "What is your purpose?"
  2. Use the API or CLI commands to fetch details about your agent or perform actions like trading tokens.


Example defineAgent.ts Configuration

typescriptCopy codeexport const agentDetails = {
    name: "MyFirstAgent",
    symbol: "mfa",
    initialBuyAmount: 100,
    description: "My first AI agent token deployed on QudeAI 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