code: def from_spec(spec, kwargs):
          
          agent = util.get_object(
              obj=spec,
              predefined_objects=tensorforce.agents.agents,
              kwargs=kwargs
          )
          assert isinstance(agent, Agent)
          return agent
docs: Creates an agent from a specification dict.