DEV Community

Akshay Keerthi
Akshay Keerthi

Posted on

Building a Remote Team Management Assistant Lyzr SDK

Managing a remote team can be challenging, especially when it comes to maintaining communication, tracking progress, and fostering a strong team culture. That’s where the Remote Team Management Assistant app comes in. This AI-driven solution is designed to help you manage your remote team more effectively by offering strategic advice and practical tips tailored to your team’s size and primary tasks.

Image description

The app is built using the Lyzr SDK, which integrates advanced AI capabilities to understand and respond to user inputs accurately. The Lyzr SDK facilitates the creation of intelligent agents that can analyze complex information and provide tailored solutions.

Why use Lyzr SDK’s?

With Lyzr SDKs, crafting your own GenAI application is a breeze, requiring only a few lines of code to get up and running swiftly.

Checkout the Lyzr SDK’s

Lets get Started!

Create an app.py file

Imports and Setup: The app uses Streamlit for the web interface and Lyzr SDK for AI capabilities. The OpenAIModel class is used to configure the AI model.

import streamlit as st
from lyzr_automata.ai_models.openai import OpenAIModel
from lyzr_automata import Agent, Task
from lyzr_automata.pipelines.linear_sync_pipeline import LinearSyncPipeline
from PIL import Image
import os
Enter fullscreen mode Exit fullscreen mode

App Interface: Sets up the interface, including custom styling and input fields.

os.environ["OPENAI_API_KEY"] = st.secrets["apikey"]
st.markdown(
    """
    <style>
    .app-header { visibility: hidden; }
    .css-18e3th9 { padding-top: 0; padding-bottom: 0; }
    .css-1d391kg { padding-top: 1rem; padding-right: 1rem; padding-bottom: 1rem; padding-left: 1rem; }
    </style>
    """,
    unsafe_allow_html=True,
)
image = Image.open("./logo/lyzr-logo.png")
st.image(image, width=150)
st.title("Remote Team Management Assistant ")
st.markdown("Welcome to the Remote Team Management Assistant app! This app is here to help you manage your remote team more effectively by offering strategic advice and practical tips tailored to your team's size and primary tasks.")
input = st.text_input("Enter the Team size and the primary tasks or responsibilities of the team:", placeholder="Type here")
Enter fullscreen mode Exit fullscreen mode

AI Model Initialization: Configures the AI model with specific parameters.

open_ai_text_completion_model = OpenAIModel(
    api_key=st.secrets["apikey"],
    parameters={
        "model": "gpt-4-turbo-preview",
        "temperature": 0.2,
        "max_tokens": 1500,
    },
)
Enter fullscreen mode Exit fullscreen mode

Generation Function: Defines the agent’s role and generates advice based on user input.

def generation(input):
    generator_agent = Agent(
        role="Expert REMOTE TEAM MANAGEMENT ASSISTANT",
        prompt_persona="Your task is to DELIVER STRATEGIC ADVICE and PRACTICAL TIPS for managing remote teams effectively, tailored to the specific team size and tasks inputted by the user.")
    prompt = f"""
    You are an Expert REMOTE TEAM MANAGEMENT ASSISTANT. Your task is to DELIVER STRATEGIC ADVICE and PRACTICAL TIPS for managing remote teams effectively, tailored to the specific team size and tasks inputted by the user.
[Prompts here]
"""
    generator_agent_task = Task(
        name="Generate",
        model=open_ai_text_completion_model,
        agent=generator_agent,
        instructions=prompt,
        default_input=input,
        output_type=OutputType.TEXT,
        input_type=InputType.TEXT,
    ).execute()
    return generator_agent_task
Enter fullscreen mode Exit fullscreen mode

Button Trigger: Executes the generation function when the button is clicked.

if st.button("Assist!"):
    solution = generation(input)
    st.markdown(solution)
Enter fullscreen mode Exit fullscreen mode

The Remote Team Management Assistant app is a powerful tool for anyone managing a remote team. By leveraging the advanced AI capabilities of Lyzr SDK, the app provides tailored advice and practical tips to ensure your team operates smoothly and effectively.

App link: https://remoteteam-lyzr.streamlit.app/

Source Code: https://github.com/isakshay007/remote_team

The Remote Team Management Assistant is powered by the Lyzr Automata Agent, utilizing the capabilities of OpenAI’s GPT-4 Turbo. For any inquiries or issues, please contact Lyzr. You can learn more about Lyzr and their offerings through the following links:

Website: Lyzr.ai
Book a Demo: Book a Demo
Discord: Join our Discord community
Slack: Join our Slack channel

Top comments (0)