1.3.0 • Published 5 years ago

agentworlds v1.3.0

Weekly downloads
12
License
-
Repository
-
Last release
5 years ago

AgentWorlds

Demo Image Build Status Demo

Usage

Ping Pong Bot:

  var AgentWorlds = require('agentworlds')
  var agentclient = AgentWorlds.start("AGENT_NAME") // default agent name is F1 and inculde the room
  agentclient.socket.on('r_speak',function(msg,id) {
  // easy way to use agentclient.speak('ping') in the browser console. not node.js client
     if (msg == "ping") {
     // reply to pong.
     agentclient.speak('pong!')
     }
  })

Echo Bot:

  var AgentWorlds = require('agentworlds')
  var agentclient = AgentWorlds.start("AGENT_NAME") // default agent name is F1 and inculde the room
  agentclient.socket.on('r_speak',function(msg,id) {
  // easy way to use agentclient.speak('ANYTHING') in the browser console. not node.js client
  // then echo to user
     agentclient.speak(msg)
     }
  })
1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago