Creates a draft or publishes an agent. Use isDraft=true to save a draft, or isDraft=false (or omit) to publish immediately. Only draft and publish modes are supported.
from glean.api_client import Glean
import os
with Glean(
api_token=os.getenv("GLEAN_API_TOKEN", ""),
) as glean:
glean.agents.edit_agent(agent_id="<id>")
# Use the SDK ...
| Parameter |
Type |
Required |
Description |
agent_id |
str |
✔️ |
The ID of the agent. |
locale |
Optional[str] |
➖ |
The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en. |
timezone_offset |
Optional[int] |
➖ |
The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. |
name |
Optional[str] |
➖ |
The name of the workflow. |
id |
Optional[str] |
➖ |
The workflow ID we want to update. |
retries |
Optional[utils.RetryConfig] |
➖ |
Configuration to override the default retry behavior of the client. |
| Error Type |
Status Code |
Content Type |
| errors.ErrorResponse |
404 |
application/json |
| errors.GleanError |
4XX, 5XX |
*/* |