|  |  | @@ -21,7 +21,7 @@ module Agents | 
            
            
              | 21 | 21 |        * `this.memory()` | 
            
            
              | 22 | 22 |        * `this.memory(key)` | 
            
            
              | 23 | 23 |        * `this.memory(keyToSet, valueToSet)` | 
            
            
              | 24 |  | -      * `this.setMemory(object)` (sets the memory to the values of the input object) | 
            
            
              |  | 24 | +      * `this.setMemory(object)` (replaces the Agent's memory with the provided object) | 
            
            
              | 25 | 25 |        * `this.deleteKey(key)` (deletes a key from memory and returns the value) | 
            
            
              | 26 | 26 |        * `this.credential(name)` | 
            
            
              | 27 | 27 |        * `this.credential(name, valueToSet)` | 
            
            
            
            
              |  |  | @@ -116,7 +116,7 @@ module Agents | 
            
            
              | 116 | 116 |        context["doLog"] = lambda { |a, x| log x } | 
            
            
              | 117 | 117 |        context["doError"] = lambda { |a, x| error x } | 
            
            
              | 118 | 118 |        context["getMemory"] = lambda { |a| memory.to_json } | 
            
            
              | 119 |  | -      context["setKey"] = lambda do |a, x, y| | 
            
            
              |  | 119 | +      context["setMemoryKey"] = lambda do |a, x, y| | 
            
            
              | 120 | 120 |          memory[x] = clean_nans(y) | 
            
            
              | 121 | 121 |        end | 
            
            
              | 122 | 122 |        context["setMemory"] = lambda do |a, x| | 
            
            
            
            
              |  |  | @@ -169,7 +169,7 @@ module Agents | 
            
            
              | 169 | 169 |   | 
            
            
              | 170 | 170 |          Agent.memory = function(key, value) { | 
            
            
              | 171 | 171 |            if (typeof(key) !== "undefined" && typeof(value) !== "undefined") { | 
            
            
              | 172 |  | -            setKey(key, value); | 
            
            
              |  | 172 | +            setMemoryKey(key, value); | 
            
            
              | 173 | 173 |            } else if (typeof(key) !== "undefined") { | 
            
            
              | 174 | 174 |              return JSON.parse(getMemory())[key]; | 
            
            
              | 175 | 175 |            } else { |