collaborating AI agents
Update: Listen to this post covered in the NotebookLM podcast: https://notebooklm.google.com/notebook/1dd5ef6a-4b8c-4b56-945e-f46dbc532b12/audio
In today’s digital landscape, non-profit organizations strive to maximize their outreach and engagement to further their missions. Recognizing the pivotal role of digital marketing, a pro-bono consulting project has been launched involving current MBA students from the University of Chicago’s Booth School of Business’s Booth Social Impact team, a dedicated non-profit organization, and me. This initiative aims to revolutionize the non-profit’s digital marketing strategy. We’ll be using advanced AI to assist us in developing this charity’s digital marketing strategy.
In this blog post, we explore the project’s background, the AI-driven approach, and the technical intricacies of the AI agents we’ll deploy to complete this project.
Project Background
Booth Social ImpactBooth Social Impact is committed to fostering a culture of social responsibility within the Booth School of Business. The program not only prepares students for impactful careers in the social sector but also provides invaluable consulting experience. By engaging in real-world consulting projects, students develop the skills necessary to manage and execute initiatives that address global challenges, offering a blend of academic knowledge and practical insights.
The Non-Profit Organization
The non-profit at the center of this project is dedicated to empowering underrepresented communities and promoting young girls’ education. Despite its commendable mission, the organization has faced significant hurdles in digital marketing, limiting its ability to reach and engage a broader audience. This collaboration seeks to bridge that gap and we plann on leveraging AI to develop a robust and effective digital marketing strategy that amplifies the non-profit’s mission.
Leveraging AI for Digital Marketing
CrewAI and Ollama.
The project’s backbone is the integration of CrewAI and Ollama — two sophisticated AI tools designed to coordinate and execute comprehensive digital marketing strategies.

- CrewAI: This tool orchestrates a team of AI agents, each specializing in different aspects of digital marketing. CrewAI’s framework allows for efficient task allocation, execution, and monitoring, ensuring that the project progresses smoothly and cohesively.

- Ollama: Serving as the computational engine for CrewAI, Ollama runs the AI agents locally, ensuring data privacy and reducing latency. This integration facilitates faster processing times and maintains the confidentiality of sensitive non-profit data. I love Ollama and will be using it for my initial test runs, but we will likely eventually used closed-sourced models for deeper and richer AI-infused content.
The synergy between CrewAI and Ollama provides a powerful platform for developing and implementing data-driven marketing strategies, harnessing the strengths of each AI agent within the crew.
The AI Crew: Agents and Their Roles
The AI crew is composed of four specialized agents, each with distinct roles and responsibilities tailored to cover all facets of digital marketing:
Marketing Strategist
- Role: Acts as the strategic brain behind the digital marketing efforts.
- Responsibilities: Conducts competitive analysis, identifies key marketing trends, and formulates overarching marketing strategies.
- Goal: To create a smart, snappy, and effective digital marketing strategy that aligns with the non-profit’s mission.
Content Creator
- Role: Focuses on generating engaging and relevant content for the non-profit’s digital platforms.
- Responsibilities: Develops blog posts, social media updates, and email newsletters that resonate with the target audience.
- Goal: To produce compelling content that inspires support and engagement from stakeholders.
SEO Specialist
- Role: Enhances the non-profit’s online visibility through search engine optimization.
- Responsibilities: Conducts SEO audits, identifies high-potential keywords, and recommends optimization strategies to drive organic traffic.
- Goal: To optimize the non-profit’s digital presence, making it more discoverable and accessible to potential supporters.
Social Media Manager
- Role: Manages and amplifies the non-profit’s presence across social media platforms.
- Responsibilities: Designs viral social media strategies, schedules posts, and identifies potential influencer partnerships.
- Goal: To boost the non-profit’s online presence and foster community engagement through strategic social media initiatives.
Detailed Tool Utilization
Tools Overview
To empower each agent, a suite of specialized tools has been integrated into the CrewAI framework:
SerperDevTool
- Purpose: Enables searching the internet using Google search.
- Usage: Assists the Marketing Strategist in researching competitors’ digital marketing strategies by fetching relevant data.
ScrapeWebsiteTool
- Purpose: As the name says, this tool scrapes relevant sites found by the SerperDevTool and scrapes content that was requested by the agent.
- Usage: Supports the SEO Specialist and Content Creator in optimizing content and conducting website audits.
YoutubeChannelSearchTool
- Purpose: Identifies potential influencer partnerships on YouTube by searching and scraping YouTube feeds.
- Usage: Aids the Social Media Manager in formulating influencer strategies by finding suitable channels for collaboration.
Integration of Tools with Agents
Each tool is integrated with the corresponding agent to streamline task execution:
- Marketing Strategist: Utilizes SerperDevTool to gather competitive intelligence, essential for crafting informed marketing strategies.
- Content Creator: Uses ScrapeWebsiteTool to analyze existing content and identify areas for improvement, ensuring new content is both relevant and impactful.
- SEO Specialist: Employs ScrapeWebsiteTool for comprehensive SEO audits, extracting necessary data to enhance search engine rankings.
- Social Media Manager: Leverages YoutubeChannelSearchTool to pinpoint and engage with potential influencers, expanding the non-profit’s reach through strategic partnerships.
Collaboration Workflow / Chain
Task Allocation and Execution
The project follows a structured workflow to ensure efficiency and coherence:
- Research Task: Assigned to the Marketing Strategist using SerperDevTool to analyze competitors.
- Content Task: Delegated to the Content Creator using ScrapeWebsiteTool for content development informed by the research findings.
- SEO Task: Handled by the SEO Specialist using ScrapeWebsiteTool to perform SEO optimizations based on the content and research insights.
- Social Media Task: Managed by the Social Media Manager using YoutubeChannelSearchTool to design and implement influencer strategies.
Task Workflow and Dependencies
Each task builds upon the previous one, creating a seamless progression from research to content creation, SEO optimization, and social media strategy. This sequential flow ensures that each step is informed by comprehensive data and strategic insights, fostering a cohesive and effective marketing strategy.
Integration and Communication
The AI agents collaborate seamlessly, sharing information and insights to ensure a unified approach. CrewAI facilitates this by managing task dependencies and ensuring that each agent has access to the necessary data and tools to perform their roles effectively.
Technical Implementation
Integration of CrewAI and Ollama
The technical backbone of this project lies in the seamless integration of CrewAI with Ollama. Here’s how it’s achieved:
Setup Process:
- Installation and Configuration: CrewAI is installed on a local server, leveraging Ollama to provide the necessary computational environment. This setup ensures that the AI operations are swift and secure.
- Environment Variables: The
load_dotenv()function loads environment variables, specifically settingOPENAI_API_KEY="NA". This key is essential for CrewAI’s support of Ollama, ensuring secure and efficient operations.
Agent Initialization:
- Each agent is defined with specific roles, backstories, and goals. For instance, the
marketing_strategistagent is initialized with the role of a seasoned strategist, tasked with creating effective digital marketing strategies. - The parameter
llm = 'ollama/phi3.5'is added to each Agent object creation. This specifies the language model used by Ollama, ensuring that each agent operates with the desired level of sophistication and accuracy.
Code Structure and Execution
The main.py script orchestrates the entire process:
- Importing Libraries and Tools: Essential libraries such as CrewAI, Ollama, and the specialized tools are imported to set up the environment.
- Defining Agents and Tools: Each agent is defined with its respective tools and parameters, ensuring they are equipped to handle their designated tasks.
Setting Up Tasks:
- Tasks are meticulously defined with descriptions, expected outputs, associated agents, and required tools. For example, the
research_taskassigned to the Marketing Strategist involves analyzing competitors using SerperDevTool.
Crew Execution:
- The crew is instantiated with all agents and tasks, following a sequential process flow. This ensures that each task is completed in order, building upon the insights gained from the previous steps.
- Verbose logging is enabled, providing detailed execution insights and facilitating monitoring and debugging.
Here’s a snippet of the agent initialization from main.py:
marketing_strategist = Agent(
role=dedent("""
Marketing Strategist
"""),
backstory=dedent("""
"You are a seasoned strategist in the non-profit world, tailoring campaigns for maximum engagement."
"""),
goal=dedent("""
Create a smart, snappy, and effective digital marketing strategy for the non-profit.
"""),
allow_delegation=False,
verbose=True,
max_iter=3,
llm='ollama/phi3.5'
)
This example showcases how each agent is tailored with specific parameters to perform its role effectively, utilizing the ollama/phi3.5 language model for enhanced performance.
Consultant Advisor’s Role
My role is to bring real-life experience and insights to the table, guiding the student team through the complexities of managing and executing consulting projects. By sharing best practices and practical knowledge, I’m hoping to convey a sense of urgency and project planning that we as consultants walk through regularly through our engagements. I’ll encourage the team to work with this crew and other AI tools to help our client. This mentorship enhances the project’s effectiveness, fostering a learning environment that bridges academic AI theory with real-world application.
Expected Outcomes and Benefits
While the project is in its initial stages, the anticipated outcomes are promising:
- Digital Marketing Improvements: Enhanced content creation, optimized SEO strategies, and robust social media campaigns are expected to significantly improve the non-profit’s online presence.
- AI-Driven Strategies: The integration of AI tools like CrewAI and Ollama allows for data-driven decision-making, ensuring that marketing strategies are both effective and efficient.
- Mission Amplification: By boosting the non-profit’s digital presence, the project aims to expand its reach, attract more supporters, and ultimately amplify its mission to empower underrepresented communities and promote education.
Future Enhancements
The project’s scalability and sustainability are key considerations for future enhancements:
- Scaling the Project: There is potential to expand the AI crew by incorporating additional agents or integrating more advanced tools, further enhancing the digital marketing strategy. We will likely run various scenarios of this crew across multiple models to find what is the best result.
- Sustainability: Ensuring long-term benefits involves maintaining and building upon the AI-enhanced strategies. Continuous collaboration between Booth Social Impact and the non-profit can foster ongoing improvements and adaptations to evolving digital landscapes.
- Advanced AI Technologies: Exploring more sophisticated AI models and integrations can provide deeper insights and more nuanced strategies, keeping the non-profit at the forefront of digital marketing innovations.
Conclusion
This collaborative project exemplifies the potential of AI in enhancing digital marketing strategies. By leveraging CrewAI and Ollama, and through the dedicated efforts of the Booth Social Impact student group the initiative promises to deliver impactful and sustainable marketing solutions. As the project progresses, the fusion of academic marketing expertise, real-world experience, and cutting-edge AI technologies underscores the pivotal role of AI in modern digital marketing strategies, driving meaningful change and amplifying the missions of organizations committed to societal betterment. Stay tuned for updates on this project’s progress and the tangible impacts it will create for the non-profit community.