fix(claw): add .env.example and document TAVILY_API_KEY requirement#1649
fix(claw): add .env.example and document TAVILY_API_KEY requirement#1649praisonai-triage-agent[bot] wants to merge 2 commits intomainfrom
Conversation
…ixes #1648) - Add comprehensive .env.example at repository root with all required and optional environment variables - Document TAVILY_API_KEY requirement in README.md Claw section with link to get free API key - Fixes silent failures on first run by providing clear variable reference template - Improves developer onboarding experience for new Claw users Co-authored-by: praisonai-triage-agent[bot] <praisonai-triage-agent[bot]@users.noreply.github.com>
|
@coderabbitai review |
|
/review |
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughThis PR addresses onboarding gaps by introducing a ChangesEnvironment Configuration Onboarding
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot Do a thorough review of this PR. Read ALL existing reviewer comments above from Qodo, Coderabbit, and Gemini first — incorporate their findings. Review areas:
|
Agent-Logs-Url: https://github.com/MervinPraison/PraisonAI/sessions/7fe15070-18b9-4586-ba5e-a70c271db412 Co-authored-by: MervinPraison <454862+MervinPraison@users.noreply.github.com>
Completed a full PR review and incorporated all existing reviewer outputs (Qodo: no actionable findings due quota message, CodeRabbit: no substantive findings, Gemini: no comments present). I made one concrete fix in commit Review summary:
Optional improvement (if you want stricter onboarding): # Required for OpenAI-backed Claw defaults
OPENAI_API_KEY=sk-...
# Required only when using Tavily-backed web search
TAVILY_API_KEY=tvly-...This clarifies that Tavily is tool-dependent rather than universally required. |
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 @.env.example:
- Line 41: Rename the environment variable LOG_level to LOG_LEVEL to follow
SCREAMING_SNAKE_CASE conventions; update the .env.example entry and search the
codebase for any usages of process.env.LOG_level (or similar) and change them to
process.env.LOG_LEVEL so runtime/CI reads the new name; also update any docs,
tests, or config that reference the old variable to ensure consistency.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| DATABASE_URL=sqlite:///~/.praison/database.sqlite # Database connection string | ||
|
|
||
| # === Optional: Development === | ||
| LOG_level=INFO # Logging level (DEBUG, INFO, WARNING, ERROR) |
There was a problem hiding this comment.
Fix environment variable naming convention.
The variable name LOG_level uses mixed case, which is inconsistent with environment variable conventions. Environment variables should use SCREAMING_SNAKE_CASE. As per static analysis hints, this should be LOG_LEVEL to match standard conventions and the rest of this file.
🔧 Proposed fix
-LOG_level=INFO # Logging level (DEBUG, INFO, WARNING, ERROR)
+LOG_LEVEL=INFO # Logging level (DEBUG, INFO, WARNING, ERROR)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| LOG_level=INFO # Logging level (DEBUG, INFO, WARNING, ERROR) | |
| LOG_LEVEL=INFO # Logging level (DEBUG, INFO, WARNING, ERROR) |
🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 41-41: [LowercaseKey] The LOG_level key should be in uppercase
(LowercaseKey)
[warning] 41-41: [ValueWithoutQuotes] This value needs to be surrounded in quotes
(ValueWithoutQuotes)
🤖 Prompt for 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.
In @.env.example at line 41, Rename the environment variable LOG_level to
LOG_LEVEL to follow SCREAMING_SNAKE_CASE conventions; update the .env.example
entry and search the codebase for any usages of process.env.LOG_level (or
similar) and change them to process.env.LOG_LEVEL so runtime/CI reads the new
name; also update any docs, tests, or config that reference the old variable to
ensure consistency.
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on Python packages (praisonaiagents, praisonai). Do NOT modify praisonai-rust or praisonai-ts. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. Phase 1: Review per AGENTS.md
Phase 2: FIX Valid Issues Phase 3: Final Verdict |
|
Claude finished @MervinPraison's task —— View job Architecture Review Complete ✅Conducting final architecture review for PR #1649. Analyzed changes per AGENTS.md guidelines and previous reviewer feedback. Tasks:
Architecture Analysis:✅ Protocol-Driven Core Compliance
✅ Performance Impact
✅ Backward Compatibility (AGENTS.md §4.6)
✅ Agent-Centric Design (AGENTS.md §4.4)
✅ Issue Resolution Status
✅ Quality Assessment
Final Verdict: APPROVED ✅This PR fully complies with PraisonAI architecture principles and successfully addresses the onboarding gaps identified in Issue #1648. All previous reviewer issues have been resolved. No blocking issues remain. Recommendation: Merge this PR. |
Greptile SummaryThis PR adds two purely additive documentation artifacts to improve onboarding for PraisonAI Claw users: a root-level
Confidence Score: 4/5Purely additive documentation change with no impact on runtime code paths — safe to merge. Both files are documentation only. The DATABASE_URL example in .env.example uses a tilde path that SQLAlchemy won't expand, which could mislead users who copy it verbatim into their .env. Everything else — variable names, placeholder values, README table, and link to Tavily — is accurate and well-organised. .env.example line 38 — the SQLite path example needs a note or correction so users don't end up with a broken database URL. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[New Claw User] --> B[pip install praisonai claw]
B --> C{.env configured?}
C -- No, before this PR --> D[Silent failure on web-search tool]
C -- Yes, after this PR --> E[Copy .env.example to .env]
E --> F[Set OPENAI_API_KEY]
F --> G[Set TAVILY_API_KEY from app.tavily.com]
G --> H[praisonai claw]
H --> I[Dashboard at localhost:8082]
I --> J[Web-search tool works]
D --> K[Confusing error, no clear fix]
Reviews (1): Last reviewed commit: "fix(env): use LOGLEVEL key in root .env...." | Re-trigger Greptile |
| WHATSAPP_PHONE_NUMBER_ID=... # WhatsApp phone number ID | ||
|
|
||
| # === Optional: Database === | ||
| DATABASE_URL=sqlite:///~/.praison/database.sqlite # Database connection string |
There was a problem hiding this comment.
The
sqlite:///~/.praison/database.sqlite path uses a tilde that SQLAlchemy will NOT expand to the user's home directory at runtime — it treats ~ as a literal character, resulting in a path like ./~/.praison/database.sqlite relative to the working directory. Users who copy this value verbatim will get a confusing OperationalError: unable to open database file. An absolute path or a note to substitute the real home directory would be safer.
| DATABASE_URL=sqlite:///~/.praison/database.sqlite # Database connection string | |
| DATABASE_URL=sqlite:////home/YOUR_USERNAME/.praison/database.sqlite # Absolute path required; replace with your actual home directory |
Fixes #1648
Summary
Addresses two critical onboarding gaps for PraisonAI Claw users:
Changes
Impact
Testing
Generated with Claude Code
Summary by CodeRabbit
Release Notes