Agent M

Introduction to Agent M

Agent M is a functionality for creating AI agents that are completely powered GenAI enabled. It uses prompts and various tools to help build smart and effective AI systems.

Agent M Introduction

Understanding Master Agent

Master agent is the agent that includes all the common or predefined instructions that need to be passed to all sub agents. An example of how a Master agent looks is as below. This agent commonly includes the rules, Common instructions, Behavior.

understanding master agent

Creating Sub Agents

As mentioned, the Master agent has the common instructions required. Now to create use case specific agents, you need to create a Custom Sub agent. The Sub agent should have specific steps that need to be followed by LLM in a structured format. And example of an Custom Agent prompt is mentioned below.

Creating sub agents

Creating Tools

Whenever an API needs to be called in those cases, we need to create Tools. There are multiple uses of tools, but for now we would learn how to create tools.
NOTE: Each Agent can have multiple tools, and each Agent can have separate tools enabled\
To create a tool, check the video provided below

 

Each tool includes the things below to be added.

  1. The name of the tool. The name should be a relevant as per its use.
  2. A very short description of what that tool does.
  3. Functional parameters:
    1. Name: This parameter should have the attribute that needs to be passed to the snippet.
    2. Type: Type is the datatype of the attribute. It can be a number or string.
    3. Description: A very short description of the parameter.
  4. Snippet: Select the relevant snippet that needs to be triggered.
  5. Speak during execution is a functionality that enables user engagement. If the tool takes some time to process, in that case the AgentM will say this message to inform the user that we are processing the request.

 

Different Uses of Tools

Tools can be defined for multiple purposes.

  1. To invoke a Flow
  2. To invoke a Snippet
  3. To invoke Cognitive search

Invoke flow: When the control needs to be shifted from Agent to the flow, we need to define a Transition tool to trigger the flow.
For e.g.: if you want to trigger a flow named “Authenticate_user”, You need to write a specific instruction saying, “Call transition tool “Authenticate_user” as argument”. And example of same is given below.
NOTE: The name of the flow should be exactly written in the prompt to initiate the flow.

different uses of tools

Invoke a snippet: to invoke a snippet, simply write “Call tool “name of tool” with required arguments”. For e.g.: We have a tool named “initiate_payment” and we need to call that tool, so the instructions would be “Call tool “initiate_payment” with required arguments”.

different uses of tools

Invoke Cognitive search: Whenever a query needs to be answered from the Cognitive knowledge base, the “Cognitive tool” needs to be enabled. An instruction saying “If you do not understand anything, or you are not able to answer a query then call tool “cognitive_search” with proper arguments” in the master agent.