In this second article, we will dive deeper with another hands-on tutorial. Here, we will build Agents that can automate tasks and interact with external tools and APIs.
In the first article, we built a simple YouTube summarizer agent, where we were using just one tool (YouTubeTools). In this second article, we will take things a step further by building a Study Planner Agent that creates personalized study schedules based on user input and deadlines. This agent automatically creates Tasks in Jira and sends calendar invites using Cal.com for easy tracking and execution. For the purpose of the tutorial, we will use Google Colab notebook to write and execute the code and Phidata Agentic AI Platform to power the Agent.
By the end, you will see how AI Agents can move from being helpful assistants to becoming fully automated systems capable of streamlining complex, real-world workflows.
Note: This is the second article in a two-part series on building AI Agents from the ground up. In the first article, we explored the value of AI Agents, introduced popular Agentic AI platforms, and walked through a hands-on tutorial for building a simple AI Agent using Phidata. You can read the first part of the article here.
Model: Within Phidata, we will leverage the Groq model hosting platform. This is an inference service that runs LLMs on a dedicated GPU infrastructure (note that it is different from Grok, which is an LLM from xAI). Since LLMs are resource-intensive, using Groq helps to offload computation from the local hardware or Colab-provided hardware. This ensures faster and more efficient execution. Groq has access to multiple models from different LLM providers. (see full list here)
Tools: To create a study planner agent, we need the agent to orchestrate the following steps: (1) create a study plan using LLM, (2) create tasks in Jira, and (3) send calendar invites.
The selected LLM generates a personalized study plan based on user inputs like goals, deadlines and availability. It draws from the knowledge it was trained on to structure a plan that meets the user’s needs.
After the study plan was created, the agent automatically triggers the JIRA create issue API with appropriate inputs. While we do not provide explicit instructions for using the API, the LLM is capable of interacting with the JiraTools module, which is provided in its environment.
Depending on the time that is mentioned in the prompt, Agent will create calendar invites using the Cal.com API. Again, there is no need to specify the exact API call. The tool integration, with the help of Phidata, handles the interaction seamlessly.
The following few lines of code create an AI Agent capable of creating tasks and calendar reminders with detailed plans on a selected topic. All this is done in a matter of a few seconds.
from phi.agent import Agent
from phi.model.openai import OpenAIChat
from phi.tools.jira_tools import JiraTools
from phi.model.groq import Groq
from phi.tools.calcom import CalCom
from datetime import datetime
study_partner = Agent(
name="Study Planner Agent",
model=OpenAIChat(id="gpt-4o"),
# model=Groq(id="llama-3.3-70b-versatile"), ## Toggle with different LLM model
tools=[JiraTools(), CalCom()],
markdown=True,
description="You are a study partner who assists users in finding resources, answering questions, and providing explanations on various topics.",
instructions=[
"Search for relevant information on the given topic and verify information from multiple reliable sources.",
"Break down complex topics into digestible chunks and provide step-by-step explanations with practical examples.",
"Share curated learning resources including documentation, tutorials, articles, research papers, and community discussions.",
"Recommend high-quality YouTube videos and online courses that match the user's learning style and proficiency level.",
"Suggest hands-on projects and exercises to reinforce learning, ranging from beginner to advanced difficulty.",
"Create personalized study plans with clear milestones, deadlines, and progress tracking.",
"Provide tips for effective learning techniques, time management, and maintaining motivation.",
"Recommend relevant communities, forums, and study groups for peer learning and networking.",
f"You can also help in scheduling meetings so it does not slip the calendars. Today is {datetime.now()}."
],
)
project_id = "TES" ## to be updated if a different project id is selected in section 2.2
email_id = userdata.get('EMAIL_ID') ## Sends meeting invite from cal.com to this email
study_partner.print_response(
f"""I want to learn about machine learning in depth. I know the basics, have 2 weeks to learn, and can spend 2 hours daily.
Please create up to 1 task per day in Jira in project {project_id} with summary and description on how to gradually improve my machine learning knowledge.
Please create bookings with {email_id} each day for the next two weeks at 9pm pst with summary as the subject line and description.
Please create the tasks and make the booking directly without asking for any confirmation""",
stream=True)
Following is the output generated by the Study Planner agent (above code). As mentioned in the prompt above, we are requesting to create a study plan to improve machine learning knowledge.
Note that the response may vary for each run because of the probabilistic nature of LLMs.
Here are the complete, step-by-step instructions to build your own Study Planner Agent that creates personalized study schedules.
In order to run the Agent, since we use the Groq model hosting platform, we need an account with Groq. Follow the steps below to sign up / log in to Groq and get an API key.
In this second article, we expanded from a simple YouTube Summarizer Agent (part 1) to a more advanced study planner agent. The new AI agent not only generates plans but automates real-world workflows. We demonstrated how AI Agents can orchestrate multiple steps seamlessly from reasoning about user goals to executing tasks across multiple platforms.
With these foundations, you are now equipped to begin experimenting with your own AI Agents. Whether you are building Agents to plan, analyze, or execute, frameworks like Phidata make it possible to transform ideas into working systems just with a few lines of code.
Co-Author for the article: Abhishek Agrawal