Practical Examples
Three examples: a sequential two-role Crew, a Flow that kickoffs a Crew, and a custom retrieval-shaped tool (pair with RAG). Set OPENAI_API_KEY first; search tools also need SERPER_API_KEY.
Example 1: Researcher + writer (sequential Crew)
Without Serper, drop tools=[search] and treat it as an API exercise (stale knowledge).
Example 2: Flow sets the topic, then kickoffs a Crew
Extend with @router after research (pass vs rewrite) or @persist to resume after failure. That is the official Flow backbone + Crew intelligence pattern.
Example 3: Custom tool as a stand-in retriever
Production code should hit a vector store (RAG, or LlamaIndexTool from LlamaIndex). This in-memory FAQ shows the tool contract:
Swap _run for Chroma / pgvector / Qdrant. Evaluate retrieval in the RAG course; do not add a parroting agent and call it search quality.