> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NeatConfig reference

> Complete reference for configuring your NEAT session with data modeling modes and validation rules.

`NeatConfig` allows you to configure your NEAT session with specific [data modeling modes](/cdf/deploy/neat/data_modeling/modes) and [validation rules](/cdf/deploy/neat/validation/index). It provides pre-defined governance profiles that combine validation settings with data modeling behavior, or you can define custom profiles via a TOML configuration file. Review the available [data modeling modes](/cdf/deploy/neat/data_modeling/modes) and [validation rules](/cdf/deploy/neat/validation/index) before configuring your NEAT session.

## Class reference

`cognite.neat.NeatConfig` — Bases: `ConfigModel`

NeatSession configuration.

## Methods

### `__str__()`

Returns a human-readable configuration summary.

### `create_predefined(profile='legacy-additive')`

Create NeatConfig from internal profiles.

| Parameter | Type              | Description         | Default             |
| --------- | ----------------- | ------------------- | ------------------- |
| profile   | PredefinedProfile | Profile name to use | `'legacy-additive'` |

<Check title="Predefined profiles">
  * **legacy-additive** — Additive modeling with legacy validation rules
  * **legacy-rebuild** — Rebuild modeling with legacy validation rules
  * **deep-additive** — Additive modeling with deep validation rules
  * **deep-rebuild** — Rebuild modeling with deep validation rules
</Check>

## Example

```python theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
from cognite.neat import NeatConfig

config = NeatConfig.create_predefined(profile = "legacy-additive")
```

## Custom configuration via TOML file

You can define custom profiles in a TOML configuration file. Place the configuration file in your project root (e.g., `pyproject.toml` or `neat.toml`).

### Basic TOML structure

```toml theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
[tool.neat]
# Reference a profile (either built-in or custom)
profile = "my-custom-profile"

[tool.neat.modeling]
# Data modeling mode
# Options: "additive", "rebuild"
mode = "additive"

[tool.neat.validation]
# Validation rules to exclude (supports wildcard patterns)
exclude = []
```

### Custom profile example

Define your own profiles with specific validation rules.

```toml wrap theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
[tool.neat]
profile = "my-smart-profile"

[tool.neat.profiles.my-smart-profile.modeling]
mode = "additive"

[tool.neat.profiles.my-smart-profile.validation]
exclude = ["NEAT-DMS-AI-READINESS-*", "NEAT-DMS-CONNECTIONS-REVERSE-008"]
```

### Validation exclusion patterns

The `exclude` list supports wildcard patterns.

* `NEAT-DMS-AI-READINESS-*` — Excludes all AI-readiness validation rules
* `NEAT-DMS-CONNECTIONS-002` — Excludes a specific validation rule
* `*` — Excludes all validation rules (use with caution)

### Loading custom configuration

`cognite.neat.get_neat_config_from_file(config_file_name, profile)` — Get NeatConfig from file or internal profiles.

| Parameter          | Type | Description                | Default  |
| ------------------ | ---- | -------------------------- | -------- |
| config\_file\_name | str  | Path to configuration file | required |
| profile            | str  | Profile name to use        | required |

**Returns:** NeatConfig instance.

```python theme={"languages":{"custom":["/_languages/kuiper.json","../_languages/kuiper.json"]}}
from cognite.neat import get_neat_config_from_file

# Load from pyproject.toml or neat.toml
config = get_neat_config_from_file("pyproject.toml", profile="my-smart-profile")
```

<Warning>
  You cannot override the pre-defined profiles (`legacy-additive`, `legacy-rebuild`, `deep-additive`, `deep-rebuild`) in TOML files. Use custom profile names for your configurations.
</Warning>

## Further reading

* [NeatSession reference](/cdf/deploy/neat/reference/session) — Main interface for working with NEAT
* [About data modeling modes](/cdf/deploy/neat/data_modeling/modes) — Additive and rebuild modes
* [Validation rules](/cdf/deploy/neat/validation/index) — Validation rule reference
