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

# Rules Config • AI Agent SDK

> RulesConfig: Configuration for auto-applying per-project rules/instructions.

# RulesConfig

> Defined in the [**Feature Configs**](../modules/feature_configs) module.

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

Configuration for auto-applying per-project rules/instructions.

Discovers and injects per-repository instruction files (AGENTS.md,
CLAUDE.md, .praisonai/rules/\*.md, etc.) into the agent system prompt
on every run, honouring the existing activation modes (always, glob,
manual, ai\_decision), priority ordering, and a character budget.

## Properties

<ResponseField name="char_budget" type="Optional[int]">
  No description available.
</ResponseField>

<ResponseField name="files" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="workspace_path" type="Optional[str]">
  No description available.
</ResponseField>

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

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Simple enable (auto-discover + apply)
    Agent(rules=True)

    # Opt out (reproducible/sandboxed runs)
    Agent(rules=False)

    # With config
    Agent(rules=RulesConfig(
        char_budget=6000,
        files=["docs/CONVENTIONS.md"],
    ))
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/config/feature_configs.py#L457">
  `praisonaiagents/config/feature_configs.py` at line 457
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Configuration Overview" icon="gear" href="/docs/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/docs/configuration/agent-config" />
</CardGroup>
