Skip to content

docs: fix CrewBase import path in hook docs - #2

Closed
wannT-1 wants to merge 1 commit into
mainfrom
cursor/fix-crewbase-import-docs-ed37
Closed

wannT-1 wants to merge 1 commit into
mainfrom
cursor/fix-crewbase-import-docs-ed37

Conversation

@wannT-1

@wannT-1 wannT-1 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Related issue

Fixes crewAIInc#8581

Summary

Hook examples documented from crewai import CrewBase. That import raises ImportError: cannot import name 'CrewBase' from 'crewai' because CrewBase is not exported from the top-level crewai package. The class lives in crewai.project (from crewai.project import CrewBase).

Edge docs under docs/edge/en, docs/edge/ar, docs/edge/ko, and docs/edge/pt-BR now use that path. Where a from crewai.project import ... line was already next to the bad import, the two lines are merged. Frozen docs/v* snapshots are unchanged.

Pages updated:

  • learn/before-and-after-kickoff-hooks.mdx (en, ar, ko, pt-BR)
  • learn/execution-hooks.mdx (en, ar, ko, pt-BR)
  • learn/llm-hooks.mdx (ko, pt-BR)
  • learn/tool-hooks.mdx (ko, pt-BR)

Verification

  • from crewai import CrewBase fails with ImportError: cannot import name 'CrewBase' from 'crewai'.
  • from crewai.project import CrewBase succeeds (CrewBase is crewai.project.crew_base.CrewBase). Merged forms CrewBase, before_kickoff, CrewBase, after_kickoff, and CrewBase, crew also import.
  • git grep -n "from crewai import CrewBase" -- docs/edge/ returns no hits.
  • Tests added or updated: not applicable. This is a documentation import correction only.
  • Relevant checks pass locally (import check against the workspace package at upstream main).

Additional context

Prepared with AI assistance. This PR requires the llm-generated label under the contribution policy.

Open in Web Open in Cursor 

from crewai import CrewBase raises ImportError because CrewBase is
exported from crewai.project. Update the edge hook examples and the
matching ar, ko, and pt-BR pages. Leave frozen docs/v* snapshots unchanged.

Fixes crewAIInc#8581

Co-authored-by: wannT-1 <wannT-1@users.noreply.github.com>
@wannT-1 wannT-1 added the llm-generated label Oct 26, 2026 — with Cursor
@wannT-1 wannT-1 closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] docs: Incorrect CrewBase import in hook documentation examples

1 participant