Skip to main content

Import & Export Data

Elftia supports importing and exporting various data formats, making it easy to migrate data between devices, back up configurations, or share settings with others.

Data Types for Import/Export

Data TypeExport FormatExport LocationImport Method
LLM Provider ConfigurationJSONSettings → Provider SettingsSettings → Provider Settings
MCP Server ConfigurationJSONSettings → MCPSettings → MCP
Agent DefinitionMarkdown (.md)Agent PageAgent Page
Character CardPNG (with metadata) / JSONRole-Play SettingsRole-Play Settings
Chat HistoryJSONRight-click sidebar menuImport in sidebar
Theme ConfigurationJSONSettings → AppearanceSettings → Appearance
Diagnostic InfoJSON / ZIPSettings → SystemImport not supported

LLM Provider Configuration

Export Provider Settings

Once you've configured multiple LLM providers, you can export all configurations as a JSON file for backup or migration.

  1. Open Settings → Provider Settings.
  2. Click the Export button above the provider list.
  3. Choose a save location; the file will be saved in JSON format.

The exported JSON contains:

  • Provider ID and name
  • Base URL configuration
  • Enable status
  • Model list and parameter configuration
caution

For security reasons, exported configuration does not include API Keys. After importing, you'll need to re-enter each provider's API Key.

Import Provider Settings

  1. Open Settings → Provider Settings.
  2. Click the Import button above the provider list.
  3. Select the previously exported JSON file.
  4. The system will show an import preview; confirm and apply the configuration.
  5. Re-enter the API Key for each provider and test the connection.

MCP Server Configuration

Export MCP Settings

  1. Open Settings → MCP (or the MCP page in the functional rail).
  2. In the MCP server list, find the export function.
  3. The configuration will be saved in JSON format containing all MCP server connection information.

Import MCP Settings

Elftia supports importing server definitions from standard MCP configuration JSON files.

  1. Open the MCP management page.
  2. Click the Import JSON button.
  3. Select the MCP configuration JSON file. Example format:
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["-y", "@my-org/my-mcp-server"],
"env": {
"API_KEY": "your-key"
}
}
}
}
  1. The system will parse and add the MCP servers defined in the configuration.
tip

Elftia is compatible with Claude Desktop format MCP configuration files (claude_desktop_config.json) and can import them directly.

Agent Definition

Export Agent

Agent definitions are stored as Markdown files, which you can directly export:

  1. Open the Agent Page.
  2. Select the Agent to export.
  3. Use the export function to save the Agent definition as a .md file.

The Agent's Markdown file contains:

  • Agent name and description
  • System prompt
  • Tool permission configuration
  • MCP server assignment
  • Other behavior settings

Import Agent

  1. Open the Agent Page.
  2. Click the import option next to the create button.
  3. Select the Agent's .md file.
  4. The system will parse the file and create the corresponding Agent.

Character Card

Elftia supports standard character card formats and is compatible with common community character card specifications.

Export Character Card

  1. In a role-play chat, open the RP settings panel.
  2. Find the character card export function.
  3. Choose the export format:
    • PNG (recommended): Image file with metadata embedded in PNG text chunks. Can be shared directly as an image while containing complete character information.
    • JSON: Plain text format containing all character definition data.

Import Character Card

  1. In role-play settings, click Import Character Card.
  2. Select a PNG or JSON format character card file.
  3. The system will automatically parse character information and populate the form.
  4. You can modify character settings after import and then save.

Chat History

Export Chat

  1. In the sidebar, right-click the chat you want to export.
  2. Select Export.
  3. Choose a save location; the chat will be saved in JSON format.

The exported chat contains:

  • All messages (user messages and AI replies)
  • Branch information
  • Message timestamps
  • Model information used
  • Reference information for attachments

Bulk Export

  1. In the sidebar, enter bulk select mode.
  2. Select multiple chats.
  3. Use the export function in the bulk operation bar to export all selected chats at once.

Import Chat

  1. In the sidebar, use the import function.
  2. Select a previously exported chat JSON file.
  3. The chat will be restored to the session list.

Theme Configuration

Export Theme

If you've customized a theme configuration (including theme mode, accent color, font, wallpaper, custom CSS) that you're happy with, you can export it as a theme configuration file.

  1. Open Settings → Appearance.
  2. Find the Theme Configuration area.
  3. Click the Export Theme button.
  4. Choose a save location; the configuration will be saved in JSON format.

Exported content includes:

  • Theme mode (light/dark/system)
  • Accent color settings
  • Font overrides
  • Wallpaper configuration (blur, mask opacity, and other parameters)
  • Custom CSS code
info

The wallpaper image file itself is not included in the export, only the wallpaper configuration parameters. If using local wallpaper images, you'll need to reset the wallpaper path after importing.

Import Theme

  1. Open Settings → Appearance → Theme Configuration.
  2. Click the Import Theme button.
  3. Select a theme JSON file.
  4. The system will preview the theme differences from import; confirm to apply.

Diagnostic Information Export

Diagnostic information is for providing to technical support when troubleshooting; import is not supported.

  1. Open Settings → System.
  2. Click the Export Diagnostics button.
  3. The system will collect runtime information, logs, configuration, etc. to generate a diagnostic file.
  4. You can choose to export as a single JSON file or a complete ZIP archive.

See Diagnostic Tools for details.

Notes

  • API Key Security: Any export function will not export sensitive credentials like API Keys. You'll need to manually re-enter them after importing.
  • Version Compatibility: Exported data files contain version information. Files exported by newer versions may not be importable in older versions.
  • File Size: Exporting chats with many attachment references may produce large files. Attachment files themselves are not included in the export.
  • Character Encoding: All exported files use UTF-8 encoding for cross-platform compatibility.

If you encounter issues during import/export, see Common Issues.