---
title: "Config"
description: "Server configuration, model management, providers, and notifiers."
---

## Get config

```bash
curl http://localhost:6877/config \
  -H "Authorization: Bearer $API_KEY"
```

```json
{
  "chat_model": "claude-sonnet-4-6",
  "research_model": "claude-sonnet-4-6",
  "memory_model": "claude-sonnet-4-6",
  "embedding_model": "text-embedding-3-small",
  "has_notes": true,
  "has_browser": false,
  "sources": {
    "google": {"enabled": true, "connected": true},
    "memory": {"enabled": true, "connected": true, "dreams": false},
    "web": {"connected": true, "mode": "auto", "provider": "ddgs"},
    "notes": {"connected": true, "path": "/Users/you/notes"},
    "browser": {"connected": false, "type": null}
  }
}
```

## Update config

```bash
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/research/memory models

```bash
curl http://localhost:6877/models \
  -H "Authorization: Bearer $API_KEY"
```

Returns models grouped by provider, including Claude OAuth models when configured.

### List embedding models

```bash
curl http://localhost:6877/models/embedding \
  -H "Authorization: Bearer $API_KEY"
```

### Change embedding model

Changing the embedding model triggers a full re-index of memory:

```bash
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"}'
```

### Add custom model

Register an OpenAI-compatible model endpoint:

```bash
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
curl -X DELETE http://localhost:6877/models/custom/my-model \
  -H "Authorization: Bearer $API_KEY"
```

## Providers

### List providers

```bash
curl http://localhost:6877/providers \
  -H "Authorization: Bearer $API_KEY"
```

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

### Connect provider

```bash
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"}'
```

### Connect via Claude OAuth

```bash
curl -X POST http://localhost:6877/providers/anthropic/oauth \
  -H "Authorization: Bearer $API_KEY"
```

Opens a browser window for PKCE-based OAuth login with your Claude Pro/Max subscription.

### Disconnect provider

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

## Services

External service integrations (Exa web search, Telegram).

### List services

```bash
curl http://localhost:6877/services \
  -H "Authorization: Bearer $API_KEY"
```

### Connect service

```bash
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
curl -X DELETE http://localhost:6877/services/telegram \
  -H "Authorization: Bearer $API_KEY"
```

## Notifier configs

Notifiers deliver automation results to external channels.

### List configs

```bash
curl http://localhost:6877/notifiers/configs \
  -H "Authorization: Bearer $API_KEY"
```

### List available types

```bash
curl http://localhost:6877/notifiers/types \
  -H "Authorization: Bearer $API_KEY"
```

### Create notifier

```bash
curl -X POST http://localhost:6877/notifiers/configs \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-telegram", "type": "telegram", "config": {"chat_id": "123456"}}'
```

### Test notifier

```bash
curl -X POST http://localhost:6877/notifiers/configs/my-telegram/test \
  -H "Authorization: Bearer $API_KEY"
```

### Delete notifier

```bash
curl -X DELETE http://localhost:6877/notifiers/configs/my-telegram \
  -H "Authorization: Bearer $API_KEY"
```

## Directives

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

### Get directives

```bash
curl http://localhost:6877/directives \
  -H "Authorization: Bearer $API_KEY"
```

### Update directives

```bash
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
curl http://localhost:6877/context \
  -H "Authorization: Bearer $API_KEY"
```

### Compact context

Compress conversation history to free token space:

```bash
curl -X POST http://localhost:6877/compact \
  -H "Authorization: Bearer $API_KEY"
```
