   ([hostname port proxies]
      (add-proxies (attach-session {:hostname hostname :port port}) proxies)))
 
+(defn robot?
+  "Returns true if argument represents a robot"
+  [robot]
+  (not-nil? (:hostname robot)))
+
 (defn get-proxy
   "Gets a proxy from a robot, constructing it if necessary"
   [robot proxy]

         (let [stiffness-tasks (do-stiffness robot duration
                                             stiffness-changes)
               joint-tasks (do-joints robot duration joint-changes)
               all-tasks (concat stiffness-tasks joint-tasks)]
           (cond
            ;; send true on done-chan when all tasks done
            (not (nil? done-chan))

                 (Float. execution-time-seconds)]))

(defn- do-stiffness
  "Takes a map of stiffness changes and a duration and builds tasks"
  [robot duration stiffness-changes]
  (if (seq stiffness-changes)
    (map (fn [[c s]] (stiffness-task robot c s duration)) stiffness-changes)))

(defn- do-speech
  "Takes a map of speech actions and a duration and builds a single task since multiple words can't be said simultaneously"
  [robot duration speech-changes]
  (let [fulltext (if (string? speech-changes)
                   speech-changes
                   (join " " speech-changes))]
    (list (call-service robot :tts "say" [fulltext]))))

(defn-  parse-args
  "Parse an argument list and separate options from other params"
