> ## 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 Segment Budget • AI Agent SDK

> get_segment_budget: Get budget for a segment.

# get\_segment\_budget

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

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

Get budget for a segment.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_segment_budget(segment: ContextSegment) -> int
```

## Parameters

<ParamField query="segment" type="ContextSegment" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="int">
  The result of the operation.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/context/models.py#L136">
  `praisonaiagents/context/models.py` at line 136
</Card>
