# Runtime configurations

:::callout{intent="info" title="Added in `v1.30`"}
:::

Weaviate supports runtime configuration management, allowing certain environment variables to be updated and read by Weaviate on the fly without the need for restarts. This feature helps you adapt settings in real time and fine-tune your instance based on evolving needs.

For more information on how to **use runtime configuration**, look at the [user guide](../database-configuration/runtime-config.md). This document talks about how to add support to the configs to be changed dynamically during runtime.

## Add support for configuration changes during runtime

We have two core types used to manage your configs dynamically: `runtime.DynamicType` and `runtime.DynamicValue`. These look roughly like this:

```go
// DynamicType represents different types that is supported in runtime configs
type DynamicType interface {
    ~int | ~float64 | ~bool | time.Duration | ~string | []string
}

// DynamicValue represents any runtime config value. Its zero value is fully usable.
// If you want zero value with different `default`, use `NewDynamicValue` constructor.
type DynamicValue[T DynamicType] struct {
    ...[private fields]
}
```

This means `DynamicType` currently supports the types: `~int`, `~float64`, `~bool`, `~string`, `time.Duration`, and `[]string`.

If you want a config option to support dynamic updates, follow these high-level steps. For example, suppose you have a config called `MaxLimit` of type `int`.

```go
type Config struct {
    ....
    MaxLimit int
}
```

### 1. Convert `int` -> `DynamicValue[int]` (or the appropriate type)

```go
type Config struct {
    MaxLimit *runtime.DynamicValue[int]
}
```

Also update the config parsing code (usually `FromEnv()` in `weaviate/usecases/config/environment.go`).

```go
    config.MaxLimit = runtime.NewDynamicValue(12) // default value for your config is `12` now
```

### 2. Add it to `config.WeaviateRuntimeConfig`

```go
type WeaviateRuntimeConfig struct {
    ...
    MaxLimit *runtime.DynamicValue[int] `json:"max_limit" yaml:"max_limit"`
}
```

### 3. Register your config in `runtime.ConfigManager`

This usually happens in `initRuntimeOverrides()` in `adaptors/handlers/rest/configure_api.go`.

```go
    registered := &config.WeaviateRuntimeConfig{}
    ...
    registered.MaxLimit = appState.ServerConfig.Config.MaxLimit
```

### 4. Consume the dynamic value via `value.Get()`

To access the current value of the config, use `config.MaxLimit.Get()` instead of referencing `config.MaxLimit` directly. This ensures you get the updated value dynamically.

:::callout{intent="info"}
When `RUNTIME_OVERRIDES_ENABLED=false`, your config still behaves as a static config and uses the default value (`12` in this example) provided via `NewDynamicValue(12)`.
:::

## Further resources

- [Configuration: Runtime configuration management](../database-configuration/runtime-config.md)
- [Weaviate GitHub repository](https://github.com/weaviate/weaviate/)

## Questions and feedback

Have a question or feedback? Here's how to reach us.

::::card-grid
:::card{title="Community Forum" href="https://forum.weaviate.io/c/support" icon="messages-square"}
Ask questions and connect with other developers on our **Community forum**.
:::

:::card{title="Support" href="/guides/support-overview" icon="life-buoy"}
Weaviate Cloud user or customer? Find the right channel on the **Support page**.
:::
::::

## Related pages

- [Agents](./agents-index.md)
- [AI-assisted Weaviate code generation](./ai-assisted-vibe-coding-index.md)
- [APIs](./apis-index.md)
- [Authorization and authentication](./authorization-and-authentication-index.md)
- [Benchmarks](./benchmarks-index.md)
- [Best practices](./best-practices-index.md)
- [Client libraries](./clients-index.md)
- [Client Libraries / SDKs](./client-libraries-index.md)
- [Cloud](./cloud-index.md)
- [Cloud account management](./cloud-account-management-index.md)

# Agent Instructions

This portal answers questions programmatically. To receive a synthesized,
source-cited answer instead of crawling page by page, append the `?ask=`
query parameter to any page URL on this site:

    /guides/quickstart?ask=how+do+I+authenticate

Optional parameters:

- `&goal=<what-you-are-trying-to-do>` steers the answer toward your
  objective (e.g. `&goal=write+a+python+client`).
- `&version=<label>` scopes the answer to a mounted version when the
  portal publishes more than one.

The response is `text/markdown`: the answer followed by a `# Sources` list
of the portal pages it was grounded in. Status codes are the contract:

- `200` — the answer; `402` — the portal owner’s plan or answer credits are
  exhausted (surface this to your operator; do NOT retry); `429` — you are
  rate-limited; back off for the `Retry-After` seconds; `503` — the answer
  lane is temporarily unavailable; fall back to crawling the `.md` pages.

For the full corpus map read `llms.txt` at the site root; for the tool
surface (search + page fetch as MCP tools) see `/mcp`.
