Docs/Web & LAN

User Guide · 2.4.1 Release

Desktop Agent Migration

Let Claude Code or Codex write memory & prompts

Read Markdown
On this page

What It Is#

If you regularly use desktop agents like Claude Code or Codex on your computer, the memories and custom instructions they have built up (such as CLAUDE.md and AGENTS.md) can be migrated into Cube Agent by the agent itself. The agent reads the onboarding guide through Web Server's API and writes directly to global memories, assistant memories, and system prompts—no manual copy-pasting or typing through browser chat, with Markdown formatting preserved intact.

How to Use#

  1. Open Settings → Connections & advanced → Web Server and start the service. When your computer and phone are on the same Wi-Fi network, set Access scope to LAN and set an access password when prompted.
  2. Tap Copy desktop agent prompt below the access URL.
  3. Paste the prompt into your desktop agent. It will first read /api/agent/guide to learn the rules and ask you for the password when needed.
  4. Once the agent lists what it plans to write, review and confirm before letting it proceed. Afterward, you can verify the results on the Memory Management and System Prompt pages.

Where Data Is Written#

  • Memories: Best for long-lived personal facts and preferences, written as "one fact per entry". By default they are written to Global Memories, or you can target a specific assistant; the assistant must have memory enabled (and "Use global memories" enabled if relying on global memories) for them to take effect.
  • System Prompt: Best for behavioral rules, response styles, and similar instructions. Can be written to the global System Prompt or a specific assistant's Prompt, preserving headings, lists, and code blocks as-is.

Rules & Limitations#

  • Memories are append-only with automatic deduplication, so running a migration again will not create duplicate entries; deleted memories move to the Recycle Bin and can be restored.
  • The API does not support full replacement or batch deletion. To merge or trim memories, use Smart Organize inside the app, where you can preview before saving.
  • Batch memory writes are a Pro feature, just like in-app batch import. Reading memories, editing or deleting single entries, and reading or writing system prompts are unrestricted.
  • Writing a system prompt overwrites its existing content; the migration prompt instructs the agent to ask for your confirmation before writing.
  • Assistants that require authentication must be unlocked in the app first before their memories or prompts can be read or modified.

Best Practices#

  • Have the agent place personal facts into Memories and workflow rules into the System Prompt—avoid splitting long rulebooks into separate memory entries.
  • If you are not using a desktop agent, you can also tap Import from file on the System Prompt or Memory Import page to load .md or .txt files directly.
  • You can change the access password after migration is complete to invalidate old tokens immediately.