The default root is ~/.mkagent (resolved from $HOME or %USERPROFILE% at first launch). Set CONFIG_DIR to isolate tests, run multiple instances, or back up to a custom location. MkAgent never reads or migrates data from any other product.
~/.mkagent/
config.json # global preferences (theme, language, browser tool, ...)
credentials/ # credential storage (encrypted by the OS keychain)
permissions/ # global permission policies
themes/ # theme presets (~15 shipped)
tool-icons/ # icons for known tools
logs/ # rotating server logs (`mkagent-server-*.log`)
updates/ # staging for `electron-updater` downloads
skills/ # global Skills (discovered in priority global < workspace < project)
workspaces/
default/
config.json # workspace settings (default mode, thinking level, ...)
skills/ # workspace-scoped Skills
permissions/ # workspace permission overrides
views.json # built-in View definitions
sessions/ # each session has its own directory
<session-id>/
session.jsonl
.pi-sessions/
attachments/
| Field | Where it lives | Encryption |
|---|---|---|
| API keys and LLM OAuth tokens | credentials/ |
OS keychain via the shared CredentialManager |
| Proxy credentials | settings page | OS keychain |
| Workspace settings | workspaces/<slug>/config.json |
plaintext, but credential-shaped fields are referenced, not inlined |
| Session JSONL | workspaces/<slug>/sessions/<id>/session.jsonl |
plaintext, but credential-shaped fields are redacted before they reach the file |
| Session exports | download path | credential fields stripped |
- Theme and theme tokens.
- Tool icons and other
resources/assets. - Skill Markdown and the YAML frontmatter inside
SKILL.md. - Crash and request logs that do not carry credential-shaped fields (redaction runs in
mainand the network interceptor before any I/O).
Back up the directory only while the application is stopped or after sessions have been flushed. A safe backup does not require a special flush in development; production users should quit MkAgent, copy ~/.mkagent, and restart.
- macOS:
~/expands to/Users/<you>; the directory is hidden. - Linux:
~/.mkagent; if$XDG_DATA_HOMEis set the renderer still defaults to~/.mkagentfor backwards compatibility (the change is documented inmigration/migration-features.md). - Windows:
%USERPROFILE%\.mkagent(resolves toC:\Users\<you>\.mkagent).
The first mkagent launch that finds ~/.mkagent/config.json unreadable backs the file up as config.json.broken-<timestamp> and falls back to apps/electron/resources/config-defaults.json. The same applies to a per-workspace config.json; the workspace is recreated with defaults rather than loaded.