class_docstr: Keep track of Agent State.
  
  State includes which is the "active" agent - i.e., which agent in which
  world do we message, etc.
class_docstr_tok: ["Keep","track","of","Agent","State",".","State","includes","which","is","the","``","active","''","agent","-","i.e.",",","which","agent","in","which","world","do","we","message",",","etc","."]
docstr: Return active messenger agent.
  
  :return:
      a ChatServiceAgent, which corresponds to the active agent for this
      agent state.
docstr_tok: ["Return","active","messenger","agent",".",":","return",":","a","ChatServiceAgent",",","which","corresponds","to","the","active","agent","for","this","agent","state","."]
code: def get_active_agent(self) -> ChatServiceAgent:
      """
      Return active messenger agent.
  
      :return:
          a ChatServiceAgent, which corresponds to the active agent for this
          agent state.
      """
      return self.active_agent
  
imports: from abc import ABC, abstractmethod
  from asyncio import Future
  import copy
  import sys
  import logging
  import datetime
  import threading
  import time
  import traceback
  from typing import Dict, Any, Optional, List, Callable
  from parlai.chat_service.core.agents import ChatServiceAgent
  import parlai.chat_service.utils.logging
  import parlai.chat_service.utils.misc
  import parlai.chat_service.utils.server
  from parlai.chat_service.core.world_runner import ChatServiceWorldRunner
  from parlai.core.opt import Opt
label_desc: Use image node_id 2 for calling the AgentState obj's underlying member method code with example usage: obj.get_active_agent() and returns: self