AI / CrewAI Interview Questions
What are the @agent, @task, and @crew annotations?
These three method annotations are used inside an @CrewBase-decorated class to declare a crew's building blocks in Python while still drawing their configuration from YAML.
- @agent: marks a method that returns a configured Agent instance
- @task: marks a method that returns a configured Task instance
- @crew: marks the method that assembles the defined agents and tasks into the final Crew
This keeps the declarative simplicity of YAML for describing roles, goals, and task descriptions, while still allowing full Python logic wherever it's needed.
More Related questions...