VM0VM0
Core Concept

Memory

Persistent long-term memory storage for agents

Memory provides persistent long-term storage designed for agents to retain knowledge across runs. Unlike artifacts which store work products, memory is where agents keep learned preferences, past decisions, and accumulated context.

How Memory Works

When you run an agent with --memory:

  1. Before running - VM0 loads the memory into the agent's environment
  2. During running - The agent reads from and writes to memory as needed
  3. After running - VM0 persists any changes back to the memory

This allows your agent to build up knowledge over time, improving its effectiveness across multiple runs.

vm0 run my-agent "review the latest PRs" --memory my-agent-memory

Managing Memory

You can manage memory manually using the vm0 memory commands.

Initialize

Initialize a memory in the current directory:

vm0 memory init

This creates a .vm0/storage.yaml config file with type: memory. The current directory name becomes the memory name.

Push

Upload local files to the cloud:

vm0 memory push

Options:

  • -f, --force - Force upload even if content unchanged

Pull

Download memory from the cloud:

# Pull latest version
vm0 memory pull

# Pull a specific memory by name
vm0 memory pull my-agent-memory

Clone

Clone a remote memory to a new local directory:

vm0 memory clone my-agent-memory

Status

Check the cloud memory status:

vm0 memory status

Shows version, file count, and size of the remote memory.

List

List all remote memories:

vm0 memory list

Example Workflow

# Create a memory directory
mkdir my-agent-memory && cd my-agent-memory

# Initialize as memory
vm0 memory init

# Add some initial context
echo "Prefer concise PR reviews" > preferences.md

# Push to cloud
vm0 memory push

# Run agent with this memory
vm0 run my-agent "review the latest PRs" --memory my-agent-memory

# Pull the agent's updated memory locally
vm0 memory pull

Memory vs Artifact vs Volume

VolumeArtifactMemory
PurposePre-installed environment for the agentOutput produced by the agentLong-term knowledge retained by the agent
ContainsSkills, configurations, scriptsFiles created or modified during runsLearned preferences, decisions, context
PersistenceNot auto-persisted after runsAutomatically persisted after each runAutomatically persisted after each run
Use caseTools and knowledge given before startWork products the agent createsKnowledge the agent accumulates over time

On this page