> ## 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.

# Budget Allocation • AI Agent SDK

> BudgetAllocation: Token budget allocation across segments.

# BudgetAllocation

> Defined in the [**models**](../modules/models) module.

<Badge color="blue">AI Agent</Badge>

Token budget allocation across segments.

Specifies maximum tokens allowed per segment.

## Properties

<ResponseField name="model_limit" type="int">
  No description available.
</ResponseField>

<ResponseField name="output_reserve" type="int">
  No description available.
</ResponseField>

<ResponseField name="system_prompt" type="int">
  No description available.
</ResponseField>

<ResponseField name="rules" type="int">
  No description available.
</ResponseField>

<ResponseField name="skills" type="int">
  No description available.
</ResponseField>

<ResponseField name="memory" type="int">
  No description available.
</ResponseField>

<ResponseField name="tools_schema" type="int">
  No description available.
</ResponseField>

<ResponseField name="history" type="int">
  No description available.
</ResponseField>

<ResponseField name="tool_outputs" type="int">
  No description available.
</ResponseField>

<ResponseField name="buffer" type="int">
  No description available.
</ResponseField>

## Methods

<CardGroup cols={2}>
  <Card title="usable()" icon="function" href="../functions/BudgetAllocation-usable">
    Usable tokens after output reserve.
  </Card>

  <Card title="fixed_total()" icon="function" href="../functions/BudgetAllocation-fixed_total">
    Total of fixed segment budgets.
  </Card>

  <Card title="history_budget()" icon="function" href="../functions/BudgetAllocation-history_budget">
    Computed history budget (remainder after fixed segments).
  </Card>

  <Card title="get_segment_budget()" icon="function" href="../functions/BudgetAllocation-get_segment_budget">
    Get budget for a segment.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

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