How campusx-official/crewai_masterclass works
1. This repository is a small mono-repo of two separate CrewAI-based Python applications: market_research_crew and research_and_blog_crew. They are structurally similar, each packaged as its own installable project with its own pyproject.toml, uv.lock, source tree, config, knowledge base, and generated output folder.
2. The main architectural pattern in both projects is “configuration-driven multi-agent orchestration.” The code under src/... is minimal glue; the behavior is mostly defined by YAML files in config/ and executed through a central crew.py module.
3. Each project has the same top-level runtime path:
- main.py is the entrypoint.
- crew.py assembles agents, tasks, and the CrewAI execution flow.
- config/agents.yaml defines agent roles and behavior.
- config/tasks.yaml defines the work to be performed and how outputs are chained.
4. The agent/task boundary is important. Agents represent specialized workers, while tasks represent units of work assigned to those workers. The architecture suggests sequential or coordinated task execution inside a CrewAI “crew,” rather than a traditional service/controller/model split.
5. Both projects include a tools/ package with custom_tool.py. This is the extension point where agents can access non-LLM capabilities or external data sources. In architecture terms, this is the escape hatch between the agent framework and the outside world.
6. Both projects also have a knowledge/user_preference.txt file. This acts as a persistent local context layer that influences generation and decision-making without being code. It is separate from runtime logic and separate from generated outputs, so it should be shown as an input artifact feeding the crew.
7. The output side differs by project:
- market_research_crew/reports/report.md
- research_and_blog_crew/blogs/blog.md
These are generated artifacts, likely produced by the final task in each workflow. They are the main persistence boundary for results.
8. The two subprojects target different deliverables but share the same pipeline shape. market_research_crew is oriented around producing a research report, while research_and_blog_crew turns research into a blog post. That means the second project likely has a more content-generation-focused task chain, but both are still CrewAI orchestration systems.
9. resources/ contains CrewAI MasterClass.pdf and crewai_masterclass.html. These appear to be source/reference material for the examples rather than runtime dependencies. They sit outside either package and act as static inputs or documentation assets.
10. The repository depends on Python packaging and environment management via pyproject.toml and uv.lock, which indicates reproducible local execution with uv. There is no sign of a separate backend, database, or web UI; the core runtime is a local Python agent workflow.
11. A useful architecture diagram should show three layers for each project:
- configuration and knowledge inputs,
- CrewAI orchestration and custom tools,
- generated markdown artifacts.
The only likely external boundary is the LLM/provider used by CrewAI, which is abstracted away behind the framework rather than implemented directly in the repo.
12. One notable repository detail is that research_and_blog_crew uses a package directory named reaseach_and_blog_crew inside src/, which looks like a spelling inconsistency. It likely does not change the architecture, but it matters for import paths and packaging boundaries.
Main entry points: market_research_crew/crew.py crew.py · reaseach_and_blog_crew/crew.py crew.py · config/tasks.yaml tasks.yaml · config/tasks.yaml tasks.yaml
Components 16
Market Research
CrewAI app for market research reporting.
- main.py · Starts the market research workflow.
market_research_crew/src/market_research_crew/main.py - crew.py · Builds the crew and wires agents, tasks, and tools.
market_research_crew/src/market_research_crew/crew.py - agents.yaml · Defines agent roles and behavior.
market_research_crew/src/market_research_crew/config/agents.yaml - tasks.yaml · Defines the work sequence and task outputs.
market_research_crew/src/market_research_crew/config/tasks.yaml - custom_tool.py · Extension point for external data or non-LLM capability.
market_research_crew/src/market_research_crew/tools/custom_tool.py - user prefs · Persistent local context that influences generation.
market_research_crew/knowledge/user_preference.txt - report.md · Final research report output.
market_research_crew/reports/report.md
Research & Blog
CrewAI app that turns research into blog content.
- main.py · Starts the research-to-blog workflow.
research_and_blog_crew/src/reaseach_and_blog_crew/main.py - crew.py · Builds the crew and wires agents, tasks, and tools.
research_and_blog_crew/src/reaseach_and_blog_crew/crew.py - agents.yaml · Defines agent roles and behavior.
research_and_blog_crew/src/reaseach_and_blog_crew/config/agents.yaml - tasks.yaml · Defines the work sequence and task outputs.
research_and_blog_crew/src/reaseach_and_blog_crew/config/tasks.yaml - custom_tool.py · Extension point for external data or non-LLM capability.
research_and_blog_crew/src/reaseach_and_blog_crew/tools/custom_tool.py - user prefs · Persistent local context that influences generation.
research_and_blog_crew/knowledge/user_preference.txt - blog.md · Final blog post output.
research_and_blog_crew/blogs/blog.md
Shared Resources
Reference material used across examples.
- MasterClass PDF · Static reference asset for the examples.
resources/CrewAI MasterClass.pdf - MasterClass HTML · Static reference asset for the examples.
resources/crewai_masterclass.html
Connections 16
- main.py → crew.py: starts · Entrypoint hands off to orchestration.
- crew.py → agents.yaml: loads · Crew is configured from agent definitions.
- crew.py → tasks.yaml: loads · Crew is configured from task definitions.
- crew.py → custom_tool.py: uses · Agents can invoke custom external capability.
- crew.py → user prefs: reads · Local preference context informs execution.
- tasks.yaml → report.md: produces · Final task writes the report artifact.
- agents.yaml → tasks.yaml: assigned to · Agents execute the configured tasks.
- main.py → crew.py: starts · Entrypoint hands off to orchestration.
- crew.py → agents.yaml: loads · Crew is configured from agent definitions.
- crew.py → tasks.yaml: loads · Crew is configured from task definitions.
- crew.py → custom_tool.py: uses · Agents can invoke custom external capability.
- crew.py → user prefs: reads · Local preference context informs execution.
- tasks.yaml → blog.md: produces · Final task writes the blog artifact.
- agents.yaml → tasks.yaml: assigned to · Agents execute the configured tasks.
- MasterClass PDF → crew.py: reference · Static source material can inform the market research workflow.
- MasterClass HTML → crew.py: reference · Static source material can inform the blog workflow.