界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

flows-and-events

flows-and-events

【开发与工程】Use when building or debugging CrewAI Flow graphs, stateful flow execution, decorators, routers, persistence, checkpointing, plotting, human feedback, event listeners, and method hook ordering.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: flows-and-events description: "Use when building or debugging CrewAI Flow graphs, stateful flow execution, decorators, routers, persistence, checkpointing, plotting, human feedback, event listeners, and method hook ordering." disable-model-invocation: true metadata: disco-role: operating license: MIT

CrewAI Flows and Events

Use this sub-skill when the task is about CrewAI Flow classes, @start, @listen, @router, and_/or_ triggers, state, routing labels, event ordering, flow plotting, replay/resume, or human feedback inside flows.

Route by Intent

  • Need exact decorator signatures, import paths, constructor options, or event types? Read API reference.
  • Need flow graph design patterns, typed state, multiple starts, routers, persistence, checkpointing, plotting, conversational flows, or human feedback loops? Read Flow patterns.
  • Need event listeners, event bus usage, flow method event ordering, scoped handlers, or before/after kickoff adjacency? Read Event hooks.
  • Need to diagnose missing listeners, router labels, state errors, plotting failures, duplicate resumed calls, or HITL loops? Read Troubleshooting.
  • Need a safe static graph check for a user-defined flow class? Run validate_flow_graph.py with --help first.

Boundaries

  • For Agent, Task, Crew, Process, guardrails, crew callbacks, or task-level human input, use core-runtime.
  • For crewai create flow, crewai flow kickoff, crewai flow plot, crewai run, or project scaffolds, use cli-and-projects.
  • For tracing/export provider setup, telemetry integrations, LLM hooks, tool hooks, or observability destinations, use observability-and-hooks.
  • For root routing context across CrewAI packages, return to the CrewAI root skill.

Safe Defaults

  • Prefer static graph inspection and flow.plot(...) before running a flow with live LLMs or tools.
  • Do not call kickoff() while only validating graph shape; kickoff() can execute user code, crews, tools, LLMs, and human prompts.
  • Use explicit router emit=[...] or Literal[...] return annotations so static tools and plots can show intended route labels.
  • Keep flow method names and route label strings stable; listeners depend on exact method names or exact emitted labels.
我的收藏