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

# Context Budgeter CLI

> CLI reference for context budget configuration

Configure context budget allocation via CLI flags and interactive commands.

## CLI Flags

### Output Reserve

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Set output token reserve
praisonai chat --context-output-reserve 16000
```

Default: 8000 tokens

## Interactive Commands

### View Budget

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> /context budget
```

**Output:**

```
Budget Allocation
  Model Limit:     128,000
  Output Reserve:  8,000
  Usable:          120,000

  Segment Budgets:
    System Prompt: 2,000
    Rules:         500
    Skills:        500
    Memory:        1,000
    Tool Schemas:  2,000
    Tool Outputs:  20,000
    History:       84,616
    Buffer:        1,000
```

### View Stats

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
> /context stats
```

Shows current usage vs budget per segment.

## Environment Variables

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export PRAISONAI_CONTEXT_OUTPUT_RESERVE=8000
```

## config.yaml

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
context:
  output_reserve: 8000
  default_tool_output_max: 10000
```

## Model Limits

| Model          | Context Limit | Default Reserve |
| -------------- | ------------- | --------------- |
| gpt-4o         | 128,000       | 16,384          |
| gpt-4o-mini    | 128,000       | 16,384          |
| gpt-4-turbo    | 128,000       | 4,096           |
| claude-3-opus  | 200,000       | 8,192           |
| gemini-1.5-pro | 2,097,152     | 8,192           |

## Troubleshooting

### Not enough space for output

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Increase output reserve
praisonai chat --context-output-reserve 16000
```

### Context filling too fast

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Lower threshold for earlier compaction
praisonai chat --context-threshold 0.7
```
