abacusai.agent — AbacusAI documentation

# `abacusai.agent`

## Module Contents

### Classes

`Agent` | An AI agent.

class abacusai.agent.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={})

  Bases: `abacusai.return_class.AbstractApiClass`

  An AI agent.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - name (str) – The user-friendly name for the agent.

    - agentId (str) – The unique identifier of the agent.

    - createdAt (str) – Date and time at which the agent was created.

    - projectId (str) – The project this agent belongs to.

    - notebookId (str) – The notebook associated with the agent.

    - predictFunctionName (str) – 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.

    - sourceCode (str) – Python code used to make the agent.

    - agentConfig (dict) – The config options used to create this agent.

    - memory (int) – Memory in GB specified for the deployment resources for the agent.

    - trainingRequired (bool) – Whether training is required to deploy the latest agent code.

    - agentExecutionConfig (dict) – The config for arguments used to execute the agent.

    - latestAgentVersion (AgentVersion) – The latest agent version.

    - codeSource (CodeSource) – If a python model, information on the source code

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      Agent

  describe()

    Retrieves a full description of the specified model.

    Parameters:

      agent_id (str) – Unique string identifier associated with the model.

    Returns:

      Description of the agent.

    Return type:

      Agent

  wait_for_publish(timeout=None)

    A waiting call until agent is published.

    Parameters:

      timeout (int, optional) – 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.

  get_status()

    Gets the status of the agent publishing.

    Returns:

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

    Return type:

      str