-1

I am working on a JADE project and I want to build a React app to interact with my agents.

I would like to send messages to specific agents from my web client using REST. I know that it is possible to send POST requests, but what the body should look like ?

Dastamn
  • 73
  • 1
  • 7

2 Answers2

0

take a look at these https://www.iro.umontreal.ca/~vaucher/Agents/Jade/primer2.html and https://jade.tilab.com/doc/tutorials/JADEAdmin/startJade.html.

You may one to create the agents using pure java and invoke it from the UI using React via REST or MVC.

morrisng
  • 127
  • 7
0

if you create an agent programmatically you can sent message to the agent by means of AgentController.putO2AObject, but you need server code that processes your rest message and delegate it to the agent.

Otherwise you can just create java.net.ServerSocket in agent code and sent any message you want from your client

nikelyn
  • 518
  • 3
  • 13
  • Ok I see, I thought that since agents use post requests to communicate and I know their adresses I can intercat with them directly from the client. So it's not possible... Thank you! – Dastamn May 31 '20 at 22:13
  • you can also try to use add-ons (https://jade.tilab.com/download/add-ons/), I think WSIG or WSDC are appropriate in your case – nikelyn Jun 01 '20 at 08:01