Skip to content
  • Auto
  • Light
  • Dark

Update

Rollback to Agent Version
agents.versions.update(strpath_uuid, VersionUpdateParams**kwargs) -> VersionUpdateResponse
put/v2/gen-ai/agents/{uuid}/versions

To update to a specific agent version, send a PUT request to /v2/gen-ai/agents/{uuid}/versions.

ParametersExpand Collapse
uuid: str
uuid: str
version_hash: Optional[str]

Unique identifier

ReturnsExpand Collapse
class VersionUpdateResponse:
audit_header: Optional[AuditHeader]

An alternative way to provide auth information. for internal use only.

actor_id: Optional[str]
actor_ip: Optional[str]
actor_uuid: Optional[str]
context_urn: Optional[str]
origin_application: Optional[str]
user_id: Optional[str]
user_uuid: Optional[str]
version_hash: Optional[str]

Unique identifier

from gradient import Gradient

client = Gradient()
version = client.agents.versions.update(
    path_uuid="\"123e4567-e89b-12d3-a456-426614174000\"",
)
print(version.audit_header)
{
  "audit_header": {
    "actor_id": "12345",
    "actor_ip": "example string",
    "actor_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "context_urn": "example string",
    "origin_application": "example string",
    "user_id": "12345",
    "user_uuid": "123e4567-e89b-12d3-a456-426614174000"
  },
  "version_hash": "example string"
}
Returns Examples
{
  "audit_header": {
    "actor_id": "12345",
    "actor_ip": "example string",
    "actor_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "context_urn": "example string",
    "origin_application": "example string",
    "user_id": "12345",
    "user_uuid": "123e4567-e89b-12d3-a456-426614174000"
  },
  "version_hash": "example string"
}