Here’s a polished and well-structured version of your problem statement for posting in the CrewAI community:
Best Practices Integration into Existing CrewAI Workflow
Hi @maxmoura and CrewAI community,
I’m working on a CrewAI-based application where I’ve already created agents and tasks for specific features like:
- Summarizing CRM lead details
- Drafting emails based on lead information (e.g., details, activities, notes) pulled from a database view
Now, I’ve received a Best Practices document that includes guidance like:
- Understanding Your Customer
- Communication Best Practices
- Discovery Questions
- Activity Recommendations by Sales Stage
Although it’s a relatively small document, it contains critical instructions that should be consistently applied across all these features (summaries, email drafts, etc.).
I’m trying to figure out the best architectural approach to incorporate this Best Practices logic into my existing CrewAI setup. Here are some possible approaches I’ve considered:
Options I’m Exploring
-
Pass Best Practices directly into the tool along with lead details
- Simple, but may clutter prompt inputs and mix responsibilities
-
Create a separate tool
BestPractice()- Encapsulates logic cleanly, but unclear how to best chain it with existing tools/tasks
-
Create a dedicated agent and task for processing Best Practices, then use a multi-agent setup
-
Unsure about the optimal flow:
- Should the Best Practice logic run before lead info is processed?
- Or should it be used after, to refine/validate the output?
-
-
Pre-process lead details through Best Practices first, then pass enriched input to summary/email agent
- Might ensure compliance, but could add processing overhead
My Key Question
What’s the most CrewAI-idiomatic and scalable way to ensure these Best Practices are always applied to the output of my summary and email-drafting agents?
Would love your thoughts on how others have handled similar integration of global context/instructions across multiple tasks.
Thanks in advance!
—Shivang