Rules Config • AI Agent SDK

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

RulesConfig

Defined in the Feature Configs module.

AI Agent

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 Optional[int]

No description available.

ResponseField Optional

No description available.

ResponseField Optional[str]

No description available.

Internal & Generic Methods
  • to_dict: Convert to dictionary.

Usage

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

View on GitHub

praisonaiagents/config/feature_configs.py at line 537


Related Documentation