Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sdr kit docs #1031

Merged
merged 6 commits into from
Dec 18, 2024
Merged

feat: sdr kit docs #1031

merged 6 commits into from
Dec 18, 2024

Conversation

Prat011
Copy link
Collaborator

@Prat011 Prat011 commented Dec 17, 2024

🔍 Review Summary

Purpose

Enhance SDR Kit documentation and examples to provide detailed setup and improve user experience.

Changes

  • New Features:

    • Added comprehensive guides for:
      • AI Lead Generator
      • AI Outreach Agent
      • AI Market Research Agent
      • AI Scheduling Agent
    • Introduced a comprehensive list of tools for AI SDR development in the documentation.
  • Enhancements:

    • JavaScript Example:

      • Refactored Lead Outreach Agent to improve code structure.
      • Updated package dependencies.
    • Python Example:

      • Refined Lead Generator Agent to enhance code clarity.
      • Removed unused imports.

Impact

Improves user experience by providing detailed setup instructions and refining code examples for AI agents and SDR development. Streamlines AI tool integration into business processes with the addition of AI Market Research Agent and AI Scheduling Agent leveraging Composio's tooling ecosystem.

Original Description

No existing description found


Important

Enhance SDR Kit documentation with new guides and examples, refine code examples for AI agents, and update dependencies for improved functionality.

  • Documentation:
    • Added guides for AI Lead Generator, AI Outreach Agent, AI Market Research Agent, and AI Scheduling Agent in docs/sdrkit/.
    • Introduced a comprehensive list of tools for AI SDR development in tools.mdx.
  • Code Examples:
    • Refactored JavaScript example in demo.mjs for Lead Outreach Agent to improve structure and update dependencies.
    • Refined Python example in main.py for Lead Generator Agent to enhance clarity and remove unused imports.
  • Configuration:
    • Updated package.json for lead_outreach_agent to include new dependencies composio-core and dotenv.

This description was created by Ellipsis for 500df50. It will automatically update as commits are pushed.

Prat011 and others added 3 commits December 17, 2024 17:03

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link

vercel bot commented Dec 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:08am

@Prat011 Prat011 changed the title Feat/sdr kit docs feat: sdr kit docs Dec 17, 2024
Copy link

Walkthrough

This update significantly enhances the SDR Kit documentation and examples by introducing comprehensive guides for AI Lead Generator, AI Outreach Agent, AI Market Research Agent, and AI Scheduling Agent. These additions provide detailed setup and usage instructions, improving user experience. The update also refines existing code examples, particularly for the Lead Outreach Agent, by enhancing code structure and updating dependencies. Furthermore, a new AI Market Research Agent leverages Composio's tooling ecosystem, and an AI Scheduling Agent automates meeting scheduling via Google Calendar, streamlining AI tool integration into business processes.

Changes

File(s) Summary
docs/mint.json Updated with new entries for SDR Kit content and AI agents.
docs/sdrkit/ai-lead-generator.mdx, docs/sdrkit/ai-outreach-agent.mdx, docs/sdrkit/ai-market-research-agent.mdx, docs/sdrkit/ai-scheduling-agent.mdx Added new documentation for AI Lead Generator, AI Outreach Agent, AI Market Research Agent, and AI Scheduling Agent, detailing setup and usage.
docs/sdrkit/tools.mdx Introduced a comprehensive list of tools for AI SDR development, compatible with various frameworks.
js/examples/lead_outreach_agent/demo.mjs, js/examples/lead_outreach_agent/package.json, js/examples/lead_outreach_agent/pnpm-lock.yaml Refactored JavaScript example for Lead Outreach Agent, improving code structure and updating package dependencies.
python/examples/advanced_agents/lead_generator_agent/main.py Refined Python example for Lead Generator Agent, enhancing code clarity and removing unused imports.

🔗 Related PRs

  • feat: parallel upload of test report #920: The GitHub pull request enhances GitHub Actions for parallel uploads, improves logging practices by sanitizing API keys, and introduces structured logging methods.
  • Missing enum error message update #923: The error message in the EnumStringNotFound class was updated to suggest running composio apps update for recently created custom tools.
  • Fix/docs #921: This pull request enhances Composio's documentation for integrating with various frameworks and tools, providing detailed setup instructions and code examples for improved user guidance.
  • feat: add error message details #922: The update enhances CEG.handleError() by providing detailed error messages for unknown backend errors using axiosError data and suggests a default fix related to network issues.
Instructions

Emoji Descriptions:

  • ⚠️ Potential Issue - May require further investigation.
  • 🔒 Security Vulnerability - Fix to ensure system safety.
  • 💻 Code Improvement - Suggestions to enhance code quality.
  • 🔨 Refactor Suggestion - Recommendations for restructuring code.
  • ℹ️ Others - General comments and information.

Interact with the Bot:

  • Send a message or request using the format:
    @bot + *your message*
Example: @bot Can you suggest improvements for this code?
  • Help the Bot learn by providing feedback on its responses.
    @bot + *feedback*
Example: @bot Do not comment on `save_auth` function !

Execute a command using the format:

@bot + */command*

Example: @bot /updateCommit

Available Commands:

  • /updateCommit ✨: Apply the suggested changes and commit them (or Click on the Github Action button to apply the changes !)
  • /updateGuideline 🛠️: Modify an existing guideline.
  • /addGuideline ➕: Introduce a new guideline.

Tips for Using @bot Effectively:

  • Specific Queries: For the best results, be specific with your requests.
    🔍 Example: @bot summarize the changes in this PR.
  • Focused Discussions: Tag @bot directly on specific code lines or files for detailed feedback.
    📑 Example: @bot review this line of code.
  • Managing Reviews: Use review comments for targeted discussions on code snippets, and PR comments for broader queries about the entire PR.
    💬 Example: @bot comment on the entire PR.

Need More Help?

📚 Visit our documentation for detailed guides on using Entelligence.AI.
🌐 Join our community to connect with others, request features, and share feedback.
🔔 Follow us for updates on new features and improvements.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 9c8c981 in 1 minute and 30 seconds

More details
  • Looked at 3622 lines of code in 10 files
  • Skipped 1 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. js/examples/lead_outreach_agent/demo.mjs:31
  • Draft comment:
    Consider managing prompt strings in a configuration file or environment variable for easier updates and management.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The JavaScript code in demo.mjs uses a hardcoded prompt string. It would be better to manage such strings in a configuration file or environment variable for easier updates and management.
2. docs/sdrkit/ai-outreach-agent.mdx:96
  • Draft comment:
    Ensure the tools initialized in the final code block match those in the setup steps for consistency.
  • Reason this comment was not posted:
    Comment did not seem useful.
3. docs/sdrkit/ai-scheduling-agent.mdx:52
  • Draft comment:
    The setup for the scheduling agent is incorrect. Ensure the tools and prefix messages are relevant to scheduling tasks, not lead generation.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_IS0p8zcDFHlww7Es


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

from composio_llamaindex import ComposioToolSet, App, Action
from llama_index.core.agent import FunctionCallingAgentWorker
from llama_index.core.llms import ChatMessage
from llama_index.llms.openai import OpenAI
from dotenv import load_dotenv

load_dotenv()
toolset = ComposioToolSet(api_key="")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid hardcoding API keys. Use environment variables to securely manage sensitive information.

Copy link

github-actions bot commented Dec 17, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-12390665295/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-12390665295/html-report/report.html

Comment on lines 5 to +19
from dotenv import load_dotenv

load_dotenv()
toolset = ComposioToolSet(api_key="")
tools = toolset.get_tools(apps=[App.PEOPLEDATALABS, App.GOOGLESHEETS])

# Initialize Composio ToolSet and OpenAI model
composio_toolset = ComposioToolSet()
tools = composio_toolset.get_tools(apps=[App.EXA, App.BROWSERBASE_TOOL, App.GOOGLESHEETS])
llm = OpenAI(model="gpt-4o")

spreadsheetid = '14T4e0j1XsWjriQYeFMgkM2ihyvLAplPqB9q8hytytcw'
# Set up prefix messages for the agent
prefix_messages = [
ChatMessage(
role="system",
content=(
"You are a lead research agent. Depending on the user specification, look for leads."
"Use the browser tools available to you. Find a minimum of 10 relevant people according to the description."
"Include the following elements in the sheet:"
"""
Basic Contact Information:
Full Name
Email Address
Phone Number
Company Name (if applicable)
Job Title (if applicable)
Lead Qualification Information:
Industry
Company Size
Pain Points or Needs related to your product/service
Budget Range (if relevant)
Purchase Timeline
Preferred Contact Method
Lead Source Tracking:
Marketing Campaign Name
Landing Page URL
Referral Source (if applicable)
Event/Webinar Attendee (if applicable)
"""
"Once the leads have been found, create a google sheet and add in these details."
"If the user gives a google sheet as input then don't create a sheet and add the data in that one."
f"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Bug Fix:

Reintroduce Essential Initializations for Lead Generation
The recent code changes have removed the initialization of the ComposioToolSet and the OpenAI model, which are crucial for the lead generation functionality. Without these initializations, the lead generation process will fail, rendering the tool unusable.

  • Ensure that the ComposioToolSet is initialized with the correct API key.
  • Reintroduce the initialization of the OpenAI model with the appropriate parameters.
  • Verify that the correct tools and models are being used in the lead generation process to maintain functionality.

This change is critical to ensure the tool operates as intended. 🛠️

🔧 Suggested Code Diff:

+toolset = ComposioToolSet(api_key="your_api_key_here")
+tools = toolset.get_tools(apps=[App.PEOPLEDATALABS, App.GOOGLESHEETS])

+llm = OpenAI(model="gpt-4o")
📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
from dotenv import load_dotenv
load_dotenv()
toolset = ComposioToolSet(api_key="")
tools = toolset.get_tools(apps=[App.PEOPLEDATALABS, App.GOOGLESHEETS])
# Initialize Composio ToolSet and OpenAI model
composio_toolset = ComposioToolSet()
tools = composio_toolset.get_tools(apps=[App.EXA, App.BROWSERBASE_TOOL, App.GOOGLESHEETS])
llm = OpenAI(model="gpt-4o")
spreadsheetid = '14T4e0j1XsWjriQYeFMgkM2ihyvLAplPqB9q8hytytcw'
# Set up prefix messages for the agent
prefix_messages = [
ChatMessage(
role="system",
content=(
"You are a lead research agent. Depending on the user specification, look for leads."
"Use the browser tools available to you. Find a minimum of 10 relevant people according to the description."
"Include the following elements in the sheet:"
"""
Basic Contact Information:
Full Name
Email Address
Phone Number
Company Name (if applicable)
Job Title (if applicable)
Lead Qualification Information:
Industry
Company Size
Pain Points or Needs related to your product/service
Budget Range (if relevant)
Purchase Timeline
Preferred Contact Method
Lead Source Tracking:
Marketing Campaign Name
Landing Page URL
Referral Source (if applicable)
Event/Webinar Attendee (if applicable)
"""
"Once the leads have been found, create a google sheet and add in these details."
"If the user gives a google sheet as input then don't create a sheet and add the data in that one."
f"""
from dotenv import load_dotenv
load_dotenv()
# Initialize Composio ToolSet with API key
api_key = "your_api_key_here" # Ensure this is securely managed
try:
toolset = ComposioToolSet(api_key=api_key)
tools = toolset.get_tools(apps=[App.PEOPLEDATALABS, App.GOOGLESHEETS])
except Exception as e:
raise RuntimeError("Failed to initialize Composio ToolSet") from e
# Initialize OpenAI model
try:
llm = OpenAI(model="gpt-4o")
except Exception as e:
raise RuntimeError("Failed to initialize OpenAI model") from e
spreadsheetid = '14T4e0j1XsWjriQYeFMgkM2ihyvLAplPqB9q8hytytcw' # Ensure this is securely managed
# Set up prefix messages for the agent
prefix_messages = [
ChatMessage(
role="system",
content=(
"You are a lead research agent. Depending on the user specification, look for leads. "
"Use the browser tools available to you. Find a minimum of 10 relevant people according to the description. "
"Include the following elements in the sheet: "
"Basic Contact Information: Full Name, Email Address, Phone Number, Company Name (if applicable), Job Title (if applicable). "
"Lead Qualification Information: Industry, Company Size, Pain Points or Needs related to your product/service, Budget Range (if relevant), Purchase Timeline, Preferred Contact Method. "
"Lead Source Tracking: Marketing Campaign Name, Landing Page URL, Referral Source (if applicable), Event/Webinar Attendee (if applicable). "
"Once the leads have been found, create a google sheet and add in these details. "
"If the user gives a google sheet as input then don't create a sheet and add the data in that one."
)
)
]

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on bb3e468 in 36 seconds

More details
  • Looked at 493 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/sdrkit/tools.mdx:102
  • Draft comment:
    Consider adding a placeholder or comment to indicate that the API key should be replaced with the user's actual key to avoid runtime errors. This applies to other instances in the file as well.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The API key is left as an empty string in multiple places, which could lead to runtime errors if not properly set by the user. It's important to either provide a placeholder or a comment indicating that the user should replace it with their actual API key.

Workflow ID: wflow_WvicXACMwsm7PB2P


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Incremental review on 79896ca in 53 seconds

More details
  • Looked at 354 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. docs/sdrkit/ai-scheduling-agent.mdx:52
  • Draft comment:
    composio_toolset is used without being initialized. It should be initialized similarly to toolset.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. docs/sdrkit/ai-scheduling-agent.mdx:63
  • Draft comment:
    Using datetime.now().astimezone().tzinfo might not always give the correct timezone. Consider using a more reliable method to ensure the correct timezone is used.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The Python example uses datetime.now().astimezone().tzinfo to get the timezone, which might not be accurate if the system timezone is not set correctly. Consider using a more reliable method to get the timezone.

Workflow ID: wflow_IkF8gGYAJh4Vv05q


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

<Step title='Final Code'>
```javascript final code
import { openai } from "@ai-sdk/openai";
import { VercelAIToolSet, Composio, OpenAIToolSet } from "composio-core";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composio and OpenAIToolSet are imported but not used. Consider removing these imports to clean up the code.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 500df50 in 26 seconds

More details
  • Looked at 212 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/sdrkit/ai-lead-generator.mdx:204
  • Draft comment:
    Ensure that the tools parameter is correctly passed and utilized in the generateText function call.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The JavaScript example in the AI Lead Generator documentation has a mistake in the final code section. The generateText function call should ensure that the tools parameter is correctly passed and utilized.

Workflow ID: wflow_rF2aH8cxbHPO6YER


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Comment on lines 5 to +19
from dotenv import load_dotenv

load_dotenv()
toolset = ComposioToolSet(api_key="")
tools = toolset.get_tools(apps=[App.PEOPLEDATALABS, App.GOOGLESHEETS])

# Initialize Composio ToolSet and OpenAI model
composio_toolset = ComposioToolSet()
tools = composio_toolset.get_tools(apps=[App.EXA, App.BROWSERBASE_TOOL, App.GOOGLESHEETS])
llm = OpenAI(model="gpt-4o")

spreadsheetid = '14T4e0j1XsWjriQYeFMgkM2ihyvLAplPqB9q8hytytcw'
# Set up prefix messages for the agent
prefix_messages = [
ChatMessage(
role="system",
content=(
"You are a lead research agent. Depending on the user specification, look for leads."
"Use the browser tools available to you. Find a minimum of 10 relevant people according to the description."
"Include the following elements in the sheet:"
"""
Basic Contact Information:
Full Name
Email Address
Phone Number
Company Name (if applicable)
Job Title (if applicable)
Lead Qualification Information:
Industry
Company Size
Pain Points or Needs related to your product/service
Budget Range (if relevant)
Purchase Timeline
Preferred Contact Method
Lead Source Tracking:
Marketing Campaign Name
Landing Page URL
Referral Source (if applicable)
Event/Webinar Attendee (if applicable)
"""
"Once the leads have been found, create a google sheet and add in these details."
"If the user gives a google sheet as input then don't create a sheet and add the data in that one."
f"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential Issue:

Ensure Compatibility with New Tools
The recent code changes involve replacing 'Peopledatalabs' with 'Tavily' and 'Googlesheets' with 'Googledocs'. This substitution could potentially disrupt the lead generation process due to compatibility issues or altered functionalities.

Actionable Steps:

  • Verify Functionality: Ensure that 'Tavily' and 'Googledocs' offer equivalent or enhanced capabilities compared to the original tools. This includes checking API compatibility, data handling, and any specific features used in the lead generation process.
  • Testing: Conduct thorough testing of the lead generation workflow to confirm that it operates as expected with the new tools. This should include edge cases and typical use scenarios.
  • Documentation Update: Revise any related documentation or user guides to reflect the changes in tool usage, ensuring users are aware of the new functionalities and any differences in operation.

By following these steps, you can mitigate the risk of introducing errors or unexpected behavior in the application. 🛠️


@Karthikeya-Meesala Karthikeya-Meesala merged commit 8a173b5 into master Dec 18, 2024
22 of 24 checks passed
@Karthikeya-Meesala Karthikeya-Meesala deleted the feat/SDR-kit-docs branch December 18, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants