HOW-TO · DEV

How to run Manus AI with custom agent configurations and memory settings

intermediate15 minBy Eruo Fredoline
Target environment
Ubuntu 24.04 · Manus AI 2.x
PREREQUISITES

Manus AI installed, Python 3.10+, environment with network access

What this does

Manus AI ships with a default agent profile that works for general tasks. Custom agent configurations allow control over behavior such as tool use, reasoning depth, and response verbosity. Memory settings govern how Manus retains context across sessions, including short-term working memory and long-term persistent memory backed by a local SQLite store. Adjusting these settings tailors Manus for specialized workflows, such as codebase analysis or documentation generation.

Steps

  1. Create a configuration directory at ~/.manus/config.yaml if it does not exist.
  2. Define an agent profile using the agent: section, specifying model, temperature, and max_tokens.
  3. Set memory parameters under the memory: section: configure short_term_limit (number of turns retained) and long_term_enabled (boolean).
  4. Enable the custom profile by setting the MANUS_PROFILE environment variable to the profile name defined in the YAML.
  5. Initialize the memory store by running manus memory init once before the first session.
  6. Launch Manus with manus run to start an interactive session using the custom profile.
  7. After several interactions, inspect the memory database with sqlite3 ~/.manus/memory.db "SELECT COUNT(*) FROM turns;" to confirm data retention.
  8. Adjust short_term_limit downward to reduce context window pressure on long conversations.

Verification

sqlite3 ~/.manus/memory.db "SELECT COUNT(*) FROM turns;"

Expected output: an integer greater than zero after at least one interaction has occurred.

Common failures

  • Memory database locked: Another Manus process is still running. Terminate it with pkill -f manus before reinitializing.
  • Profile not found: Ensure the YAML key under agent: matches the value of MANUS_PROFILE exactly, including case.
  • Context window overflow: Reduce short_term_limit or clear old turns with manus memory prune to free up space.

Related guides