A real world agent
See how it works in real
This tutorial walks you through creating a Daily Update Agent using AXAR AI. The agent retrieves activities from JIRA and Bitbucket, summarizes them, and presents a concise daily update. This example demonstrates AXAR’s features like dynamic prompts, tools, and dependency injection.
The Problem
Keeping track of daily team activities across tools like JIRA and Bitbucket can be time-consuming. Let’s automate this by building an agent that:
Fetches team members.
Collects their JIRA and Bitbucket activities.
Summarizes the activities in a readable format.
The Solution
We'll use AXAR AI to create a Daily Update Agent. Here’s the full code:
For brevity, the implementation of BitbucketClient
and JiraClient
is not included here. We will publish them soon in our axar-examples repository.
💡 What just happened?
Let’s break this down step by step:
Define the agent
We created a class DailyUpdateAgent
that extends Agent
from AXAR. It specifies:
Model: The AI model using the
@model
decorator (openai:gpt-4o-mini
in this case).Prompt: A detailed system-level instruction using
@systemPrompt
.
The prompt defines:
What the agent should do.
The format of the output.
Dependency injection
The agent is initialized with two clients:
JiraClient
: Manages JIRA interactions.BitbucketClient
: Manages Bitbucket interactions.
This makes the agent modular and testable.
Add tools
Tools are decorated with @tool
, allowing the agent to interact with external world. We added three tools:
Get Workspace Members: Fetches the list of team members from JIRA.
Get Recent JIRA Activities: Retrieves activities from JIRA.
Get Recent Bitbucket Activities: Retrieves activities from Bitbucket.
Run the agent
In main()
, we:
Instantiate
JiraClient
andBitbucketClient
with their respective configurations.Create a
DailyUpdateAgent
using the clients.Call
agent.run()
to execute the prompt logic.
Output
The agent:
Fetches the list of members.
Retrieves their activities from JIRA and Bitbucket.
Summarizes these in Markdown format, with placeholders for team members with no activity.
Conclusion
This example demonstrated how to use AXAR AI to automate summarizing daily activities from across multiple external platforms. By leveraging tools and a clear system prompt, we created a modular, scalable agent that integrates with external APIs.
Now, extend this agent for additional workflows or integrate other platforms!
Last updated