Skip to content

Commit a500a55

Browse files
authored
Merge pull request #17 from redis-applied-ai/docs-config-formatting-fix
Improve configuration docs formatting
2 parents 5b93e33 + 68ea741 commit a500a55

File tree

1 file changed

+28
-16
lines changed

1 file changed

+28
-16
lines changed

docs/how-to/configuration.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
## Configuration
22

3-
This guide explains how the Redis SRE Agent is configured, what the required and optional settings are, and how to override tool providers. For defaults, see redis_sre_agent/core/config.py and .env.example.
3+
This guide explains how the Redis SRE Agent is configured, what the required and optional settings are, and how to override tool providers. For defaults, see [`redis_sre_agent/core/config.py`](https://github.com/redis-applied-ai/redis-sre-agent/blob/main/redis_sre_agent/core/config.py) and [`.env.example`](https://github.com/redis-applied-ai/redis-sre-agent/blob/main/.env.example).
44

55
### Sources and precedence
6+
7+
Configuration values are loaded from these sources (highest precedence first):
8+
69
- Environment variables (recommended for prod)
7-
- .env file (loaded automatically in dev if present)
8-
- Code defaults in redis_sre_agent/core/config.py
10+
- `.env` file (loaded automatically in dev if present)
11+
- Code defaults in `redis_sre_agent/core/config.py`
912

1013
### Required
11-
- OPENAI_API_KEY: Your OpenAI API key
14+
15+
- `OPENAI_API_KEY`: Your OpenAI API key
1216

1317
### Common optional settings
14-
- REDIS_URL: Agent operational Redis (default: redis://localhost:7843/0)
15-
- PROMETHEUS_URL/GRAFANA_URL: Optional app-level URLs for integrations
16-
- TOOLS_PROMETHEUS_URL / TOOLS_LOKI_URL: Tool-specific endpoints
17-
- API_KEY: API auth key (if you enable auth)
18-
- ALLOWED_HOSTS: CORS origins (default: ["*"])
1918

20-
Example .env (local):
19+
- `REDIS_URL`: Agent operational Redis (default: `redis://localhost:7843/0`)
20+
- `PROMETHEUS_URL` / `GRAFANA_URL`: Optional app-level URLs for integrations
21+
- `TOOLS_PROMETHEUS_URL` / `TOOLS_LOKI_URL`: Tool-specific endpoints
22+
- `API_KEY`: API auth key (if you enable auth)
23+
- `ALLOWED_HOSTS`: CORS origins (default: `["*"]`)
24+
25+
Example `.env` (local):
26+
2127
```bash
2228
OPENAI_API_KEY=your_openai_key
2329
REDIS_URL=redis://localhost:7843/0
@@ -27,12 +33,15 @@ TOOLS_LOKI_URL=http://localhost:3100
2733
```
2834

2935
### Tool providers
30-
Providers are loaded by the ToolManager based on:
36+
37+
Providers are loaded by the `ToolManager` based on:
38+
3139
- **Without an instance**: Knowledge base and basic utilities (date conversions, calculator)
32-
- **With an instance**: All of the above plus the providers configured in settings.tool_providers (env: TOOL_PROVIDERS)
40+
- **With an instance**: All of the above plus the providers configured in `settings.tool_providers` (env: `TOOL_PROVIDERS`)
3341
- **Conditional providers**: Additional providers based on instance type (Redis Enterprise admin, Redis Cloud)
3442

3543
Override provider list via environment (JSON list):
44+
3645
```bash
3746
# Example: include built-in Prometheus + a custom provider
3847
export TOOL_PROVIDERS='[
@@ -41,10 +50,13 @@ export TOOL_PROVIDERS='[
4150
]'
4251
```
4352

44-
Per-instance configuration for providers
45-
- Use RedisInstance.extension_data and extension_secrets to pass namespaced config to providers.
46-
- See Tool Providers guide for details.
53+
#### Per-instance configuration for providers
54+
55+
- Use `RedisInstance.extension_data` and `extension_secrets` to pass namespaced config to providers.
56+
- See the [Tool Providers guide](tool-providers.md) for details.
4757

4858
### Advanced: Encryption of secrets
59+
4960
Secrets (e.g., connection URLs, admin passwords) are encrypted at rest using envelope encryption. See the advanced guide:
50-
- Advanced: docs/how-to/configuration/encryption.md
61+
62+
- [Advanced: Encryption of secrets](configuration/encryption.md)

0 commit comments

Comments
 (0)