When a Gradient AI Platform Agent is started it needs to deploy which can take 30s or longer. Currently users must write loops to poll for the agent state, roughly.
from gradient import Gradient
client = Gradient()
while True:
agent = client.agents.retrieve(
"uuid",
)
if agent.agent.deployment.status != "STATUS_RUNNING":
continue
This should of course handle failed states for errors and such