A Glimpse Into The Future of Building AI Agent Apps

Exploring The Future of AI Development By Sharing Insider Secrets By Experimenting With CrewAI and VertexAI

Developing AI Agents

The AI landscape is rapidly evolving, with platforms emerging to simplify agent creation and workflow automation. This newsletter explores CrewAI and VertexAI, examining their approaches to agent development and highlighting their pros and cons.

Understanding Autonomous Agents

Autonomous agents, a concept dating back to Brustoloni's 1991 definition, are โ€œsystems capable of autonomous, purposeful action in the real world." They defined by three core concepts:

  • Independence: Execution without human intervention

  • Goal-orientation: Pursuit of specific objectives through reasoning and planning

  • Context awareness: Understanding and responding to the environment, leveraging resources to accomplish tasks

Modern agents are capable to orchestrate other agents, utilize various technologies, and adapt to changing conditions.

Note: Complex multi-agent systems involving orchestrators, shared memory, and external data access are beyond the scope of this issue, but will be explored in future issues, stay tuned!

Our Experience: Content Creator Agent

Comparing VertexAI and CrewAI agent building platforms

To evaluate these platforms, we created a simple agentic flow to assist with writing a blog post on a user-provided topic. This task required reasoning, research skills, and cooperation between multiple agents with defined roles and goals. We attempted to create an AI agent capable of writing a blog post on "The Impact of AI on Modern Healthcare" using both CrewAI and VertexAI.

On both platforms we implemented a team of specialized agents: a Content Planner / Researcher, a Writer, and an Editor. This multi-agent approach allowed for a clear division of roles and tasks. Agents could pass information between them, and the modular structure made it easy to adjust or replace individual agents. Setting up the agentic team requires more initial configuration compared to prompt engineering interaction with chatbot interfaces such as ChatGPT. To ensure smooth communication between agents the flow should be carefully planned. Fine-tuning agents interactions to produce cohesive output took some effort.

CrewAI: Collaborative AI Teamwork

CrewAI is an open-source framework for building AI teams called "crews". These crews consist of multiple AI agents, the intelligent actors within the system. The framework emphasizes multi-agent collaboration for efficient problem-solving, simulating teamwork among AIs to tackle complex tasks.

Crew AI Building Blocks

Key elements of CrewAI agent:

  • Role: Determines its focus and responsibilities;

  • Goal: Guides its decision-making and actions;

  • Backstory: Provides context and directions;

This trio of attributes gives each agent a distinct identity and purpose within the crew.

Agents are further enhanced by their ability to utilize Tools - specialized functions or capabilities that expand their problem-solving repertoire. These tools can range from web searching and data analysis to more complex, domain-specific functionalities

Tasks in CrewAI represent the specific assignments that agents undertake. Like agents, tasks are highly customizable and modular. They can be assigned to specific agents, given context from other tasks, and even set to run asynchronously.

The Crew itself acts as the orchestrator, managing the interactions between agents and the execution of tasks. It ensures that the right agents are working on the right tasks at the right time, facilitating collaboration and efficient problem-solving.

CrewAI's advantages lie in its flexible and modular framework for building autonomous AI systems. By treating agents and tasks as customizable classes with numerous properties, it allows developers to create complex, collaborative AI solutions that can be easily adapted and scaled to meet diverse challenges.

Example of Content Planner Agent Code

We created a three-agent crew (Planner, Writer, Editor) with defined roles and goals. CrewAI assigned tasks to each, aiming to produce an AI-focused article. The tool provided real-time feedback, showing each agent's output.

### Planner Output
> Entering new CrewAgentExecutor chain...
I now can give a great answer

Final Answer:
Title: The Future of Artificial Intelligence: Trends, Players, and News

Outline:
I. Introduction
- Definition of Artificial Intelligence (AI)
- Importance of AI in various industries
- Preview of the latest trends and key players in the AI space

II. Latest Trends in Artificial Intelligence
- Machine Learning advancements
- Natural Language Processing developments
- AI ethics and regulations
- AI in healthcare, finance, and other sectors

III. Key Players in the Artificial Intelligence Industry
- Google DeepMind
- IBM Watson
- Tesla's Autopilot
- Amazon Web Services AI
- Microsoft Azure AI

IV. Noteworthy News in Artificial Intelligence
- Recent breakthroughs in AI research
- AI applications in everyday life
- Impact of AI on job market and society
- Future predictions for AI technology

V. Target Audience Analysis
- Tech enthusiasts interested in AI advancements
- Business professionals looking to implement AI solutions
- Students studying AI and related fields
- Individuals curious about the impact of AI on society

VI. SEO Keywords
- Artificial Intelligence trends
- Top AI companies
- Latest AI news
- Future of AI technology
- AI industry updates

VII. Call to Action
- Encourage readers to stay updated on AI news and advancements
- Prompt them to explore AI resources and courses online
- Invite them to share their thoughts and opinions on AI in the comments section

VIII. Resources
- Research papers from reputable AI journals
- Industry reports on AI trends and developments
- Interviews with AI experts and thought leaders
- Websites and blogs dedicated to AI news and analysis

By following this comprehensive content plan, the blog article on Artificial Intelligence will provide valuable insights to the target audience, engage readers with the latest trends and key players, and encourage them to take action in the ever-evolving world of AI technology.

Our experience with CrewAI revealed its potential as a robust framework for constructing complex AI systems. While the resulting output quality was limited by the use of gpt-3.5-turbo, this choice of model underscores CrewAI's flexibility in model selection rather than its limitations.

Setting up CrewAI does require technical proficiency, including environment configuration and a solid grasp of the documentation. However, this initial investment pays dividends in the framework's versatility. CrewAI's strength lies in its structured approach to creating sophisticated AI systems. Unlike platforms such as Vertex AI, which rely primarily on natural language instructions, CrewAI empowers developers to specify building blocks and their attributes through structured code.

CrewAI's architecture provides a solid foundation for developing advanced AI applications. Its capacity to handle complex workflows, asynchronous tasks, and inter-agent communication makes it a valuable tool for those aiming to push the boundaries of collaborative AI systems.

VertexAI: Streamlined Agentic Workflow

VertexAI, part of Google Cloud, focuses on providing a unified platform for machine learning operations, and offers a comprehensive environment for building AI agents and applications. It caters to both novice users through its no-code interface and experienced developers with its code-first approach.

Agent Builder is a new platform offered on GCP. Itโ€™s core building block is the generative agent, designed to handle specific tasks within a larger AI system.

Vertex AI Agent Builder Components

VertexAI agent components include:

  • Goal: Defines the agent's purpose, main objective, role, and desired output format.

  • Instructions: Provide a step-by-step guide in natural language, including basic directives, references to other agents, tool usage guidelines, and Dialogflow CX routing for enhanced conversational abilities.

  • Examples: Serve as training data, demonstrating proper handling of various scenarios, correct input/output formatting, and showcasing tool usage and multi-agent interactions.

  • Parameters: Act as a structured mechanism for information exchange, including input parameters (receiving values) and output parameters (sending information).

  • Tools: Expand agent capabilities through OpenAPI tools, data store tools, and function tools, connecting to external systems or data sources.

The development process involves creating an app with a default agent, specifying goals and instructions for each agent, providing behavioral examples, and creating helper agents as needed. Notably, the platform supports the creation of Fallback Agents to handle off-topic requests, analogous to error handling in traditional software development.

Vertex AI Agent Builder: Default Agent

VertexAI's strengths lie in its user-friendly interface integrated with Google Cloud, support for complex interactions and tools, and its out-of-the-box conversational interface. This feature allows for human-in-the-loop grounding, enabling real-time feedback and guidance without additional setup.

Vertex AI Agent Builder: Content Writer

While our experience with VertexAI Agent Apps (still in beta) resulted in mixed outcomes - with the Content Planner agent underperforming but the Content Writer agent showing promise - the platform demonstrates potential for future developments in human-AI collaboration. Its no-code interface allows for quick adjustments and iterations, making it an accessible tool for exploring and developing AI applications.

CrewAI vs VertexAI Comparison

Both CrewAI and VertexAI offer unique strengths for AI agent development. Your choice depends on project requirements, team expertise, and desired customization level.

Comparison table of the key traits discussed regarding CrewAI and VertexAI

CrewAI excels in multi-agent collaboration, ideal for complex, team-based problem-solving. In our experiment, CrewAI's approach allowed for nuanced handling of the blog writing process, with each agent specializing in a specific aspect. However, it required more initial setup and careful orchestration of agent interactions.

VertexAI shines in its Google Cloud integration and user-friendly interface, accessible to both beginners and advanced users. In our blog writing experiment, VertexAI's unified agent approach simplified the process and allowed for quick iterations. However, it faced challenges in maintaining context across different stages of the complex task.

Choose CrewAI for:

  • Complex, collaborative AI projects

  • Projects benefiting from specialized agent roles

  • Intricate workflows requiring high customization

Opt for VertexAI when you need:

  • A streamlined, integrated solution within the Google ecosystem

  • Projects that align well with a single, multi-tool agent approach

  • Rapid development and deployment of AI agents

Both platforms offer unique strengths, catering to different needs in AI agent development. Your choice will depend on project requirements, team expertise, and desired level of customization.

๐Ÿ“š We are reading and watching this week:

โ“ How Are We Doing? 

How did we score this time? ๐ŸŽฏ๐Ÿ’ฏ

๐Ÿ“ฃ Hit that reply button and tell us: What burning topic should we tackle next? We're all ears! ๐Ÿ‘‚โœจ

Brought to you by your AI-curious guides,

Jason ๐Ÿš€ and Anastasia ๐Ÿค–