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

# Get Rules Context • AI Agent SDK

> get_rules_context: Get rules context for the current conversation.

# get\_rules\_context

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Agent**](../classes/Agent) class in the [**agent**](../modules/agent) module.

Get rules context for the current conversation.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def get_rules_context(file_path: Optional[str], include_manual: Optional[List[str]]) -> str
```

## Parameters

<ParamField query="file_path" type="Optional" required={false}>
  Optional file path for glob-based rule matching
</ParamField>

<ParamField query="include_manual" type="Optional" required={false}>
  Optional list of manual rule names to include (via @mention)
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  Formatted rules context string
</ResponseField>

## Uses

* `build_rules_context`

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Context Concept" icon="layer-group" href="/docs/concepts/context" />

  <Card title="Context Management" icon="sliders" href="/docs/features/context-management" />

  <Card title="Context Strategies" icon="diagram-project" href="/docs/features/context-strategies" />
</CardGroup>
