Close Menu
    Trending
    • Qantas data breach to impact 6 million airline customers
    • He Went From $471K in Debt to Teaching Others How to Succeed
    • An Introduction to Remote Model Context Protocol Servers
    • Blazing-Fast ML Model Serving with FastAPI + Redis (Boost 10x Speed!) | by Sarayavalasaravikiran | AI Simplified in Plain English | Jul, 2025
    • AI Knowledge Bases vs. Traditional Support: Who Wins in 2025?
    • Why Your Finance Team Needs an AI Strategy, Now
    • How to Access NASA’s Climate Data — And How It’s Powering the Fight Against Climate Change Pt. 1
    • From Training to Drift Monitoring: End-to-End Fraud Detection in Python | by Aakash Chavan Ravindranath, Ph.D | Jul, 2025
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Artificial Intelligence»Agentic AI 101: Starting Your Journey Building AI Agents
    Artificial Intelligence

    Agentic AI 101: Starting Your Journey Building AI Agents

    Team_AIBS NewsBy Team_AIBS NewsMay 2, 2025No Comments13 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    The Synthetic Intelligence business is transferring quick. It’s spectacular and lots of occasions overwhelming.

    I’ve been finding out, studying, and constructing my foundations on this space of Knowledge Science as a result of I imagine that the way forward for Knowledge Science is strongly correlated with the event of Generative AI.

    It was simply the opposite day after I constructed my first Ai Agent, after which a few weeks after that, there have been a number of Python packages to select from, to not point out the no-code choices which can be doing very effectively, like n8n.

    From “mere” fashions that might simply chat with us to a tsunami of AI Brokers which can be all over the place, looking out the Web, dealing with information, and making complete Data Science initiatives (from EDA to modeling and analysis), all of that occurred in simply a few years.

    What?

    Seeing all of that, my thought was: “I have to get on board as quickly as potential”. In any case, it’s higher to surf the wave than be swallowed by it.

    For that purpose, I made a decision to start out this sequence of posts the place I plan to go from the basics to construct our first AI Agent, till extra advanced ideas.

    Sufficient discuss, let’s dive in.

    The Fundamentals of AI Brokers

    An AI Agent is created after we give the Llm the ability to work together with instruments and carry out helpful actions for us. So, as an alternative of being only a chatbot, now it may well schedule appointments, deal with our calendar, search the web, write social media posts, and the listing goes on…

    AI Brokers can do helpful issues, not simply chat.

    However how can we give that energy to an LLM?

    The easy reply is to make use of an API to work together with the LLM. There are a number of Python packages for that these days. Should you comply with my weblog, you will note that I’ve already tried a few packages to construct brokers: Langchain, Agno (former PhiData), and CrewAI, for example. For this sequence, I’ll keep on with Agno [1].

    First, arrange a digital surroundings utilizing uv, Anaconda, or the surroundings handler of your choice. Subsequent, set up the packages.

    # Agno AI
    pip set up agno
    
    # module to work together with Gemini
    pip set up google-generativeai
    
    # Set up these different packages that might be wanted all through the tutorial
     pip set up agno groq lancedb sentence-transformers tantivy youtube-transcript-api

    Fast observe earlier than we proceed. Don’t neglect to get a Google Gemini API Key [2].

    Making a easy agent could be very easy. All of the packages are very related. They’ve a category Agent or one thing related that enables us to pick a mannequin and begin interacting with the LLM of our selection. Listed below are the primary elements of this class:

    • mannequin: the reference to the LLM. Right here we’ll select between OpenAI, Gemini, Llama, Deepseek and so forth.
    • description: This argument lets us describe the habits of the agent. That is added to the system_message, which is an analogous argument.
    • directions: I like to think about an agent like an worker or an assistant that we’re managing. As a way to have a activity performed, we should present the directions of what must be performed. Right here is the place you are able to do that.
    • expected_output: Right here we may give directions in regards to the anticipated output.
    • instruments: That is what makes the LLM an Agent, enabling it to work together with the actual world utilizing these instruments.

    Now, let’s create a easy agent that has no instruments, however will serve to construct our instinct across the construction of the code.

    # Imports
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    import os
    
    # Create agent
    agent = Agent(
        mannequin= Gemini(id="gemini-1.5-flash",
                      api_key = os.environ.get("GEMINI_API_KEY")),
        description= "An assistant agent",
        directions= ["Be sucint. Answer in a maximum of 2 sentences."],
        markdown= True
        )
    
    # Run agent
    response = agent.run("What is the climate like in NYC in Could?")
    
    # Print response
    print(response.content material)
    ########### OUTPUT ###############
    Anticipate delicate temperatures in NYC throughout Could, sometimes starting from the low 50s 
    to the mid-70s Fahrenheit.  
    There's an opportunity of rain, so packing layers and an umbrella is advisable.

    That’s nice. We’re utilizing the Gemini 1.5 mannequin. Discover the way it responds based mostly on the information it was skilled on. If we ask it to inform us the climate in the present day, we’ll see a response saying it may well’t entry the web.

    Let’s discover the directions and expected_output arguments. We now desire a desk with the month, season and common temperature for NYC.

    # Imports
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    import os
    
    # Create agent
    agent = Agent(
        mannequin= Gemini(id="gemini-1.5-flash",
                      api_key = os.environ.get("GEMINI_API_KEY")),
        description= "An assistant agent",
        directions= ["Be sucint. Return a markdown table"],
        expected_output= "A desk with month, season and common temperature",	
        markdown= True
        )
    
    # Run agent
    response = agent.run("What is the climate like in NYC for every month of the 12 months?")
    
    # Print response
    print(response.content material)
    

    And there’s the consequence.

    Month Season Common Temperature (°F)
    January Winter 32
    February Winter 35
    March Spring 44
    April Spring 54
    Could Spring 63
    June Summer season 72
    July Summer season 77
    August Summer season 76
    September Autumn 70
    October Autumn 58
    November Autumn 48
    December Winter 37

    Instruments

    The earlier responses are good. However we naturally don’t need to use highly effective fashions resembling LLMs to play with a chatbot or inform us outdated information, proper?

    We would like them to be a bridge to automation, productiveness, and data. So, the Instruments will add capabilities to our AI Brokers, constructing, subsequently, the bridge with the actual world. Frequent examples of instruments for brokers are: looking out the net, operating SQL, sending an e-mail or calling APIs.

    However greater than that, we will create customized capabilities to our brokers by utilizing any Python perform as a device.

    Instruments are features that an Agent can run to realize duties.

    By way of code, including a device to the Agent is only a matter of utilizing the argument instruments within the Agent class.

    Think about a solopreneur (one-person firm) within the wholesome residing enterprise who needs to automate their content material technology. This particular person posts tips on wholesome habits on daily basis. I do know for a undeniable fact that content material technology isn’t as easy because it appears to be like like. It calls for creativity, analysis, and copywriting expertise. So, if this could possibly be automated, or not less than a part of it, that’s time saved.

    So we write this code to create a quite simple agent that may generate a easy Instagram submit and put it aside to a markdown file for our assessment. We lowered the method from pondering > researching > writing > reviewing > posting to reviewing > posting.

    # Imports
    import os
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    from agno.instruments.file import FileTools
    
    # Create agent
    agent = Agent(
        mannequin= Gemini(id="gemini-1.5-flash",
                      api_key = os.environ.get("GEMINI_API_KEY")),
                      description= "You're a social media marketer specialised in creating participating content material.",
                      instruments=[FileTools(
                          read_files=True, 
                          save_files=True
                          )],
                      show_tool_calls=True)
    
    
    # Writing and saving a file
    agent.print_response("""Write a brief submit for instagram with suggestions and tips
                            that positions me as an authority in wholesome consuming 
                            and put it aside to a file named 'submit.txt'.""",
                         markdown=True)

    Consequently, now we have the next.

    Unlock Your Finest Self By way of Wholesome Consuming:
    
    1. Prioritize complete meals: Load up on fruits, greens, lean proteins, and complete
     grains.  They're filled with vitamins and hold you feeling full and energized.
    2. Conscious consuming:  Take note of your physique's starvation and fullness cues. 
    Keep away from distractions whereas consuming.
    3. Hydrate, hydrate, hydrate: Water is essential for digestion, power ranges, 
    and general well being.
    4. Do not deprive your self:  Permit for infrequent treats.  
    Deprivation can result in overeating later.  Take pleasure in every little thing moderately!
    5. Plan forward:  Prep your meals or snacks prematurely to keep away from unhealthy 
    impulse choices.
    
    #healthyeating #healthylifestyle #vitamin #foodie 
    #wellbeing #healthytips #eatclean #weightloss #healthyrecipes 
    #nutritiontips #instahealth #healthyfood #mindfuleating #wellnessjourney 
    #healthcoach

    Actually, we may make it rather more fancy by making a crew with different brokers to go looking a listing of internet sites for content material, a content material checker and reviewer, and one other one to generate a picture for the submit. However I imagine you bought the final thought of easy methods to add a device to an Agent.

    One other kind of device we will add is the perform device. We will use a Python perform to function a device for the LLM. Simply don’t neglect so as to add the sort hints like video_id:str, so the mannequin is aware of what to make use of because the perform’s enter. In any other case, you would possibly see an error.

    Let’s see briefly how that works.

    We now need our Agent to have the ability to get a given YouTube video and summarize it. To carry out such a activity, we merely create a perform that downloads the transcript of the video from YT and passes it to the mannequin to summarize.

    # Imports
    import os
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    from youtube_transcript_api import YouTubeTranscriptApi
    
    # Get YT transcript
    def get_yt_transcript(video_id:str) -> str:
          
        """
        Use this perform to get the transcript from a YouTube video utilizing the video id.
    
        Parameters
        ----------
        video_id : str
            The id of the YouTube video.
        Returns
        -------
        str
            The transcript of the video.
        """
    
        # Instantiate
        ytt_api = YouTubeTranscriptApi()
        # Fetch
        yt = ytt_api.fetch(video_id)
        # Return
        return ''.be part of([line.text for line in yt])
    
    
    # Create agent
    agent = Agent(
        mannequin= Gemini(id="gemini-1.5-flash",
                      api_key = os.environ.get("GEMINI_API_KEY")),
                      description= "You might be an assistant that summarizes YouTube movies.",
                      instruments=[get_yt_transcript],
                      expected_output= "A abstract of the video with the 5 details and a pair of questions for me to check my understanding.",
                      markdown=True,
                      show_tool_calls=True)
    
    
    # Run agent
    agent.print_response("""Summarize the textual content of the video with the id 'hrZSfMly_Ck' """,
                         markdown=True)

    After which you will have a consequence.

    Results of the summarization requested. Picture by the writer.

    Brokers with Reasoning

    One other cool possibility from the Agno bundle is permitting us to simply create brokers that may analyze the scenario earlier than answering a query. That’s the reasoning device.

    We’ll create a reasoning agent with Alibaba’s Qwen-qwq-32b mannequin. Discover that the one distinction right here, apart from the mannequin, is that we’re including the device ReasoningTools().

    The adding_instructions=True means offering detailed directions to the agent, which boosts the reliability and accuracy of its device utilization, whereas setting this to False forces the agent to rely by itself reasoning, which might be extra vulnerable to errors.

    # Imports
    import os
    from agno.agent import Agent
    from agno.fashions.groq import Groq
    from agno.instruments.reasoning import ReasoningTools
    
    
    # Create agent with reasoning
    agent = Agent(
        mannequin= Groq(id="qwen-qwq-32b",
                      api_key = os.environ.get("GROQ_API_KEY")),
                      description= "You might be an skilled math instructor.",
                      instruments=[ReasoningTools(add_instructions=True)],
                      show_tool_calls=True)
    
    
    # Writing and saving a file
    agent.print_response("""Clarify the idea of sin and cosine in easy phrases.""",
                         stream=True,
                         show_full_reasoning=True,
                         markdown=True)
    

    Follows the output.

    Output of the reasoning mannequin. Picture by the writer.

    Agent with Information

    This device is the best method for me to create a Retrieval Augmented Era (RAG). With this characteristic, you possibly can level the agent to an internet site or a listing of internet sites, and it’ll add the content material to a vector database. Then, it turns into searchable. As soon as requested, the agent can use the content material as a part of the reply.

    On this easy instance, I added one web page of my web site and requested the agent what books are listed there.

    # Imports
    import os
    from agno.agent import Agent
    from agno.fashions.google import Gemini
    from agno.data.url import UrlKnowledge
    from agno.vectordb.lancedb import LanceDb, SearchType
    from agno.embedder.sentence_transformer import SentenceTransformerEmbedder
    
    # Load webpage to the data base
    agent_knowledge = UrlKnowledge(
        urls=["https://gustavorsantos.me/?page_id=47"],
        vector_db=LanceDb(
            uri="tmp/lancedb",
            table_name="initiatives",
            search_type=SearchType.hybrid,
            # Use Sentence Transformer for embeddings
            embedder=SentenceTransformerEmbedder(),
        ),
    )
    
    # Create agent
    agent = Agent(
        mannequin=Gemini(id="gemini-2.0-flash", api_key=os.environ.get("GEMINI_API_KEY")),
        directions=[
            "Use tables to display data.",
            "Search your knowledge before answering the question.",
            "Only inlcude the content from the agent_knowledge base table 'projects'",
            "Only include the output in your response. No other text.",
        ],
        data=agent_knowledge,
        add_datetime_to_instructions=True,
        markdown=True,
    )
    
    if __name__ == "__main__":
        # Load the data base, you possibly can remark out after first run
        # Set recreate to True to recreate the data base if wanted
        agent.data.load(recreate=False)
        agent.print_response(
            "What are the 2 books listed within the 'agent_knowledge'",
            stream=True,
            show_full_reasoning=True,
            stream_intermediate_steps=True,
        )
    Response from the agent after looking out the data base. Picture by the writer.

    Agent with Reminiscence

    The final kind we’ll go over on this submit is the agent with reminiscence.

    Any such agent can retailer and retrieve details about customers from earlier interactions, permitting it to be taught consumer preferences and personalize its responses.

    Let’s see this instance the place I’ll inform a few issues to the agent and ask for suggestions based mostly on that interplay.

    # imports
    import os
    from agno.agent import Agent
    from agno.reminiscence.v2.db.sqlite import SqliteMemoryDb
    from agno.reminiscence.v2.reminiscence import Reminiscence
    from agno.fashions.google import Gemini
    from wealthy.fairly import pprint
    
    # Consumer Title
    user_id = "data_scientist"
    
    # Making a reminiscence database
    reminiscence = Reminiscence(
        db=SqliteMemoryDb(table_name="reminiscence", 
                          db_file="tmp/reminiscence.db"),
        mannequin=Gemini(id="gemini-2.0-flash", 
                     api_key=os.environ.get("GEMINI_API_KEY"))
                     )
    
    # Clear the reminiscence earlier than begin
    reminiscence.clear()
    
    # Create the agent
    agent = Agent(
        mannequin=Gemini(id="gemini-2.0-flash", api_key=os.environ.get("GEMINI_API_KEY")),
        user_id=user_id,
        reminiscence=reminiscence,
        # Allow the Agent to dynamically create and handle consumer reminiscences
        enable_agentic_memory=True,
        add_datetime_to_instructions=True,
        markdown=True,
    )
    
    
    # Run the code
    if __name__ == "__main__":
        agent.print_response("My title is Gustavo and I'm a Knowledge Scientist studying about AI Brokers.")
        reminiscences = reminiscence.get_user_memories(user_id=user_id)
        print(f"Recollections about {user_id}:")
        pprint(reminiscences)
        agent.print_response("What subject ought to I research about?")
        agent.print_response("I write articles for In direction of Knowledge Science.")
        print(f"Recollections about {user_id}:")
        pprint(reminiscences)
        agent.print_response("The place ought to I submit my subsequent article?")
    Instance of AI Agent with reminiscence. Picture by the writer.

    And right here we finish this primary submit about AI Brokers.

    Earlier than You Go

    There’s lots of content material on this submit. We climbed step one on this ladder of studying about AI brokers. I do know, it’s overwhelming. There may be a lot info on the market that it turns into more durable and more durable to know the place to start out and what to check.

    My suggestion is to take the identical highway I’m taking. One step at a time, selecting simply a few packages like Agno, CrewAI, and going deep on these, studying easy methods to create extra advanced brokers every time.

    On this submit, we began from scratch, studying easy methods to merely work together with an LLM to creating brokers with reminiscence, and even making a easy RAG for an AI Agent.

    Clearly, there may be rather more you are able to do simply with a single agent. Take a look at the Reference [4].

    With these easy expertise, ensure that you might be forward of lots of people, and there’s a lot you are able to do already. Simply use the creativity and (why not?) ask for the assistance of an LLM to construct one thing cool!

    Within the subsequent submit, we’ll be taught extra about brokers and analysis. Keep tuned!

    GitHub Repository

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

    Contact and On-line Presence

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

    https://gustavorsantos.me

    References

    [1] https://docs.agno.com/introduction

    [2] https://ai.google.dev/gemini-api/docs

    [3] https://pypi.org/project/youtube-transcript-api/

    [4] https://github.com/agno-agi/agno/tree/main/cookbook

    [5] https://docs.agno.com/introduction/agents#agent-with-knowledge



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHeart Disease Prediction using Machine Learning — A Step-by-Step Guide with Python | by Navya Jain | May, 2025
    Next Article Sam Altman’s Startup Brings Eyeball Scanning Orbs to the US
    Team_AIBS News
    • Website

    Related Posts

    Artificial Intelligence

    An Introduction to Remote Model Context Protocol Servers

    July 2, 2025
    Artificial Intelligence

    How to Access NASA’s Climate Data — And How It’s Powering the Fight Against Climate Change Pt. 1

    July 1, 2025
    Artificial Intelligence

    STOP Building Useless ML Projects – What Actually Works

    July 1, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Qantas data breach to impact 6 million airline customers

    July 2, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    Journey from LLM to LCM: How New AI Thinks in Concepts, Not Just Tokens | by Kashyaparun | Jan, 2025

    January 5, 2025

    Which Macy’s Stores Are Closing? New List Announced

    January 11, 2025

    Modelo de Classificação de Flores com Machine Learning | by Danilo Fogaça | Jun, 2025

    June 14, 2025
    Our Picks

    Qantas data breach to impact 6 million airline customers

    July 2, 2025

    He Went From $471K in Debt to Teaching Others How to Succeed

    July 2, 2025

    An Introduction to Remote Model Context Protocol Servers

    July 2, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

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