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
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.
import Gradient from '@digitalocean/gradient';
const client = new Gradient();
while (true) {
const agent = await client.agents.retrieve('123e4567-e89b-12d3-a456-426614174000');
if (agent.agent.deployment.status !== "STATUS_RUNNING") {
continue;
}
}
This should of course handle failed states for errors and such