You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 17, 2026. It is now read-only.
Create a helper function to poll for agent deployment readiness #40
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
@bbatha Please assign this issue to me. I’ll implement proper polling with backoff, timeout, and error handling for agent deployment so users don’t have to manually loop for STATUS_RUNNING
Activity
digvijay-y commentedon Oct 7, 2025
I'm up for this!
shreya112003 commentedon Oct 7, 2025
Hi @bbatha
I’d like to work on this issue.
Approach:
Create a helper function (e.g., poll_for_agent_ready) that polls the agent’s deployment status until it’s "STATUS_RUNNING".
Add handling for terminal error states to prevent infinite loops.
Include a configurable polling interval and timeout.
Add brief tests and docstrings for clarity.
Could you please assign this issue to me? I’ll follow the repo’s contribution guidelines and open a PR soon.
Thanks!
Aazib-at-hub commentedon Oct 7, 2025
@bbatha Please assign this issue to me. I’ll implement proper polling with backoff, timeout, and error handling for agent deployment so users don’t have to manually loop for STATUS_RUNNING
Raj-Dwivedi2005 commentedon Oct 8, 2025
Hi! I’m interested in working on this issue. Could you please assign it to me? Thank you!
feat: Add wait_until_ready() method for agent deployment polling
cipheraxat commentedon Oct 11, 2025
Hey @bbatha hope you are doing well. I have created a PR. Could you please review it and share your comments?
feat: Add wait_until_ready() method for agent deployment polling (#56)