JSPM

agentworlds

1.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q21712F

Package Exports

  • agentworlds

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (agentworlds) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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)
     }
  })