Configuration
PersistenceAI can be configured through a JSON configuration file.
Configuration File Location
%USERPROFILE%\.config\pai\pai.json~/.config/pai/pai.jsonYou 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:
pai (default)darklightAnd more...
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:
pai.json in your project rootpai.jsonc in your project rootProject configs override global configs.
For more information, see: