abacusai.agent
==============

.. py:module:: abacusai.agent


Classes
-------

.. autoapisummary::

   abacusai.agent.Agent


Module Contents
---------------

.. py:class:: Agent(client, name=None, agentId=None, createdAt=None, projectId=None, notebookId=None, predictFunctionName=None, sourceCode=None, agentConfig=None, memory=None, trainingRequired=None, agentExecutionConfig=None, codeSource={}, latestAgentVersion={}, draftWorkflowGraph={}, workflowGraph={})

   Bases: :py:obj:`abacusai.return_class.AbstractApiClass`


   An AI agent.

   :param client: An authenticated API Client instance
   :type client: ApiClient
   :param name: The user-friendly name for the agent.
   :type name: str
   :param agentId: The unique identifier of the agent.
   :type agentId: str
   :param createdAt: Date and time at which the agent was created.
   :type createdAt: str
   :param projectId: The project this agent belongs to.
   :type projectId: str
   :param notebookId: The notebook associated with the agent.
   :type notebookId: str
   :param predictFunctionName: Name of the function found in the source code that will be executed run predictions through agent. It is not executed when this function is run.
   :type predictFunctionName: str
   :param sourceCode: Python code used to make the agent.
   :type sourceCode: str
   :param agentConfig: The config options used to create this agent.
   :type agentConfig: dict
   :param memory: Memory in GB specified for the deployment resources for the agent.
   :type memory: int
   :param trainingRequired: Whether training is required to deploy the latest agent code.
   :type trainingRequired: bool
   :param agentExecutionConfig: The config for arguments used to execute the agent.
   :type agentExecutionConfig: dict
   :param latestAgentVersion: The latest agent version.
   :type latestAgentVersion: AgentVersion
   :param codeSource: If a python model, information on the source code
   :type codeSource: CodeSource
   :param draftWorkflowGraph: The saved draft state of the workflow graph for the agent.
   :type draftWorkflowGraph: WorkflowGraph
   :param workflowGraph: The workflow graph for the agent.
   :type workflowGraph: WorkflowGraph


   .. py:attribute:: name
      :value: None



   .. py:attribute:: agent_id
      :value: None



   .. py:attribute:: created_at
      :value: None



   .. py:attribute:: project_id
      :value: None



   .. py:attribute:: notebook_id
      :value: None



   .. py:attribute:: predict_function_name
      :value: None



   .. py:attribute:: source_code
      :value: None



   .. py:attribute:: agent_config
      :value: None



   .. py:attribute:: memory
      :value: None



   .. py:attribute:: training_required
      :value: None



   .. py:attribute:: agent_execution_config
      :value: None



   .. py:attribute:: code_source


   .. py:attribute:: latest_agent_version


   .. py:attribute:: draft_workflow_graph


   .. py:attribute:: workflow_graph


   .. py:attribute:: deprecated_keys


   .. py:method:: __repr__()


   .. py:method:: to_dict()

      Get a dict representation of the parameters in this class

      :returns: The dict value representation of the class parameters
      :rtype: dict



   .. py:method:: refresh()

      Calls describe and refreshes the current object's fields

      :returns: The current object
      :rtype: Agent



   .. py:method:: describe()

      Retrieves a full description of the specified model.

      :param agent_id: Unique string identifier associated with the model.
      :type agent_id: str

      :returns: Description of the agent.
      :rtype: Agent



   .. py:method:: list_versions(limit = 100, start_after_version = None)

      List all versions of an agent.

      :param limit: If provided, limits the number of agent versions returned.
      :type limit: int
      :param start_after_version: Unique string identifier of the version after which the list starts.
      :type start_after_version: str

      :returns: An array of Agent versions.
      :rtype: list[AgentVersion]



   .. py:method:: copy(project_id = None)

      Creates a copy of the input agent

      :param project_id: Project id to create the new agent to. By default it picks up the source agent's project id.
      :type project_id: str

      :returns: The newly generated agent.
      :rtype: Agent



   .. py:property:: description
      :type: str


      The description of the agent.


   .. py:property:: agent_interface
      :type: str


      The interface that the agent will be deployed with.


   .. py:property:: agent_connectors
      :type: dict


      A dictionary mapping ApplicationConnectorType keys to lists of OAuth scopes. Each key represents a specific application connector, while the value is a list of scopes that define the permissions granted to the application.


   .. py:method:: wait_for_publish(timeout=None)

      A waiting call until agent is published.

      :param timeout: The waiting time given to the call to finish, if it doesn't finish by the allocated time, the call is said to be timed out.
      :type timeout: int



   .. py:method:: get_status()

      Gets the status of the agent publishing.

      :returns: A string describing the status of a agent publishing (pending, complete, etc.).
      :rtype: str



   .. py:method:: republish()

      Re-publishes the Agent and creates a new Agent Version.

      :returns: The new Agent Version.
      :rtype: AgentVersion



