Visionary_Ai_2 / bni_agent.py
GiantAnalytics's picture
Create bni_agent.py
2b9ab72 verified
raw
history blame
1.98 kB
import os
from phi.agent import Agent
from phi.model.openai import OpenAIChat
# Load environment variables (API keys, etc.)
from dotenv import load_dotenv
load_dotenv()
#####################################################################################
# BNI Membership Agent #
#####################################################################################
bni_agent = Agent(
name="BNI Membership Agent",
model=OpenAIChat(id="gpt-4o"),
description="Provides insights on how BNI membership can help a business grow.",
show_tool_calls=True,
markdown=True,
)
def get_bni_benefits(company_data: str) -> str:
"""
Generates a structured overview of how BNI membership can help the user's company.
Args:
company_data (str): User's company description, industry, and business details.
Returns:
str: Tailored insights on how BNI can benefit the company.
"""
query = f"""
Given the following company details:
- **Business Overview:** {company_data}
Provide a **structured explanation** of how **BNI membership** can **benefit this company**:
1. **Referral Generation** – How can BNI help this business generate quality referrals?
2. **Networking Opportunities** – How will industry-specific networking be useful?
3. **Professional Development** – What skills & business exposure can the company gain?
4. **Supportive Community** – How does BNI help businesses grow through peer support?
5. **Access to Resources** – What exclusive resources (mentorship, training, etc.) are beneficial?
6. **Revenue Growth Potential** – How can this business scale by leveraging BNI connections?
Make the response **personalized** to the company’s industry and nature of operations.
"""
response = bni_agent.run(query)
return response.content # Returns structured insights on BNI membership benefits