Is it wise to mount the /a0 to a local mount point for persistence? #542
Replies: 4 comments 2 replies
-
By mapping the whole /a0 you also map the Python scripts, so yes, it will cause problems. Starting with version 0.9 you can use backup and restore feature for this. Or you can map individual folders like memory and tmp inside a0. |
Beta Was this translation helpful? Give feedback.
-
Thank you @frdel for your work on this! Question: Could you expand more on when it may be okay to map the entire /a0 ? ... For example, if you have not done a pull lately and are on the same version of a0, will it then be a smart time to map /a0 and mount it? Just because, for example, you may not remember to manually backup all the time and this way your data is safe if there is some kind of problem with a0, you can always "revert" to your saved data. More info on persistent data is greatly appreciated and thank you for your attention! |
Beta Was this translation helpful? Give feedback.
-
yea, so every single time I update Agent0, I lose everything memories, settings, api keys, etc. Why? What am I doing wrong? If saving /a0 to a persistent volume isn't the answer, what is? Anybody? |
Beta Was this translation helpful? Give feedback.
-
Here's my docker command. I'm not claiming it's a great solution, but it works for me, saving my chats, settings, knowledge, artifacts (in docker run -d -p $PORT:80 -p $SSH_PORT:22 \
-v $A0_DATA_DIR/.env:/a0/.env \
-v $A0_DATA_DIR/tmp:/a0/tmp \
-v $A0_DATA_DIR/memory:/a0/memory \
-v $A0_DATA_DIR/knowledge:/a0/knowledge \
-v $A0_DATA_DIR/instruments:/a0/instruments \
-v $A0_DATA_DIR/root:/root \
--name agent-zero-run agent-zero-run:local It should also be noted that this is inherently brittle and likely to fail at some point in the future as the directory structure evolves to better separate user data from system dependencies. I haven't tried the backup and restore feature, but if it handles all of the user data, including secrets, you may be better off using that, as it should, ideally, deal with migrating the data to support backend changes. I run the development image, which changes frequently, and I'm too lazy to use the backup restore feature every time I build a new image, so this is my solution for now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I kept losing work whenever updating or restarting docker for agent0. I started mounting /a0 to a permanent location, is this going to create problems? Should I be more granular or is this a good practice?
Thank you for any insight!
Beta Was this translation helpful? Give feedback.
All reactions