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

# Legacy Config Rule • AI Agent SDK

> LegacyConfigRule: A single declarative config-migration rule.

# LegacyConfigRule

> Defined in the [**config**](../modules/config) module.

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

A single declarative config-migration rule.

`detect` returns True when the (old) shape this rule fixes is present in
the raw config mapping; `fix` returns the mutated mapping moving it toward
the current version; `reason` is an operator-facing description rendered by
`gateway doctor --fix`. Rules are pure functions of the raw mapping so the
same set can be reasoned about, tested, and applied identically everywhere.

## Properties

<ResponseField name="detect" type="Callable">
  No description available.
</ResponseField>

<ResponseField name="fix" type="Callable">
  No description available.
</ResponseField>

<ResponseField name="reason" type="str">
  No description available.
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/config.py#L50">
  `praisonaiagents/gateway/config.py` at line 50
</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>
