> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Next Profile • AI Agent SDK

> get_next_profile: Get the next available profile.

# get\_next\_profile

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**FailoverManager**](../classes/FailoverManager) class in the [**failover**](../modules/failover) module.

Get the next available profile.

Returns profiles in priority order, skipping those that are
rate limited or in cooldown.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_next_profile() -> Optional[AuthProfile]
```

### Returns

<ResponseField name="Returns" type="Optional[AuthProfile]">
  The next available profile, or None if all are unavailable
</ResponseField>

## Uses

* `time.time`
* `profile.reset`

## Used By

* [`FailoverManager.mark_failure`](../functions/FailoverManager-mark_failure)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/llm/failover.py#L287">
  `praisonaiagents/llm/failover.py` at line 287
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Agent Profiles" icon="id-card" href="/docs/features/agent-profiles" />

  <Card title="Profiling" icon="chart-line" href="/docs/features/profiling" />
</CardGroup>
