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

# Config

> Server configuration, model management, providers, and notifiers.

## Get config

```bash theme={null}
curl http://localhost:6877/config \
  -H "Authorization: Bearer $API_KEY"
```

```json theme={null}
{
  "chat_model": "claude-sonnet-4-6",
  "model_roles": {
    "research": {"model": "claude-sonnet-4-6", "reasoning_effort": null},
    "workflow": {"model": "claude-sonnet-4-6", "reasoning_effort": null},
    "auxiliary": {"model": "claude-sonnet-4-6", "reasoning_effort": null},
    "memory": {"model": "claude-sonnet-4-6", "reasoning_effort": null}
  },
  "embedding_model": "text-embedding-3-small",
  "integrations": {
    "google": {"enabled": true, "connected": true},
    "memory": {"enabled": true, "connected": true},
    "web": {"connected": true, "mode": "auto", "provider": "ddgs"}
  }
}
```

## Update config

```bash theme={null}
curl -X PATCH http://localhost:6877/config \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chat_model": "gpt-5.2"}'
```

## Models

### List chat and role models

```bash theme={null}
curl http://localhost:6877/models \
  -H "Authorization: Bearer $API_KEY"
```

Returns models grouped by provider.

### List embedding models

```bash theme={null}
curl http://localhost:6877/models/embedding \
  -H "Authorization: Bearer $API_KEY"
```

### Change embedding model

Changing the embedding model requires explicit confirmation, then rebuilds the
semantic index for all active facts and readable wiki pages. Arden sends
embeddings to the provider in batches.

```bash theme={null}
curl -X POST http://localhost:6877/config/embedding \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"embedding_model": "text-embedding-3-large", "confirmed": true}'
```

Disable embeddings with JSON `null`. Full-text search remains available:

```bash theme={null}
curl -X POST http://localhost:6877/config/embedding \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"embedding_model": null, "confirmed": true}'
```

Follow rebuild progress:

```bash theme={null}
curl http://localhost:6877/index/status \
  -H "Authorization: Bearer $API_KEY"
```

Transient provider rate limits are retried using the provider's reset time.
While waiting, `retry_at` reports when the current batch will resume. Completed
batches survive retries and server restarts.

Retry a failed rebuild:

```bash theme={null}
curl -X POST http://localhost:6877/index/start \
  -H "Authorization: Bearer $API_KEY"
```

### Add custom model

Register an OpenAI-compatible model endpoint:

```bash theme={null}
curl -X POST http://localhost:6877/models/custom \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "my-model",
    "base_url": "http://localhost:11434/v1",
    "context_window": 128000,
    "max_output_tokens": 8192,
    "api_key": "optional-key"
  }'
```

### Remove custom model

```bash theme={null}
curl -X DELETE http://localhost:6877/models/custom/my-model \
  -H "Authorization: Bearer $API_KEY"
```

## Providers

### List providers

```bash theme={null}
curl http://localhost:6877/providers \
  -H "Authorization: Bearer $API_KEY"
```

Returns all providers (Anthropic, OpenAI, OpenAI Codex, Google, OpenRouter, Custom) with connection status, available models, auth type, and masked API key hints.

### Connect provider

```bash theme={null}
curl -X POST http://localhost:6877/providers/openai/connect \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key": "sk-...", "chat_model": "gpt-5.2"}'
```

OpenAI Codex uses browser OAuth instead of an API-key connect request:

```bash theme={null}
curl -X POST http://localhost:6877/providers/openai-codex/oauth/browser/start \
  -H "Authorization: Bearer $API_KEY"
```

Poll status while the browser flow is pending:

```bash theme={null}
curl http://localhost:6877/providers/openai-codex/oauth/status \
  -H "Authorization: Bearer $API_KEY"
```

### Disconnect provider

```bash theme={null}
curl -X DELETE http://localhost:6877/providers/openai \
  -H "Authorization: Bearer $API_KEY"
```

## Services

External service credentials, including Exa, Telegram, and Slack tokens.

### List services

```bash theme={null}
curl http://localhost:6877/services \
  -H "Authorization: Bearer $API_KEY"
```

### Connect service

```bash theme={null}
curl -X POST http://localhost:6877/services/telegram/connect \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key": "bot-token..."}'
```

### Disconnect service

```bash theme={null}
curl -X DELETE http://localhost:6877/services/telegram \
  -H "Authorization: Bearer $API_KEY"
```

## Notifiers

Notifier configuration lives in the automation router. See [Notifiers](/api-reference/notifiers) for `/notifiers/*` endpoints.

## Directives

System directives customize the agent's behavior. They persist across sessions and are injected into the system prompt.

### Get directives

```bash theme={null}
curl http://localhost:6877/directives \
  -H "Authorization: Bearer $API_KEY"
```

### Update directives

```bash theme={null}
curl -X PUT http://localhost:6877/directives \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content": "Always respond in Spanish. Be concise."}'
```

## Context

### Get token usage

```bash theme={null}
curl http://localhost:6877/context \
  -H "Authorization: Bearer $API_KEY"
```

### Compact context

Compress conversation history to free token space:

```bash theme={null}
curl -X POST http://localhost:6877/compact \
  -H "Authorization: Bearer $API_KEY"
```
