Agent Loader

ibm_watsonx_gov.agent_catalog.core.agent_loader.get_agent_input_data_from_schema(schema: dict)

Generates the input data based on the schema

Parameters:

schema (dict) – agent schema.

Returns:

Input data to pass to the agent.

Return type:

str

ibm_watsonx_gov.agent_catalog.core.agent_loader.invoke(agent: AgentInterface, input_data: dict) dict

Executes the agent that implements AgentInterface.

Parameters:
  • agent (AgentInterface) – The agent instance to invoke.

  • input_data (dict) – Input to pass to the agent.

Returns:

Output from the agent.

Return type:

dict

ibm_watsonx_gov.agent_catalog.core.agent_loader.load_agent(agent_name: str, **kwargs) AgentInterface

Loads the agent based on agent name and framework information

Parameters:

agent_name – Agent name

Returns:

The agent instance

Return type:

AgentInterface