docs: document SQLite storage location for flow persistence (#5372)#5765
docs: document SQLite storage location for flow persistence (#5372)#5765NIK-TIGER-BILL wants to merge 6 commits into
Conversation
When a tool with result_as_answer=True raises an exception, the agent was receiving result_as_answer=True and returning the error string as the final answer. Now we set result_as_answer=False when an error event is emitted, allowing the agent to reflect and retry. Fixes crewAIInc#5156 Signed-off-by: NIK-TIGER-BILL <[email protected]>
Signed-off-by: NIK-TIGER-BILL <[email protected]>
The class-level @persist() example claimed that state is "automatically loaded" on the second run, but only restores persisted state when an explicit is provided. Update the docs example to pass the previous flow's state id so the second run actually demonstrates resumed state. Fixes crewAIInc#5378 Signed-off-by: NIK-TIGER-BILL <[email protected]>
…c#5372) Signed-off-by: NIK-TIGER-BILL <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR enhances Flow Persistence documentation by specifying SQLite storage defaults and improving the ChangesPersistence Documentation & Tool Error Handling
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Executor as execute_single_native_tool_call
participant Tool
participant Emitter as ErrorEventEmitter
Caller->>Executor: request tool execution
Executor->>Tool: invoke tool
Tool-->>Executor: returns result / raises exception
alt exception or error event emitted
Tool->>Emitter: emit error event
Executor->>Caller: return NativeToolCallResult(result_as_answer=false, error message)
else success without error event
Executor->>Caller: return NativeToolCallResult(result_as_answer=true/false based on capability)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/en/concepts/flows.mdx`:
- Line 433: The sentence currently implies CREWAI_STORAGE_DIR replaces
<project_name>; revise the wording to clearly separate project naming from
storage-location override by stating that <project_name> is still derived from
the current working directory name (or explicitly provided elsewhere) and that
CREWAI_STORAGE_DIR only overrides the base storage directory where the project
folder is created (i.e., CREWAI_STORAGE_DIR/<project_name>), not the project
name itself; update the line mentioning `<project_name>` and
`CREWAI_STORAGE_DIR` to reflect this explicit path semantics.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5cd0a414-c1a9-4836-939b-1f8a2e484d35
📒 Files selected for processing (4)
docs/en/concepts/flows.mdxdocs/en/guides/flows/mastering-flow-state.mdxlib/crewai/src/crewai/utilities/agent_utils.pylib/crewai/tests/utilities/test_agent_utils.py
Signed-off-by: NIK-TIGER-BILL <[email protected]>
|
@coderabbitai Thanks for the suggestion — applied the wording tweak that separates |
|
✅ Actions performedReview triggered.
|
Fixes #5372
Problem
The flow persistence documentation mentions that
@persistuses SQLiteFlowPersistence by default, but does not specify where the SQLite database file is actually stored on disk. Users have asked for this information (see #5372).Solution
Add explicit documentation about the default storage path for the SQLite database, including cross-platform paths and the
CREWAI_STORAGE_DIRenvironment variable override.Changes
CREWAI_STORAGE_DIRenvironment variable for customizing the storage locationSummary by CodeRabbit
Documentation
Bug Fixes
Tests