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

# Apply Budget • AI Agent SDK

> apply_budget: Apply budget constraints to a list of skills.

# apply\_budget

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**budget**](../modules/budget) module.

Apply budget constraints to a list of skills.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def apply_budget(skills: List[SkillMetadata], budget: SkillPromptBudget) -> tuple[List[SkillMetadata], bool]
```

## Parameters

<ParamField query="skills" type="List[SkillMetadata]" required={true}>
  List of skill metadata to potentially include
</ParamField>

<ParamField query="budget" type="SkillPromptBudget" required={true}>
  Budget constraints to apply
</ParamField>

### Returns

<ResponseField name="Returns" type="tuple[List[SkillMetadata], bool]">
  Tuple of (filtered\_skills, was\_truncated)
</ResponseField>

## Used By

* [`generate_skills_xml`](../functions/generate_skills_xml)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/skills/budget.py#L53">
  `praisonaiagents/skills/budget.py` at line 53
</Card>
