example1.ts

Example 1: Deploy an AI Agent and Retrieve its Details

import { deployAgent } from "../src/deployAgent";
import { checkAgentExists } from "../src/firebase";

async function example1() {
  const agentDetails = {
    name: "QudeHelper",
    symbol: "QHLP",
    supply: 1000000,
    description: "An AI agent for QudeAI ecosystem.",
    skills: ["AI assistance", "NLP"],
  };

  try {
    console.log("Deploying agent...");
    const deployResult = await deployAgent(agentDetails);
    console.log("Agent deployed successfully:", deployResult);

    console.log("Verifying agent deployment...");
    const exists = await checkAgentExists(agentDetails.name);
    console.log(`Agent ${agentDetails.name} exists:`, exists);
  } catch (error) {
    console.error("Error in deploying and verifying agent:", error);
  }
}

example1();

Last updated