docstr: Gets a agent by name
docstr_tok: ["Gets","a","agent","by","name"]
code: def get(self, project_name, agent_name):
      """Gets a agent by name"""
      agents_controller = AgentsController()
      try:
          existing_agent = agents_controller.get_agent(
              agent_name, project_name=project_name
          )
          if existing_agent is None:
              return http_error(
                  HTTPStatus.NOT_FOUND,
                  "Agent not found",
                  f"Agent with name {agent_name} does not exist",
              )
          return existing_agent.as_dict()
      except ValueError:
          # Project needs to exist.
          return http_error(
              HTTPStatus.NOT_FOUND,
              "Project not found",
              f"Project with name {project_name} does not exist",
          )
  
file_path: mindsdb/mindsdb/api/http/namespaces/agents.py
imports: from http import HTTPStatus
  from flask import request
  from flask_restx import Resource
  from mindsdb.api.http.namespaces.configs.projects import ns_conf
  from mindsdb.api.executor.controllers.session_controller import SessionController
  from mindsdb.api.http.utils import http_error
  from mindsdb.interfaces.agents.agents_controller import AgentsController
  from mindsdb.interfaces.model.functions import PredictorRecordNotFound
  from mindsdb.interfaces.storage.db import Predictor
label_desc: Use image node_id 1 for calling the AgentResource obj's underlying member method code with example usage: obj.get(project_name, agent_name) and returns: existing_agent, http_error, http_error