Dataiku Agents#

For usage information and examples, please see Dataiku Agents

class dataikuapi.dss.agent.DSSAgentListItem(client, data)#

An item in a list of agents

Important

Do not instantiate this class directly, instead use dataikuapi.dss.project.DSSProject.list_agents().

property project_key#
Returns:

The project

Return type:

string

property id#
Returns:

The id of the agent.

Return type:

string

property name#
Returns:

The name of the agent.

Return type:

string

as_llm()#

Returns this agent as a usable dataikuapi.dss.llm.DSSLLM for querying

class dataikuapi.dss.agent.DSSAgent(client, project_key, id)#

A handle to interact with a DSS-managed agent.

Important

Do not create this class directly, use dataikuapi.dss.project.DSSProject.get_agent() instead.

property id#
as_llm()#

Returns this agent as a usable dataikuapi.dss.llm.DSSLLM for querying

get_settings()#

Get the agent’s definition

Returns:

a handle on the agent definition

Return type:

dataikuapi.dss.agent.DSSAgentSettings

delete()#

Delete the agent

class dataikuapi.dss.agent.DSSAgentSettings(client, settings)#

Settings for a agent

Important

Do not instantiate directly, use dataikuapi.dss.agent.DSSAgent.get_settings() instead

get_version_ids()#
property active_version#

Returns the active version of this agent. May return None if no version is declared as active

get_version_settings(version_id)#
property type#
get_raw()#

Returns the raw settings of the agent :return: the raw settings of the agent :rtype: dict

save()#

Saves the settings on the agent

class dataikuapi.dss.agent.DSSAgentVersionSettings(settings, version_settings)#
get_raw()#
property llm_id#

Only for Visual Agents :rtype: str

property tools#

Returns the list of tools of the agent. The list can be modified.

Each tool is a dict, containing at least “toolRef”, which is the identifier of the tool. The dict may also contain “additionalDescription” which is added to the description of the tool

add_tool(tool)#

Adds a tool to the agent

Parameters:

tool – a string (identifier of the tool), or a dataikuapi.dss.agent_tool.DSSAgentTool

class dataikuapi.dss.agent_tool.DSSAgentToolListItem(client, project_key, data)#

Important

Do not instantiate this class directly, instead use dataikuapi.dss.project.DSSProject.list_agent_tools().

to_agent_tool()#

Convert the current item.

property id#
Returns:

The id of the tool.

Return type:

string

property type#
Returns:

The type of the tool

Return type:

string

property name#
Returns:

The name of the tool

Return type:

string

class dataikuapi.dss.agent_tool.DSSAgentTool(client, project_key, tool_id, descriptor=None)#

Important

Do not instantiate this class directly, instead use dataikuapi.dss.project.DSSProject.get_agent_tool().

property id#
Returns:

The id of the tool.

Return type:

string

get_descriptor()#
get_settings()#

Get the agent tools’ settings

Returns:

a handle on the tool settings

Return type:

dataikuapi.dss.agent_tool.DSSAgentToolSettings or a subclass

delete()#

Delete the agent tool

as_langchain_structured_tool(context=None)#
run(input, context=None)#
class dataikuapi.dss.agent_tool.DSSAgentToolCreator(project, type, name, id)#

Helper to create new agent tools

Important

Do not instantiate directly, use dataikuapi.dss.project.DSSProject.new_agent_tool() instead.

create()#

Creates the new agent tool in the project, and return a handle to interact with it.

Return type:

dataikuapi.dss.agent_tool.DSSAgentTool

class dataikuapi.dss.agent_tool.DSSAgentToolSettings(agent_tool, settings)#
get_raw()#
property params#

The parameters of the tool, as a dict. Changes to the dict will be reflected when saving

save()#

Saves the settings of the agent tool

property custom_fields#

The custom fields of the object as a dict. Returns None if there are no custom fields

property description#

The description of the object as a string

property short_description#

The short description of the object as a string

property tags#

The tags of the object, as a list of strings

class dataikuapi.dss.agent_tool.DSSVectorStoreSearchAgentToolCreator(project, type, name, id)#
with_knowledge_bank(kb)#
create()#

Creates the new agent tool in the project, and return a handle to interact with it.

Return type:

dataikuapi.dss.agent_tool.DSSAgentTool

class dataikuapi.dss.agent_tool.DSSVectorStoreSearchAgentToolSettings(agent_tool, settings)#
set_knowledge_bank(kb)#
property custom_fields#

The custom fields of the object as a dict. Returns None if there are no custom fields

property description#

The description of the object as a string

get_raw()#
property params#

The parameters of the tool, as a dict. Changes to the dict will be reflected when saving

save()#

Saves the settings of the agent tool

property short_description#

The short description of the object as a string

property tags#

The tags of the object, as a list of strings