Composio Praison Labs Integration
Composio
allows AI agents and LLMs to easily integrate with 100+ tools
(GitHub, Gmail, CodeExecution and more) to perform actions and
subscribe to triggers. This example will show how to integrate
Composio with Praison Labs agents to let them seamlessly interact
with external apps.
pip install composio-praisonai
To add Composio’s Serpapi tool -
from praisonai import Praison Labs
from composio_praisonai import Action, ComposioToolSet
# Initialize Composio's Toolset
composio_toolset = ComposioToolSet()
# Get the SERPAPI tool
tools = composio_toolset.get_tools(actions=[Action.SERPAPI_SEARCH])
# Get the tool string for agent_yaml
tool_section_str = composio_toolset.get_tools_section(tools)
# Example configuration
agent_yaml = """
framework: "crewai"
topic: "Research"
roles:
researcher:
role: "Researcher"
goal: "Search the internet for the information requested"
backstory: "A researcher tasked with finding and analyzing information on various topics using available tools."
tasks:
research_task:
description: "Research about open source LLMs vs closed source LLMs."
expected_output: "A full analysis report on the topic."
""" + tool_section_str
# Create Praison Labs instance with the agent_yaml content
praison_ai = Praison Labs(agent_yaml=agent_yaml)
# Run Praison Labs
result = praison_ai.main()
# Print the result
print(result)
Responses are generated using AI and may contain
mistakes.