Copy import { interactAgent } from './src/interactAgent' ;
( async () => {
const response = await interactAgent ( 'TestAgent' , 'What is the market cap for BTC?' );
console .log ( 'Agent Response:' , response);
})();
Copy import { storeMemory } from './src/firebase' ;
( async () => {
await storeMemory ( 'TestAgent' , 'session_data' , 'Important session information' );
console .log ( 'Memory stored successfully.' );
})();
Copy import { executeTrade } from './src/trade' ;
( async () => {
const tradeDetails = {
token : "BTC" ,
amount : 5 ,
action : "buy"
};
const result = await executeTrade (tradeDetails);
console .log ( 'Trade result:' , result);
})();
The API follows standard HTTP response codes to indicate the success or failure of requests.
Copy {
"error" : "Error message describing the issue"
}