Close Menu
    Facebook LinkedIn YouTube WhatsApp X (Twitter) Pinterest
    Trending
    • Robots-Blog | automatica 2025: erster kollaborativer Roboter von Epson
    • Climate change linked to rising sleep apnea cases
    • Belgian early-stage investor biotope raises €5 million to support up to 30 international BioTech startups
    • Social Media Replaced Zines. Now Zines Are Taking the Power Back
    • Trump Touts China Trade Deal: Tariffs Back to Square One, Still Historically High
    • How AI Girlfriend Chatbots are Inspired by Popular Culture
    • ChatGPT loses chess match to vintage Atari 2600
    • The Business side of TikTok: 10 accounts to learn, build, and grow
    Facebook LinkedIn WhatsApp
    Times FeaturedTimes Featured
    Monday, June 16
    • Home
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    • More
      • AI
      • Robotics
      • Industries
      • Global
    Times FeaturedTimes Featured
    Home»Artificial Intelligence»Agentic AI 103: Building Multi-Agent Teams
    Artificial Intelligence

    Agentic AI 103: Building Multi-Agent Teams

    Editor Times FeaturedBy Editor Times FeaturedJune 15, 2025No Comments10 Mins Read
    Facebook Twitter Pinterest Telegram LinkedIn Tumblr WhatsApp Email
    Share
    Facebook Twitter LinkedIn Pinterest Telegram Email WhatsApp Copy Link


    Introduction

    articles right here in TDS, we explored the basics of Agentic AI. I’ve been sharing with you some ideas that can enable you navigate via this sea of content material we now have been seeing on the market.

    Within the final two articles, we explored issues like:

    • create your first agent
    • What are instruments and implement them in your agent
    • Reminiscence and reasoning
    • Guardrails
    • Agent analysis and monitoring

    Good! If you wish to examine it, I recommend you have a look at the articles [1] and [2] from the References part.

    Agentic AI is without doubt one of the hottest topics in the mean time, and there are a number of frameworks you’ll be able to select from. Luckily, one factor that I’ve seen from my expertise studying about brokers is that these elementary ideas may be carried over from one to a different.

    For instance, the category Agent from one framework turns into chat in one other, and even one thing else, however often with related arguments and the exact same goal of connecting with a Massive Language Mannequin (LLM).

    So let’s take one other step in our studying journey.

    On this submit, we are going to learn to create multi-agent groups, opening alternatives for us to let AI carry out extra complicated duties for us.

    For the sake of consistency, I’ll proceed to make use of Agno as our framework.

    Let’s do that.

    Multi-Agent Groups

    A multi-agent staff is nothing greater than what the phrase means: a staff with a couple of agent.

    However why do we want that?

    Effectively, I created this easy rule of thumb for myself that, if an agent wants to make use of greater than 2 or 3 instruments, it’s time to create a staff. The explanation for that is that two specialists working collectively will do a lot better than a generalist.

    Once you attempt to create the “swiss-knife agent”, the likelihood of seeing issues going backwards is excessive. The agent will develop into too overwhelmed with completely different directions and the amount of instruments to cope with, so it finally ends up throwing an error or returning a poor end result.

    Then again, while you create brokers with a single function, they are going to want only one device to unravel that drawback, subsequently rising efficiency and bettering the end result.

    To coordinate this staff of specialists, we are going to use the category Crew from Agno, which is ready to assign duties to the right agent.

    Let’s transfer on and perceive what we are going to construct subsequent.

    Undertaking

    Our challenge can be targeted on the social media content material technology business. We’ll construct a staff of brokers that generates an Instagram submit and suggests a picture primarily based on the subject offered by the person.

    1. The person sends a immediate for a submit.
    2. The coordinator sends the duty to the Author
      • It goes to the web and searches for that subject.
    3. The Author returns textual content for the social media submit.
    4. As soon as the coordinator has the primary end result, it routes that textual content to the Illustrator agent, so it could actually create a immediate for a picture for the submit.
    Workflow of the Crew of brokers. Picture by the creator.

    Discover how we’re separating the duties very effectively, so every agent can focus solely on their job. The coordinator will guarantee that every agent does their work, and they’re going to collaborate for ultimate end result.

    To make our staff much more performant, I’ll prohibit the topic for the posts to be created about Wine & Positive Meals. This manner, we slender down much more the scope of data wanted from our agent, and we will make its function clearer and extra targeted.

    Let’s code that now.

    Code

    First, set up the mandatory libraries.

    pip set up agno duckduckgo-search google-genai

    Create a file for atmosphere variables .env and add the wanted API Keys for Gemini and any search mechanism you’re utilizing, if wanted. DuckDuckGo doesn’t require one.

    GEMINI_API_KEY="your api key"
    SEARCH_TOOL_API_KEY="api key"

    Import the libraries.

    # Imports
    import os
    from textwrap import dedent
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    from agno.staff import Crew
    from agno.instruments.duckduckgo import DuckDuckGoTools
    from agno.instruments.file import FileTools
    from pathlib import Path

    Creating the Brokers

    Subsequent, we are going to create the primary agent. It’s a sommelier and specialist in connoisseur meals.

    • It wants a identify for simpler identification by the staff.
    • The function telling it what its specialty is.
    • A description to inform the agent behave.
    • The instruments that it could actually use to carry out the duty.
    • add_name_to_instructions is to ship together with the response the identify of the agent who labored on that activity.
    • We describe the expected_output.
    • The mannequin is the mind of the agent.
    • exponential_backoff and delay_between_retries are to keep away from too many requests to LLMs (error 429).
    # Create particular person specialised brokers
    author = Agent(
        identify="Author",
        function=dedent("""
                    You might be an skilled digital marketer who focuses on Instagram posts.
                    You understand how to jot down an enticing, Search engine optimization-friendly submit.
                    You realize all about wine, cheese, and connoisseur meals present in grocery shops.
                    You might be additionally a wine sommelier who is aware of  make suggestions.
                    
                    """),
        description=dedent("""
                    Write clear, participating content material utilizing a impartial to enjoyable and conversational tone.
                    Write an Instagram caption concerning the requested {subject}.
                    Write a brief name to motion on the finish of the message.
                    Add 5 hashtags to the caption.
                    When you encounter a personality encoding error, take away the character earlier than sending your response to the Coordinator.
                            
                            """),
        instruments=[DuckDuckGoTools()],
        add_name_to_instructions=True,
        expected_output=dedent("Caption for Instagram concerning the {subject}."),
        mannequin=Gemini(id="gemini-2.0-flash-lite", api_key=os.environ.get("GEMINI_API_KEY")),
        exponential_backoff=True,
        delay_between_retries=2
    )

    Now, allow us to create the Illustrator agent. The arguments are the identical.

    # Illustrator Agent
    illustrator = Agent(
        identify="Illustrator",
        function="You might be an illustrator who focuses on photos of wines, cheeses, and nice meals present in grocery shops.",
        description=dedent("""
                    Based mostly on the caption created by Marketer, create a immediate to generate an enticing photograph concerning the requested {subject}.
                    When you encounter a personality encoding error, take away the character earlier than sending your response to the Coordinator.
                    
                    """),
        expected_output= "Immediate to generate an image.",
        add_name_to_instructions=True,
        mannequin=Gemini(id="gemini-2.0-flash", api_key=os.environ.get("GEMINI_API_KEY")),
        exponential_backoff=True,
        delay_between_retries=2
    )

    Creating the Crew

    To make these two specialised brokers work collectively, we have to use the category Agent. We give it a reputation and use the argument to find out the kind of interplay that the staff may have. Agno makes accessible the modes coordinate, route or collaborate.

    Additionally, don’t overlook to make use of share_member_interactions=True to guarantee that the responses will stream easily among the many brokers. It’s also possible to use enable_agentic_context, that permits staff context to be shared with staff members.

    The argument monitoring is sweet if you wish to use Agno’s built-in monitor dashboard, accessible at https://app.agno.com/

    # Create a staff with these brokers
    writing_team = Crew(
        identify="Instagram Crew",
        mode="coordinate",
        members=[writer, illustrator],
        directions=dedent("""
                            You're a staff of content material writers working collectively to create participating Instagram posts.
                            First, you ask the 'Author' to create a caption for the requested {subject}.
                            Subsequent, you ask the 'Illustrator' to create a immediate to generate an enticing illustration for the requested {subject}.
                            Don't use emojis within the caption.
                            When you encounter a personality encoding error, take away the character earlier than saving the file.
                            Use the next template to generate the output:
                            - Put up
                            - Immediate to generate an illustration
                            
                            """),
        mannequin=Gemini(id="gemini-2.0-flash", api_key=os.environ.get("GEMINI_API_KEY")),
        instruments=[FileTools(base_dir=Path("./output"))],
        expected_output="A textual content named 'submit.txt' with the content material of the Instagram submit and the immediate to generate an image.",
        share_member_interactions=True,
        markdown=True,
        monitoring=True
    )

    Let’s run it.

    # Immediate
    immediate = "Write a submit about: Glowing Water and sugestion of meals to accompany."
    
    # Run the staff with a activity
    writing_team.print_response(immediate)

    That is the response.

    Picture of the Crew’s response. Picture by the creator.

    That is how the textual content file seems like.

    - Put up
    Elevate your refreshment sport with the effervescence of glowing water! 
    Overlook the sugary sodas, and embrace the crisp, clear style of bubbles. 
    Glowing water is the last word palate cleanser and a flexible companion for 
    your culinary adventures.
    
    Pair your favourite glowing water with connoisseur delights out of your native
    grocery retailer.
    Strive these pleasant duos:
    
    *   **For the Traditional:** Glowing water with a squeeze of lime, served with 
    creamy brie and crusty bread.
    *   **For the Adventurous:** Glowing water with a splash of cranberry, 
    alongside a pointy cheddar and artisan crackers.
    *   **For the Wine Lover:** Glowing water with a touch of elderflower, 
    paired with prosciutto and melon.
    
    Glowing water is not only a drink; it is an expertise. 
    It is the right option to get pleasure from these particular moments.
    
    What are your favourite glowing water pairings?
    
    #SparklingWater #FoodPairing #GourmetGrocery #CheeseAndWine #HealthyDrinks
    
    - Immediate to generate a picture
    A vibrant, eye-level shot inside a connoisseur grocery retailer, showcasing a range
    of glowing water bottles with numerous flavors. Organize pairings round 
    the bottles, together with a wedge of creamy brie with crusty bread, sharp cheddar 
    with artisan crackers, and prosciutto with melon. The lighting must be shiny 
    and welcoming, highlighting the textures and colours of the meals and drinks.

    After we now have this textual content file, we will go to no matter LLM we like higher to create photos, and simply copy and paste the Immediate to generate a picture.

    And here’s a mockup of how the submit can be.

    Mockup of the submit generated by the Multi-agent staff. Picture by the creator.

    Fairly good, I’d say. What do you assume?

    Earlier than You Go

    On this submit, we took one other step in studying about Agentic AI. This subject is sizzling, and there are various frameworks accessible out there. I simply stopped making an attempt to study all of them and selected one to start out truly constructing one thing.

    Right here, we had been in a position to semi-automate the creation of social media posts. Now, all we now have to do is select a subject, modify the immediate, and run the Crew. After that, it’s all about going to social media and creating the submit.

    Definitely, there may be extra automation that may be performed on this stream, however it’s out of scope right here.

    Concerning constructing brokers, I like to recommend that you just take the better frameworks to start out, and as you want extra customization, you’ll be able to transfer on to LangGraph, for instance, which permits you that.

    Contact and On-line Presence

    When you preferred this content material, discover extra of my work and social media in my web site:

    https://gustavorsantos.me

    GitHub Repository

    https://github.com/gurezende/agno-ai-labs

    References

    [1. Agentic AI 101: Starting Your Journey Building AI Agents] https://towardsdatascience.com/agentic-ai-101-starting-your-journey-building-ai-agents/

    [2. Agentic AI 102: Guardrails and Agent Evaluation] https://towardsdatascience.com/agentic-ai-102-guardrails-and-agent-evaluation/

    [3. Agno] https://docs.agno.com/introduction

    [4. Agno Team class] https://docs.agno.com/reference/teams/team



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Editor Times Featured
    • Website

    Related Posts

    How AI Girlfriend Chatbots are Inspired by Popular Culture

    June 16, 2025

    Can AI Truly Develop a Memory That Adapts Like Ours?

    June 16, 2025

    User Authorisation in Streamlit With OIDC and Google

    June 15, 2025

    Tested an NSFW AI Video Generator with Voice

    June 15, 2025

    Are We Entering a New Era of Digital Freedom or Exploitation?

    June 15, 2025

    Design Smarter Prompts and Boost Your LLM Output: Real Tricks from an AI Engineer’s Toolbox

    June 15, 2025
    Leave A Reply Cancel Reply

    Editors Picks

    Robots-Blog | automatica 2025: erster kollaborativer Roboter von Epson

    June 16, 2025

    Climate change linked to rising sleep apnea cases

    June 16, 2025

    Belgian early-stage investor biotope raises €5 million to support up to 30 international BioTech startups

    June 16, 2025

    Social Media Replaced Zines. Now Zines Are Taking the Power Back

    June 16, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    About Us
    About Us

    Welcome to Times Featured, an AI-driven entrepreneurship growth engine that is transforming the future of work, bridging the digital divide and encouraging younger community inclusion in the 4th Industrial Revolution, and nurturing new market leaders.

    Empowering the growth of profiles, leaders, entrepreneurs businesses, and startups on international landscape.

    Asia-Middle East-Europe-North America-Australia-Africa

    Facebook LinkedIn WhatsApp
    Featured Picks

    Behold the Social Security Administration’s AI Training Video

    April 25, 2025

    London-based Maze launches with €21.8 million for its AI agents that prevent cloud security breaches

    June 10, 2025

    Because who wants just a Cadillac Escalade?

    February 2, 2025
    Categories
    • Founders
    • Startups
    • Technology
    • Profiles
    • Entrepreneurs
    • Leaders
    • Students
    • VC Funds
    Copyright © 2024 Timesfeatured.com IP Limited. All Rights.
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us

    Type above and press Enter to search. Press Esc to cancel.