class_docstr: Handles CRUD operations at the database level for Agents
class_docstr_tok: ["Handles","CRUD","operations","at","the","database","level","for","Agents"]
docstr: Gets all agents in a project.
  
  Parameters:
      project_name (str): The name of the containing project - must exist
  
  Returns:
      all-agents (List[db.Agents]): List of database agent object
docstr_tok: ["Gets","all","agents","in","a","project",".","Parameters",":","project_name","(","str",")",":","The","name","of","the","containing","project","-","must","exist","Returns",":","all-agents","(","List","[","db.Agents","]",")",":","List","of","database","agent","object"]
code: def get_agents(self, project_name: str) -> List[dict]:
      """
      Gets all agents in a project.
  
      Parameters:
          project_name (str): The name of the containing project - must exist
  
      Returns:
          all-agents (List[db.Agents]): List of database agent object
      """
      if project_name is None:
          project_name = "mindsdb"
      project = self.project_controller.get(name=project_name)
      all_agents = db.Agents.query.filter(
          db.Agents.project_id == project.id,
          db.Agents.company_id == ctx.company_id,
      ).all()
      return all_agents
  
file_path: mindsdb/mindsdb/interfaces/agents/agents_controller.py
imports: from typing import Dict, List
  from mindsdb.interfaces.model.functions import PredictorRecordNotFound
  from mindsdb.interfaces.storage.db import Predictor
  from mindsdb.interfaces.model.model_controller import ModelController
  from mindsdb.interfaces.skills.skills_controller import SkillsController
  from mindsdb.interfaces.storage import db
  from mindsdb.interfaces.database.projects import ProjectController
  from mindsdb.utilities.context import context
  from mindsdb.utilities.config import Config
  from sqlalchemy.orm.attributes import flag_modified
label_desc: Use image node_id 4 for calling the AgentsController obj's underlying member method code with example usage: obj.get_agents(project_name) and returns: all_agents