class_docstr: Tensorforce agent interface.
class_docstr_tok: ["Tensorforce","agent","interface","."]
code: def __init__(
      self,
      states,
      actions,
      max_episode_timesteps=None,
      parallel_interactions=1,
      config=None,
      recorder=None,
  ):
      util.overwrite_staticmethod(obj=self, function="create")
      util.overwrite_staticmethod(obj=self, function="load")
  
      # Check whether spec attribute exists
      if not hasattr(self, "spec"):
          raise TensorforceError.required_attribute(
              name="Agent", attribute="spec"
          )
  
      # Tensorforce config
      if config is None:
          config = dict()
      self.config = TensorforceConfig(**config)
  
      # TensorFlow logging
      tf.get_logger().setLevel(self.config.tf_log_level)
  
      # TensorFlow eager mode
      if self.config.eager_mode:
          tf.config.run_functions_eagerly(run_eagerly=True)
  
      # Random seed
      if self.config.seed is not None:
          random.seed(a=self.config.seed)
          np.random.seed(seed=self.config.seed)
          tf.random.set_seed(seed=self.config.seed)
  
      super().__init__(
          fn_act=None,
          states=states,
          actions=actions,
          max_episode_timesteps=max_episode_timesteps,
          parallel_interactions=parallel_interactions,
          recorder=recorder,
      )
  
imports: from collections import OrderedDict
  import json
  import logging
  import os
  import random
  import numpy
  import tensorflow
  from tensorforce import util, TensorforceError
  from tensorforce.agents import Recorder
  import tensorforce.agents
  from tensorforce.core import ArrayDict, TensorSpec, TensorforceConfig
label_desc: Use image node_id 3 to create a new Agent object from inherited base classes: Recorder with example: obj = Agent(states, actions, max_episode_timesteps, parallel_interactions, config, recorder)