Get Rules Context • AI Agent SDK

get_rules_context: Get rules context for the current conversation.

get_rules_context

Method

</div>

This is a method of the Agent class in the agent module.

Get rules context for the current conversation.

Signature

python
def get_rules_context(file_path: Optional[str], include_manual: Optional[List[str]]) -> str

Parameters

ParamField Optional[str]

Optional file path for glob-based rule matching

ParamField Optional

Optional list of manual rule names to include (via @mention)

Returns

ResponseField str

Formatted rules context string

Uses

  • build_rules_context

Source

View on GitHub

praisonaiagents/agent/agent.py at line 6329


Related Documentation