Repository navigation
Conversation
The pinned CrewAI Studio image runs from /CrewAI-Studio and opens crewai.db relative to it. The recipe mounts ./data/crewai at /app, which the app never reads or writes, so every agent, task, crew and tool lives in the container layer and is lost when the container is recreated. Link crewai.db to /app/crewai.db before starting Streamlit, keeping the image working directory for the app's relative assets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
CI note: |
# Conflicts: # ods/tests/ci-suite.txt
Resolved ods/tests/ci-suite.txt: main's list plus this branch's test entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3X8d43hAHxy7vttjmQZC9
patil2001
force-pushed
the
fix/crewai-persist-db
branch
from
October 25, 2026 04:10
13e4341 to
6eb1573
Compare
Resolved ods/tests/ci-suite.txt: main's list plus this branch's test entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3X8d43hAHxy7vttjmQZC9
Collaborator
|
Thanks for fixing CrewAI's database persistence with a focused recipe change and clearly documenting the existing-data limitation. Advisory status: looks merge-ready What looks good:
What I checked:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The CrewAI library recipe mounts
./data/crewaiat/app, but the pinned image (tham0nk/crewai-studio@sha256:5438b8fb…) never uses/app. The image config hasWorkingDir: /CrewAI-Studioand the commandstreamlit run ./app/app.py. Itsapp/db_utils.pyopensDB_NAME = 'crewai.db'relative to that directory. I read this from the pinned image's application layer.User impact: every agent, task, crew and tool definition is written to
/CrewAI-Studio/crewai.dbin the container's writable layer. All of it is lost whenever the container is recreated, which happens onods update, on disable and enable, and on any compose change. Thedata/crewaifolder stays empty.Fix
Set the recipe
commandto linkcrewai.dbto/app/crewai.dband thenexecthe image's original Streamlit command. The working directory stays/CrewAI-Studio, so the app's relativeimg/and.streamlit/assets still load.ln -sfis idempotent across restarts. The README says where the data now lives and that a database from an earlier container is not carried over.This is the focused rebase onto
mainthat #4960 was asked for. #4960 was closed only because itspublic-betatarget was retired. This version is smaller: it runs onesh -cline and does not include the migration procedure.AI Assistance
AI-assisted (Claude Code). The author reviewed the change and the pinned image's config and
db_utils.py.Release Lane
mainChanged Surface
ods/extensions/library/services/crewai/compose.yaml: addscommandods/extensions/library/services/crewai/README.md: Data noteods/tests/test_crewai_persistence.py: new script test, registered inods/tests/ci-suite.txtValidation
python3 tests/test_crewai_persistence.py(Ubuntu 24.04): fails onupstream/main("the image command leaves crewai.db in the container layer") and passes with the fix. The test runs the recipe's real shell command twice, to cover a restart, in a temporary working directory. The/appmount is redirected to a temporary data folder, and a stand-instreamlitopenscrewai.dbthe waydb_utils.pydoes. The test then checks that both writes landed in the data mount.python .github/scripts/list-unwired-tests.py --check: PASSgit diff --check upstream/main...HEAD: clean🤖 Generated with Claude Code