example4.ts
Example 4: Interact with an AI Agent for Market Data
import { interactAgent } from "../src/interactAgent";
async function example4() {
const agentName = "QudeHelper";
const query = "What are the trending tokens in the past 24 hours?";
try {
console.log(`Interacting with agent ${agentName}...`);
const response = await interactAgent(agentName, query);
console.log(`Agent response: ${response}`);
} catch (error) {
console.error("Error interacting with agent:", error);
}
}
example4();
Last updated