AI / CrewAI Interview Questions
What is the @CrewBase decorator used for?
The @CrewBase decorator provides a declarative, class-based way to define a crew's structure in Python, working alongside YAML configuration files for agents and tasks.
- Lets a project keep agent and task definitions in clean, maintainable YAML files
- Paired with @agent, @task, and @crew method annotations inside the decorated class
- Reduces boilerplate compared to fully manual, direct instantiation of Agent, Task, and Crew objects
This pattern is one of three supported ways to configure a crew, alongside YAML/JSONC configuration and direct instantiation, and is commonly recommended for keeping larger projects organized.
More Related questions...