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

# Validate Config • AI Agent SDK

> validate_config: Validate config file structure and types.

# validate\_config

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**loader**](../modules/loader) module.

Validate config file structure and types.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def validate_config(config: Dict[str, Any], raise_on_error: bool) -> List[str]
```

## Parameters

<ParamField query="config" type="Dict" required={true}>
  Raw config dict (from TOML parsing)
</ParamField>

<ParamField query="raise_on_error" type="bool" required={false} default="False">
  If True, raise ConfigValidationError on errors
</ParamField>

### Returns

<ResponseField name="Returns" type="List[str]">
  List of validation error messages (empty if valid)
</ResponseField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
config = {"plugins": {"enabled": True}, "defaults": {"model": "gpt-4o"}}
    errors = validate_config(config)
    if errors:
        print("Config errors:", errors)
```

## Uses

* `ConfigValidationError`

## Source

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

***

## Related Documentation

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

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