Skip to content

Update Agents

Update Agent

The update_agent() function allows you to update the information of an existing agent in Blipper. This function takes the following parameters:

  • agent_id (type: str): The ID of the agent to be updated, provided as a string.
  • agent_info (type: dict): A dictionary containing the information to be updated for the agent. This dictionary can include one or more of the following keys:
    • "name" (type: str): The name of the agent.
    • "description" (type: str): A description of the agent's purpose.
    • "task" (type: str): A task associated with the agent, indicating its primary function or responsibility.
1
2
3
4
5
6
7
8
9
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo", verbose=False)

agent_id: str = blip_obj.update_agent(
    agent_id="my_agent_id",
    agent_info={"task": "Briefly answer users' questions related \
        to your food business."}
)

The update_agent() function returns the ID of the updated agent as a string.

Multiple agent information updates

If you need to update more information of the agent you can do it adding the information in the agent_info argument Here is an example usage with multiple agent information updates:

1
2
3
4
5
6
7
8
agent_id: str = blip_obj.update_agent(
    agent_id="my_agent_id",
    agent_info={
        "name": "The new agent name",
        "description": "The new agent description",
        "task": "The new agent task"
    }
)