Skip to content

ReasonersConfig

relationalai.config.config_reasoners_fields

Configure defaults for the reasoners API.

This section lives under reasoners in raiconfig.yaml and controls the reasoners backend, polling behavior for long-running operations, and default settings for each reasoner type (logic, predictive, prescriptive).

Minimal YAML (in raiconfig.yaml):

default_connection: sf
connections:
sf:
type: snowflake
# ...
reasoners:
backend: direct_access
direct_access_base_url: https://reasoners.example.com
poll_max_delay_s: 2.0
logic:
size: HIGHMEM_X64_S
auto_suspend_mins: 60

Configure reasoners settings using a dict:

>>> from relationalai.config import Config
>>> cfg = Config(reasoners={
... "backend": "direct_access",
... "direct_access_base_url": "https://reasoners.example.com",
... "poll_max_delay_s": 2.0,
... "logic": {"size": "HIGHMEM_X64_S", "auto_suspend_mins": 60},
... })
ReasonersConfig.backend: {'sql', 'direct_access'}

Backend used for reasoners APIs.

ReasonersConfig.direct_access_base_url: (str, optional)

Direct Access service base URL (required when backend="direct_access").

ReasonersConfig.show_all_sizes: bool

Show all available reasoner sizes (includes internal/dev sizes).

ReasonersConfig.poll_initial_delay_s: float

Initial delay between polls when waiting for operations to complete.

ReasonersConfig.poll_overhead_rate: float

Exponential backoff growth rate per poll (for example, 0.2 means +20% per poll).

ReasonersConfig.poll_max_delay_s: float

Maximum poll delay.

ReasonersConfig.logic: LogicReasonerConfig

Defaults for the logic reasoner.

ReasonersConfig.predictive: ReasonerConfig

Defaults for the predictive reasoner.

ReasonersConfig.prescriptive: ReasonerConfig

Defaults for the prescriptive reasoner.

ReasonersConfigpydantic.BaseModel
RelationalAI Documentation
└──  Build With RelationalAI
    └──  Understand how PyRel works > Configure PyRel
        └──  Configure reasoners
            ├──  Choose a reasoner backend (SQL vs Direct Access)
            └──  Configure reasoner polling behavior