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

# With Ratios • Rust AI Agent SDK

> with_ratios: Create with custom ratios

# with\_ratios

<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 [**context**](../modules/context) module.

Create with custom ratios

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def with_ratios(total: usize, system_pct: f64, history_pct: f64, tools_pct: f64) -> Self
```

## Parameters

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

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

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

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

### Returns

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