← Back to Documentation

Configuration

PersistenceAI can be configured through a JSON configuration file.

Configuration File Location

You can also use pai.jsonc (JSON with Comments) for better readability.

Configuration Structure

{
  "keybinds": {
    "leader": "ctrl+x",
    "session_new": "<leader>n"
  },
  "providers": {
    "openai": {
      "apiKey": "sk-..."
    }
  },
  "agents": [],
  "theme": "default",
  "models": {
    "default": "openai/gpt-4"
  }
}

Keybind Configuration

See the Keybinds documentation for detailed keybind configuration.

Provider Configuration

See the Providers documentation for provider setup.

Agent Configuration

See the Agents documentation for agent configuration.

Theme Configuration

Set your preferred theme:

{
  "theme": "pai"
}

Available themes:

Model Configuration

Set default models:

{
  "models": {
    "default": "openai/gpt-4",
    "small": "cogito:3b",
    "medium": "qwen2.5-coder:4b",
    "large": "qwen2.5-coder:7b"
  }
}

Project-Specific Configuration

You can also create a project-specific config file:

Project configs override global configs.


For more information, see: