Skip to content

Claw onboarding: missing .env.example and undocumented TAVILY_API_KEY cause silent failure on first run #1648

@Dhivya-Bharathy

Description

@Dhivya-Bharathy

Severity

Severity Category Issue Type
Medium Developer Experience / Documentation Missing onboarding artifact + undocumented required variable

Summary

Two related onboarding gaps affect first-time PraisonAI Claw users:

  1. No .env.example template exists in the repository root. New users have no reference for which environment variables are required, leading to silent failures.
  2. TAVILY_API_KEY is not documented anywhere in the setup guide, README, or any template — yet the Claw dashboard's default web-search tool requires it. Users see a cryptic tool error with no indication that a second API key is needed.

Both gaps cause new users to fail at the first agent run with no actionable error message pointing to the fix.


Affected Components

Component Location Issue
Repository root / No .env.example file
README.md Setup / Configuration section TAVILY_API_KEY not mentioned
praisonai claw web search tool Runtime Fails silently when TAVILY_API_KEY is absent
Claw dashboard UI Agent creation wizard No inline hint for required API keys

Expected vs Actual Behavior

Behavior
Expected A .env.example file at the repo root lists every required variable with a description and placeholder value
Actual No such file exists; users must discover variables through source code inspection or trial-and-error
Behavior
Expected README / Claw setup guide explicitly states: TAVILY_API_KEY=<your key> is required for the built-in web-search tool
Actual TAVILY_API_KEY is not mentioned in any user-facing documentation; the tool fails with a non-actionable error

Reproduction Steps

Gap 1 — Missing .env.example:

git clone https://github.com/MervinPraison/PraisonAI.git
ls PraisonAI/.env.example   # → No such file or directory

A new user has no template to copy. They must guess which variables are needed.

Gap 2 — Undocumented TAVILY_API_KEY:

# Start Claw with only OPENAI_API_KEY set (as documented)
export OPENAI_API_KEY=sk-...
praisonai claw

# In the Claw dashboard, create a default agent and ask it to search the web.
# Observed error (no mention of TAVILY_API_KEY):
#   Tool execution failed: TavilySearchResults: TAVILY_API_KEY environment variable not set

The error message does not tell the user where to get a Tavily key or that it is optional vs required.


Root Cause Analysis

The combination means a user who follows the documented setup exactly will experience a failing tool on their first agent run with no path to resolution.


Impact Analysis

Dimension Detail
Affected users All first-time Claw users
Failure mode Web-search tool errors with no actionable guidance
Discoverability Very low — requires reading praisonaiui/tools/ source code
Fix complexity Very low — create one file, add two lines to README

Why This Matters

.env.example is a widely recognised convention (used by Rails, Next.js, Docker Compose, and most open-source SaaS starters). Its absence signals to new contributors and enterprise evaluators that the project is not onboarding-ready. Combined with the undocumented Tavily key, a user's very first agent interaction fails — the worst possible first impression for an AI agent framework.


Suggested Fix

1. Create .env.example at the repository root:

# === Required ===
OPENAI_API_KEY=sk-...          # OpenAI key for LLM calls

# === Required for Claw web-search tool ===
TAVILY_API_KEY=tvly-...        # Get yours at https://app.tavily.com

# === Optional: Claw dashboard ===
PRAISONAI_ALLOW_LOCAL_TOOLS=0  # Set to 1 to enable local shell tools (security risk)

# === Optional: Memory backend ===
# MEM0_API_KEY=...
# REDIS_URL=redis://localhost:6379

# === Optional: Observability ===
# LANGFUSE_SECRET_KEY=...
# LANGFUSE_PUBLIC_KEY=...

2. Add a "Required Environment Variables" section to README.md (Claw section):

## Required Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `OPENAI_API_KEY` | Yes | OpenAI API key for all LLM calls |
| `TAVILY_API_KEY` | Yes (Claw) | Tavily key for the built-in web-search tool. Get one free at https://app.tavily.com |

Copy `.env.example` to `.env` and fill in your keys before running `praisonai claw`.

Backward Compatibility

Fully additive — no existing behaviour changes.


Acceptance Criteria

  • .env.example added to the repository root with all variables listed in the table above
  • TAVILY_API_KEY documented in the Claw section of README.md with a link to obtain a free key
  • Claw quick-start guide (if separate) updated to reference .env.example
  • Optionally: the Claw dashboard's web-search tool emits a user-friendly message when TAVILY_API_KEY is absent, e.g. "Web search requires TAVILY_API_KEY. See .env.example."

Related Issues


Environment

OS      : Windows 10 (19045)
Python  : 3.13
Package : praisonai[claw] / aiui 0.3.111
Install : pip install "praisonai[claw]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationsecurity

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions