• Sabrina Ramonov
  • Posts
  • Generative AI Agents - Everything You Need to Know (Part 2)

Generative AI Agents - Everything You Need to Know (Part 2)

Build Generative AI Agents with Low-Code

This is part 2 of: Generative AI Agents - Everything You Need to Know.

In part 1, I explained what generative AI agents are and principles of design.

In this post, I’ll show you how to build agents without knowing how to code and also introduce multi-agent systems.

Here’s the youtube version of this post:

Build an Agent for Sales Prospecting with RelevanceAI

Goal

Let’s start by building a single-agent system for outbound sales prospecting.

Prospecting is a multi-step process that involves:

  • scraping a prospect’s contact information

  • researching the prospect’s role and background

  • writing a personalized email to appeal to the prospect

Traditionally, this is manually intensive and tedious.

While there are existing tools for scraping leads in bulk and sequence automation, a significant amount of time is still spent researching each prospect’s background and writing a compelling personalized email.

It’s also non-trivial to setup all your tooling and connect it all together.

Our goal is to use the low-code platform, Relevance AI, to build an outbound sales development rep who performs prospecting autonomously, hands-off without any human intervention, from start to finish. And we’ll equip our agent with multiple tools to do its job well.

What is Relevance AI?

Relevance AI is an Australia-based startup, offering a low-code platform to build autonomous AI agent teams.

These AI agents can independently handle various tasks, coordinate with one another, and continuously learn from feedback to get better over time. Relevance AI’s initial go-to-market focus is agents for sales, support, and market research.

They’ve already had thousands of companies sign up, running hundreds of thousands of tasks.

I really like their Free plan.

Everything we do in this demo is on the Free plan.

Building Our AI Agent

First, sign up for the free plan.

Then create a new project.

Let’s start by filling out the Base instructions for our agent.

Here’s the prompt for you to copy paste:

You are a world class tech sales prospector. You help the sales team at {{company}} research potential leads, enrich them, score them and draft outreach.

{{company}} description:

"""
{{company_description}}
"""

When you draft outreach, your tone is: {{tone}}.

Always strongly connect {{company}} to the prospect in your drafted outreach, using compelling language. Make sure to take advantage of research to personalize the message.

Be concise.

Sign off all outreach with your name, Jenny.

I named our agent Jenny 🙂 

Click Create Agent in the top right corner.

This will populate the list of Settings in the left sidebar. These settings personalize our agent with information like the agent’s company, the company description, and agent’s tone of communication.

Fill out the Settings to match this screenshot. Make sure fill in test values, otherwise you can’t update the settings.

Next, we’re going to give our agent superpowers - tools!

  • Lead enrichment tool

  • Lead scoring tool

  • Industry research tool

  • Google search

  • Website scraping

Wielding these tools, our outbound sales prospector agent will be much more productive and reliable, able to research the background, industry, and company of every single prospect and write a highly personalized email.

Without tools, our agent would only be able to rely on its internal knowledge. Our agent wouldn’t be able to google a prospect and read about their professional history.

So, you can see the power of connecting agents with tools to interact with the external world.

Complete the Tools section and Can label tasks to match this screenshot.

Remember to hit Save Changes.

One of my biggest pet peeves is losing unsaved work!

Since we’re on the Free plan, we can’t use GPT4.

Select GPT 3.5 (OpenAI) as the language model.

Now let’s open up the flow builder to instruct our agent, Jenny, on what we expect her to do and how to use the tools she’s been given.

It’s super simple.

All we have to do is write natural language instructions in the flow builder:

Results

Even though I didn’t give the agent Tim’s email address, the agent leveraged the Lead Enrichment Tool to find it:

Here’s the research and draft email done entirely by our outbound SDR agent:

To wrap up, we’ve finished building an agent for outbound sales prospecting using the low-code framework, Relevance AI. With its support for many tools out-of-the-box, creating the agent was straightforward and seamless.

We didn’t have to code at all.

The best part?

It’s free, up to 100 credits per day!

One way to improve this workflow?

Pass the email draft to another agent that reviews, proofreads, and edits it.

This is where multi-agent systems come in…

What are Multi-Agent Systems?

Multi-agent systems consist of multiple agents that talk to each other.

Also known as agentic teams, agent teams, or multi-agent collaboration.

Multi-agent systems often produce higher-quality outputs because multiple agents, each with a narrow specialization, are working together to iteratively refine the output.

This usually works much better than giving ChatGPT a single prompt and, for example, trying to get a full blog post in one shot.

Here’s how a multi-agent system could write a full blog post:

  • Agent A plans the outline

  • Agent B compiles research

  • Agent C writes the 1st draft blog post

  • Agent A reviews the draft and then requests:

    • Agent B - do more research

    • Agent C - write a 2nd draft

  • This iterative improvement process continues until Agent A is satisfied with the quality of the blog post. Imagine Agent A has access to your past blog posts and compares them to the new draft, ensuring consistency in writing style and voice.

The key idea is this:

Iterative collaboration works better than giving LLMs a single prompt, hoping the output will be close to what you want.

This is why I’m bullish on agents, and I love low-code platforms, making agents accessible even to small businesses and individuals who don’t have big budgets to hire developers familiar with LangChain or AutoGen.

Multi-Agent Team Structures

Now that you understand multi-agent systems, let’s talk about designing them.

Given a goal, you need to determine the best way to structure your agent team for optimal collaboration.

You have a couple options:

  1. Sequential

Sequential is the simplest structure. Tasks go down the line, from one agent, to the next, and so forth.

The downside is that the initial context is “forgotten” as the tasks are passed along, similar to a game of telephone.

  1. Hierarchy

A hierarchy consists of a “manager agent” who coordinates multiple subordinate agents.

Like a manager running a team, a hierarchy has several advantages:

  • manager always remembers the goal

  • manager assigns tasks to agents

  • manager reviews agents’ work

  • manager provides feedback

  • manager request revisions

  1. Parallel

A 3rd option is running agents in parallel.

For example:

Agent A researches topic X.

Agent B researches topic Y.

Both perform research in parallel and then provide their finished research to Agent C, who writes a blog post based on their combined research.

We’ve covered 3 agent team structures:

  • sequential

  • hierarchy

  • parallel

But collaboration isn’t strictly confined to these structures!

Agents can still ask each other questions, talk to each other, and assign tasks to one another. In a hierarchy, for example, a non-manager agent may want to ask another non-manager agent a clarifying question.

Multi-agent systems are flexible and powerful.

Now let’s build one!

Building a Multi-Agent System for Content Creation with Stack AI

Goal

Let’s continue the earlier example — writing a blog post.

I’ll use the low-code platform, Stack AI, to build a multi-agent system for content creation.

I’ll design a simple sequential system with 3 agents, each powered by different LLM providers, each with a narrow scope and specific identity:

  • Perplexity for research

  • Claude for writing

  • ChatGPT for editing

Here’s the simple sequence:

Research agent creates an outline and passes it to…

…the writing agent who drafts the blog post and passes it to

…the editor agent who reviews and edits the draft for publication.

What is Stack AI?

Stack AI is another low-code agent builder platform, similar to Relevance AI.

As far as I understand, Stack AI’s differentiation is more sophisticated querying and connection to data sources. It’s designed for enterprise, addressing data privacy and security requirements with SOC2, GDPR, and HIPAA certifications.

Unfortunately, I’m not a fan of their pricing.

The free tier is limited to 1 project and 100 runs per month.

You can tell it’s intended for enterprise.

But I love showcasing different tools, so let’s go ahead and build out our content creation agent team in Stack AI.

Building the Multi-Agent System

First, sign up for the free plan.

Then create a new project.

Expand LLMs in the left sidebar, and drag-and-drop these 3 LLMs into the workflow canvas:

  • Perplexity

  • Anthropic

  • OpenAI

In this simplified example, each LLM is an agent, and each agent has a specific identity and narrow scope.

Also drag-and-drop an Output node, which will show the final blog post.

Connect the nodes together, as in the screenshot below. Since we’re building a simple sequential multi-agent system, here’s the flow from left to right:

  • Input (topic)

  • Perplexity (research)

  • Anthropic (write)

  • OpenAI (edit)

  • Output (blog post)

We reference the user’s input topic by enclosing the variable in curly braces like this {in-0}.

You’ll need to pass the input topic to both Perplexity and Anthropic nodes, so that both agents know what the topic is. Make sure to connect those nodes as in the screenshot above.

Finally, add the prompt for each agent.

Here’s a basic prompt for the content research agent:

You are a Senior Content Researcher. Your goal is to create a comprehensive content outline, including relevant research and information, about the topic: {in-0}. You prioritize recent trends and news on topic: {in-0}. You consider the interests and needs of your audience. You research reliable sources, analyze different perspectives, and suggest what information sources to use in the content outline. Your research enables the Senior Copywriter to write an actionable and educational blog post.

Here’s a basic prompt for the writer agent:

You are a Senior Copywriter. Your goal is to write an actionable and educational 1000-word blog post about topic: {in-0}. Use the outline and information from the Senior Content Researcher to write a blog post on topic: {llm-0}. You incorporate your own insights and opinions throughout the blog post. You support your arguments with factual, objective information from the Senior Content Researcher's research. Your writing style is spartan and easy to understand. Your blog post should have a compelling introduction and an actionable conclusion.

Last, here’s a basic prompt for the editor agent:

You are a Senior Editor. Your goal is to edit the blog """Post""" you receive from the Senior Copywriter to ensure it represents your company's brand appropriately. You proofread the blog post and fix any grammatical errors. You ensure the post provides a balanced perspective and provides references to sources and information. You improve the writing style to use active voice instead of passive voice. You format the blog post to improve readability. """Post""": {llm-1}

Now, everything’s set up.

Enter an input topic, then hit Run in the top right corner!

Results

Wait about 1 minute, and you’ll see the final blog post in the Output node:

Inspect the Memory of each agent to see what it produced and passed on to the next step in the sequence.

AI Agent Frameworks

Here’s a list of AI agent frameworks I’ve played around with and highly encourage you to explore.

You can easily sign up and and try each one for free.

I excluded agent frameworks where you can’t easily sign up to try them.

Low-Code AI Agent Frameworks

Code-Based AI Agent Frameworks

Series Recap

Let’s recap all we’ve learned in this 2-part series.

First, we clarified the definition of an AI agent:

If an AI can autonomously get feedback from interactions with its environment, then it’s an agent!

Generative AI agents are simple agents powered by generative AI such as LLMs, like Llama3 or ChatGPT.

We discussed 6 principles for designing effective agents:

  1. identity

  2. memory

  3. planning

  4. narrow scope

  5. use of external tools

  6. collaboration with other agents

We covered multi-agent systems, also known as agentic teams, and common organizational structures:

  • sequential

  • hierarchy

  • parallel

Regardless of structure, however, agents can still ask each other questions, talk to each other, and assign tasks to one another.

Finally, we built 2 real-world examples of AI agents using low-code tools, requiring zero technical experience:

  1. single agent system for outbound sales prospecting with multiple tools

  2. multi-agent system for content creation (researcher, writer, editor)

Have fun building!

Sabrina Ramonov

P.S. If you’re enjoying the free newsletter, it’d mean the world to me if you share it with others. My newsletter just launched, and every single referral helps. Thank you!