From neatlogs
Use when adding neatlogs observability to a Python project that uses CrewAI (imports `crewai`, builds a Crew/Flow with agents and tasks).
How this skill is triggered — by the user, by Claude, or both
Slash command
/neatlogs:neatlogs-py-crewaiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This project uses CrewAI. Neatlogs instruments it with **`neatlogs.wrap(crew)`** — wrap the Crew (or Flow) instance once and the full span hierarchy is auto-traced.
This project uses CrewAI. Neatlogs instruments it with neatlogs.wrap(crew) — wrap the Crew (or Flow) instance once and the full span hierarchy is auto-traced.
neatlogs.wrap(crew)neatlogs.wrap() detects the CrewAI Crew/Flow and patches kickoff / kickoff_async / kickoff_for_each, the crew's agents and tasks, plus installs class-level hooks on BaseTool.run (TOOL) and LLM.call (LLM). Span tree:
WORKFLOW crew.kickoff()
↳ AGENT each agent's task execution
↳ TOOL BaseTool.run (each tool call)
↳ LLM LLM.call (the underlying model request)
No instrumentations= and no provider pairing. Older guidance paired "crewai" with a provider instrumentor ("openai", "anthropic", …) to get LLM spans. wrap() patches LLM.call directly, so it captures LLM spans regardless of the model backend — you do NOT pass instrumentations=[...] and do NOT need to match a provider to the model string.
Combine with @neatlogs.span / neatlogs.trace / neatlogs.log for your own orchestration; the crew spans nest under them.
wrap() patches BaseTool.run, which covers tools dispatched through it. But on crewai >=1.14 some native tool calls bypass BaseTool.run and those TOOL spans can still be lost — add with neatlogs.trace(...) INSIDE those tool bodies. Retrieval/embedding tools should ALWAYS get a trace(kind="RETRIEVER") inside the body (any version) to capture neatlogs.retrieval.* attributes. Step 7 walks through the version check and patterns.
crew = neatlogs.wrap(crew) on the Crew/Flow instance before kickoff().@neatlogs.span(kind="WORKFLOW") on YOUR user-facing function that builds + kicks off the crew, so your orchestration code is the trace root and the crew nests under it.references/6-prompt-templates.md.references/1-install-sdk.mdreferences/2-add-init.mdreferences/3-set-env.mdreferences/4-wrap-crew.mdreferences/5-add-workflow.mdreferences/6-prompt-templates.mdreferences/7-verify-tools.mdreferences/8-flush-shutdown.mdneatlogs.init() MUST execute BEFORE any crewai / LLM library imports.load_dotenv() exists, it MUST run BEFORE neatlogs.init().instrumentations=[...] to init() for CrewAI — wrap(crew) captures agents/tasks/tools/LLM.crew = neatlogs.wrap(crew). Returns the same instance.os.getenv().neatlogs.wrap(...)/neatlogs.span(...)/neatlogs.trace(...)/neatlogs.bind_templates(...)/neatlogs.register_crewai_task(...) → add import neatlogs.from neatlogs import SystemPromptTemplate, UserPromptTemplate. No bare import neatlogs.@neatlogs.span() goes BELOW framework decorators, closest to def.@neatlogs.span() to @tool functions, Agent definitions, or Task definitions — wrap() traces them.references/span-kinds.mdProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub neatlogs/skills --plugin neatlogs-ts