Skip to main content

Update Agent

Using this API you can update the agent's name, description, and other relevant details to ensure that the information is current and accurate. You can also modify the agent's configuration if necessary.

Update Agent

You can update an agent's name, description, deployment target, icon, and YAML configuration using the following code.

Python
from svahnar import Svahnar
from pathlib import Path

client = Svahnar()

response = client.agents.update(
agent_id="8bd57aa1-a982-49ba-b6f6-91e84e5dfe9c",
name="Updated Agent Name",
description="Updated description for the agent.",
hosted_to="Organization", # or "AgentStore"
yaml_file=Path("agent.yaml"),
agent_icon=Path("icon.png"),
)

print(response)

Request Parameters

  • agent_id: The unique identifier of the agent whose details you want to update.
  • name: The new name for the agent. This is an optional parameter.
  • description: The new description for the agent. This is an optional parameter.
  • hosted_to: The new deployment type, either Organization or AgentStore. This is an optional parameter.
    • Organization: The agent is hosted within your organization.
    • AgentStore: The agent is hosted in the agent store, making it publicly available.
  • yaml_file: The path to the new YAML configuration file. This is an optional parameter.
  • agent_icon: The path to the new agent icon file. This is an optional parameter.

Response

json
{
"message": "Agent updated successfully."
}