Feature Request: Docker Persistent Storage for Agent Zero
Implementing Docker Persistent Storage would enhance the flexibility of Agent Zero by ensuring consistent data availability across restarts, upgrades, and host migrations. Using a single command, Docker can create and use the storage if it doesn’t already exist, providing a seamless experience.
Key Benefits:
✅ Automatic Storage Handling – A single command ensures persistent storage creation and usage.
✅ Data Persistence Across Upgrades – No need to migrate data manually when updating Agent Zero.
✅ Easy Backup & Restore – Docker volumes allow structured backups with simple commands.
✅ Seamless Host Integration – Moving data from container to host is straightforward.
Proposed Implementation:
Using Docker Volumes, the persistent storage can be created dynamically:
docker run -d --name agentzero -v agent_zero_data:/a0 agent_zero_image
- If
agent_zero_datadoes not exist, Docker automatically creates it. - The data is stored inside
/a0within the container, making it accessible across sessions.
Backup & Migration Options:
To backup the persistent volume:
docker run --rm -v agent_zero_data:/a0 -v $(pwd):/backup busybox tar -czf /backup/agent_zero_backup.tar.gz /a0
To restore data:
docker run --rm -v agent_zero_data:/a0 -v $(pwd):/backup busybox tar -xzf /backup/agent_zero_backup.tar.gz -C /a0
This ensures data integrity when upgrading, migrating, or moving workflows.
Conclusion:
By integrating Docker Persistent Storage, Agent Zero can provide a reliable, scalable, and user-friendly workflow environment.
Hello, you only need the /a0 directory as external volume to keep all persistent data of the framework. You just need to instruct the agent to put the data in subfolders of it.
EDIT: if the /a0 folder is empty for the first time the container copies all code and data directories into it so you will end up with editable contents of /a0 folder if you employ a volume at this location - owned by root however if that is an issue.