Skip to main content

ACIToolkit

A toolkit for interacting with the ACI API.

init

Initialize the ACI toolkit. Parameters:
  • api_key (Optional[str]): The API key for authentication. (default: :obj:None)
  • base_url (Optional[str]): The base URL for the ACI API. (default: :obj:None)
  • linked_account_owner_id (Optional[str]): ID of the owner of the linked account, e.g., “johndoe” (default: :obj:None)
  • timeout (Optional[float]): Request timeout. (default: :obj:None)

search_tool

Search for apps based on intent. Parameters:
  • intent (Optional[str]): Search results will be sorted by relevance to this intent. (default: :obj:None)
  • allowed_app_only (bool): If true, only return apps that are allowed by the agent/accessor, identified by the api key. (default: :obj:True)
  • include_functions (bool): If true, include functions (name and description) in the search results. (default: :obj:False)
  • categories (Optional[List[str]]): List of categories to filter the search results. Defaults to an empty list. (default: :obj:None)
  • limit (Optional[int]): Maximum number of results to return. (default: :obj:10)
  • offset (Optional[int]): Offset for pagination. (default: :obj:0)
Returns: Optional[List[AppBasic]]: List of matching apps if successful, error message otherwise.

list_configured_apps

List all configured apps. Parameters:
  • app_names (Optional[List[str]]): List of app names to filter the results. (default: :obj:None)
  • limit (Optional[int]): Maximum number of results to return. (default: :obj:10)
  • offset (Optional[int]): Offset for pagination. (default: :obj:0) (default: 0)
Returns: Union[List[AppConfiguration], str]: List of configured apps if successful, error message otherwise.

configure_app

Configure an app with specified authentication type. Parameters:
  • app_name (str): Name of the app to configure.
Returns: Union[Dict, str]: Configuration result or error message.

get_app_configuration

Get app configuration by app name. Parameters:
  • app_name (str): Name of the app to get configuration for.
Returns: Union[AppConfiguration, str]: App configuration if successful, error message otherwise.

delete_app

Delete an app configuration. Parameters:
  • app_name (str): Name of the app to delete.
Returns: Optional[str]: None if successful, error message otherwise.
Link an account to a configured app. Parameters:
  • app_name (str): Name of the app to link the account to.
Returns: Union[LinkedAccount, str]: LinkedAccount object if successful, error message otherwise.

get_app_details

Get details of an app. Parameters:
  • app_name (str): Name of the app to get details for.
Returns: AppDetails: App details.

get_linked_accounts

List all linked accounts for a specific app. Parameters:
  • app_name (str): Name of the app to get linked accounts for.
Returns: Union[List[LinkedAccount], str]: List of linked accounts if successful, error message otherwise.

enable_linked_account

Enable a linked account. Parameters:
  • linked_account_id (str): ID of the linked account to enable.
Returns: Union[LinkedAccount, str]: Linked account if successful, error message otherwise.

disable_linked_account

Disable a linked account. Parameters:
  • linked_account_id (str): ID of the linked account to disable.
Returns: Union[LinkedAccount, str]: The updated linked account if successful, error message otherwise.

delete_linked_account

Delete a linked account. Parameters:
  • linked_account_id (str): ID of the linked account to delete.
Returns: str: Success message if successful, error message otherwise.

function_definition

Get the function definition for an app. Parameters:
  • app_name (str): Name of the app to get function definition for
Returns: Dict: Function definition dictionary.

search_function

Search for functions based on intent. Parameters:
  • app_names (Optional[List[str]]): List of app names to filter the search results. (default: :obj:None)
  • intent (Optional[str]): The search query/intent. (default: :obj:None)
  • allowed_apps_only (bool): If true, only return functions from allowed apps. (default: :obj:True)
  • limit (Optional[int]): Maximum number of results to return. (default: :obj:10)
  • offset (Optional[int]): Offset for pagination. (default: :obj:0)
Returns: List[Dict]: List of matching functions

execute_function

Execute a function call. Parameters:
  • function_name (str): Name of the function to execute.
  • function_arguments (Dict): Arguments to pass to the function.
  • linked_account_owner_id (str): To specify the end-user (account owner) on behalf of whom you want to execute functions You need to first link corresponding account with the same owner id in the ACI dashboard (https://platform.aci.dev).
  • allowed_apps_only (bool): If true, only returns functions/apps that are allowed to be used by the agent/accessor, identified by the api key. (default: :obj:False)
Returns: Dict: Result of the function execution

get_tools

Returns: List[FunctionTool]: List of FunctionTool objects representing available functions