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