semvec/pypi-packages huggingface dataset:
soham 0.0.3
A multiagent system that can do multiple jobs at once
Requires Python: >=3.12

<div align="center">

🚧👷‍♂️ <b>UNDER CONSTRUCTION</b> 👷‍♀️🚧

</div>

# 🤖 Soham: The Multi-Agent Playground 🚀

<div align="center">

✨ <b>Unleash a team of digital agents to do the work of many!</b> ✨

<img src="https://em-content.zobj.net/source/microsoft-teams/363/robot_1f916.png" alt="Multi-Agent" width="80"/>

</div>

---

## What is Soham?

Soham is a multi-agent system designed to perform the work of multiple developers simultaneously. Imagine a virtual team of agents, each with their own specialty, collaborating to get things done—faster, smarter, and with a dash of fun!

> "Why do the work of one developer, when you can have a whole squad of digital agents?" 🤹‍♂️🤖🤖🤖

> **Note:** This project was created for fun and experimentation!

---

## Features

- 🤖 Multiple agents, many jobs
- 🧠 Collaboration and coordination
- 🎲 Built for fun, experimentation, and a bit of chaos
- 🚀 This team of agents will get the work done.😎 Well, might get the work done.🤔 Idk will try for sure, depends on the underlying models... ✌️🥶


---

## 📦 Project Links

- [![GitHub](https://img.shields.io/badge/GitHub-100000?style=flat&logo=github&logoColor=white)](https://github.com/arneesh/soham) <sub>(If you find this project interesting, you might consider starring it ⭐)</sub>

---

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/arneesh/soham/blob/master/LICENSE) file for details.

---

## Stay tuned!

More details and documentation will be added soon. For now, enjoy the idea of a digital developer party! 🎉

---

<sub>Disclaimer: <i>This repository is a personal project and is not associated with, endorsed by, or affiliated with any individual, company, or organization. All content is for fun and experimentation only.</i></sub>
composio-smol 0.7.20
Use Composio to get array of strongly typed tools for Smol Agents
Requires Python: <4,>=3.9

## 🚀🔗 Leveraging Smol Agents with Composio

Integrate Smol Agents with Composio to enable direct interaction with external applications, enhancing their capabilities through strongly-typed, validated tools.

### Objective

- **Automate GitHub operations** using type-safe instructions via Smol Agent's Tool system.
- Demonstrate how to use Composio's tools with Smol Agent's CodeAgent.

### Installation and Setup

Install the necessary packages and connect your GitHub account to enable agent interactions with GitHub:

```bash
# Install Composio Smol Agents package
pip install composio-smol

# Connect your GitHub account
composio add github

# View available applications you can connect with
composio apps
```

### Usage Steps

#### 1. Import Required Packages

Set up your environment by importing the necessary components from Composio & Smol Agents:

```python
from dotenv import load_dotenv
import os

from composio import Action
from composio_smol import ComposioToolSet
from smolagents import HfApiModel, CodeAgent
```

#### 2. Initialize Tools with Composio

Configure and fetch GitHub tools provided by Composio:

```python
# Initialize toolset
composio_toolset = ComposioToolSet()

# Get GitHub tools with retry configuration
tools = composio_toolset.get_tools(
    actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER],
)
```

#### 3. Set Up the Smol Agent

Create and configure a Smol agent with the Composio tools:

```python
# Create an agent with the tools
agent = CodeAgent(
    tools=tools,
    model=HfApiModel()
)
```

#### 4. Execute Tasks

Run your agent with specific tasks:

```python
# Define task
agent.run("Star the composiohq/composio repo")
```

### Advanced Usage

The integration supports more complex scenarios:

```python
# Using multiple tools
tools = composio_toolset.get_tools(
    actions=[
        Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER,
        Action.GITHUB_CREATE_REPOSITORY
    ],
)

# Using app-specific tools
tools = composio_toolset.get_tools(
    apps=[App.GITHUB],
)
```

### Best Practices

1. Always use proper type hints in your code
2. Handle validation errors appropriately
3. Use the latest version of both Smol Agent and Composio
4. Leverage async operations for better performance
5. Keep your API keys secure using environment variables
6. Configure retries based on the specific needs of each tool
composio-praisonai 0.7.20
Use Composio Tools to enhance your PraisonAI agents capabilities.
Requires Python: >=3.9

## 🚀🔗 Leveraging PraisonAI with Composio

Facilitate the integration of PraisonAI with Composio to empower Praison Agents to directly interact with external applications, broadening their capabilities and application scope.

### Objective

- **Automate starring a GitHub repository** using conversational instructions via PraisonAI Agents.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-praisonai

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage Steps

#### 1. Import Base Packages

Prepare your environment by initializing necessary imports from Praison and setting up your client.

```python
import os
import yaml
from praisonai import PraisonAI
```

### Step 2: Write the Praison-supported Composio Tools ins `tools.py` file.

This step involves fetching and integrating GitHub tools provided by Composio, and writing them in Praison supported Format, returning the name of tools in a format, that should be added to `agents.yml` file.
```python
from composio_praisonai import Action, ComposioToolSet

composio_toolset = ComposioToolSet()
tools = composio_toolset.get_actions(
    actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)

tool_section_str = composio_toolset.get_tools_section(tools)
print(tool_section_str)
```

### Step 3: Define the 'agents_yml` either in a separate file, or in your script.

This step involves configuring and executing the agent to carry out actions, such as starring a GitHub repository.

```python
agent_yaml = """
framework: "crewai"
topic: "Github Management"

roles:
  developer:
    role: "Developer"
    goal: "An expert programmer"
    backstory: "A developer exploring new codebases and have certain tools available to execute different tasks."
    tasks:
      star_github:
        description: "Star a repo composiohq/composio on GitHub"
        expected_output: "Response whether the task was executed."
""" + tool_section_str

print(agent_yaml)
```

### Step 4: Run the Praison Agents to execute the goal/task.

Here you initialize PraisonAI class, and execute.
```python
# Create a PraisonAI instance with the agent_yaml content
praison_ai = PraisonAI(agent_yaml=agent_yaml)

# Run PraisonAI
result = praison_ai.main()

# Print the result
print(result)
```
composio-phidata 0.7.20
Use Composio to get an array of tools with your Phidata Plugin.
Requires Python: <4,>=3.9

## 🚀🔗 Leveraging PhiData with Composio

Facilitate the integration of PhiData with Composio to empower LLMs to directly interact with external applications & knowledge base, broadening their capabilities and application scope.

### Objective

- **Automate starring a GitHub repository** using conversational instructions via PhiData Tool Calls.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-phidata

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage Steps

#### 1. Import Base Packages

Prepare your environment by initializing necessary imports from PhiData.

```python
from phi.assistant import Assistant
```

### Step 2: Integrating GitHub Tools with Composio

This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.
```python
from composio_phidata import ComposioToolSet, Action

toolset = ComposioToolSet()
composio_tools = toolset.get_actions(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```

### Step 3: Agent Execution

This step involves configuring and executing the assistant to carry out actions, such as starring a GitHub repository.

```python
my_task = "Star a repo composiohq/composio on GitHub"

# Create a chat completion request to decide on the action
assistant = Assistant(tools=composio_tools, show_tool_calls=True)

assistant.print_response("Can you star ComposioHQ/composio repo?")
```
composio-lyzr 0.7.20
Use Composio to get an array of tools with your Lyzr workflow.
Requires Python: <4,>=3.9

## Using Composio With Lyzr

Integrate Composio with Lyzr agents to allow them to interact seamlessly with external apps, enhancing their functionality and reach.

### Goal

- **Star a repository on GitHub** using natural language commands through a LangChain Agent.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-lyzr

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage

```
from  lyzr_automata  import  Task, Agent
from lyzr_automata.ai_models.openai import OpenAIModel
from lyzr_automata.tasks.task_literals import InputType, OutputType
from lyzr_automata.pipelines.linear_sync_pipeline import LinearSyncPipeline

import os
import dotenv
dotenv.load_dotenv()
from composio_lyzr import ComposioToolSet, App, Action

open_ai_text_completion_model = OpenAIModel(
    api_key=os.environ["OPENAI_API_KEY"],
    parameters={
        "model": "gpt-4-turbo-preview",
        "temperature": 0.2,
        "max_tokens": 1500,
    },
)


lyzr_agent = Agent(
        role="Github Agent",
        prompt_persona="You are AI agent that is responsible for taking actions on Github on users behalf. You need to take action on Github using Github APIs"
    )

composio_toolset = ComposioToolSet()
composio_tool = composio_toolset.get_lyzr_tool(Action.GITHUB_STAR_REPO)

task = Task(
        name="Github Starring",
        agent=lyzr_agent,
        tool=composio_tool,
        output_type=OutputType.TEXT,
        input_type=InputType.TEXT,
        model=open_ai_text_completion_model,
        instructions="Star a repo composiohq/composio on GitHub",
        log_output=True,
        enhance_prompt=False,
)

lyzr_output = LinearSyncPipeline(
    name="Composio Lyzr",
		# completion message after pipeline completes
    completion_message="Task completed",
    tasks=[
				# tasks are instance of Task class
        task,
    ],
).run()

print(lyzr_output)
```
composio-livekit 0.7.20
Use Composio Toolset with LiveKit
Requires Python: <4,>=3.9

# Composio Integration for LiveKit

This package integrates LiveKit with Composio, allowing you to use Composio's powerful toolset within LiveKit's agent framework.

## Installation

```bash
pip install composio_livekit
```

## Requirements

- Python 3.9 or higher
- composio_core >= 0.7.0
- livekit >= 0.14.0
- pydantic >= 2.0.0

## Usage

### Basic Integration

```python
from composio_livekit import ComposioToolSet, Action
from livekit.agents.voice import Agent

# Initialize the toolset
composio_toolset = ComposioToolSet()

# Get specific tools
tools = composio_toolset.get_tools(
    actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)

# Use with LiveKit Agent
class Assistant(Agent):
    def __init__(self):
        super().__init__(
            instructions="You are a helpful voice AI assistant.",
            tools=tools
        )
```

### Complete Example

For a complete example including voice integration, see the demo file in the repository:

```python
from livekit.agents.voice import AgentSession
from livekit.plugins import (
    openai,
    cartesia,
    deepgram,
    silero,
    turn_detector,
)

async def setup_agent_session():
    session = AgentSession(
        stt=deepgram.STT(),
        llm=openai.LLM(model="gpt-4o"),
        tts=cartesia.TTS(),
        vad=silero.VAD.load(),
        turn_detection=turn_detector.EOUModel(),
    )
    
    await session.start(
        room=ctx.room,
        agent=Assistant(),
    )
```

## Features

- Seamless integration between Composio tools and LiveKit agents
- Support for all Composio actions and apps
- Type-safe function signatures
- Proper handling of array parameters and complex types

## License

Apache License 2.0
composio-griptape 0.7.20
Use Composio to get an array of tools with your Griptape workflow.
Requires Python: <4,>=3.9

## 🚀🔗 Integrating Composio with Griptape

Streamline the integration of Composio within the Griptape agentic framework to enhance the interaction capabilities of Griptape agents with external applications, significantly extending their operational range and efficiency.

### Objective

- **Facilitate the automation of starring a GitHub repository** through the use of conversational commands within the Griptape framework, leveraging Composio's Function Calls.


### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-griptape

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage Steps

#### 1. Initialize Environment and Client

Establish your development environment by importing necessary libraries and setting up the Griptape client.
```python
from griptape.structures import Agent
from griptape.utils import Chat

from composio_griptape import App, Action, Tag, ComposioToolSet
import dotenv


dotenv.load_dotenv("/Users/sawradip/Desktop/practice_code/practice_composio/composio_sdk/examples/.env")

```

### 2. Integrating GitHub Tools with Composio for Griptape Operations

This section guides you through the process of integrating GitHub tools into your Griptape projects using Composio's services.

```python
composio_toolset = ComposioToolSet()
composio_tools = composio_toolset.get_tools(tools = App.GITHUB)

agent = Agent(
    tools=composio_tools
)
```

### Step 3: Agent Execution

This step involves configuring and Chatting with the Griptape agent to carry out specific tasks, for example, starring a GitHub repository.

```python
Chat(agent).start()
```
composio-claude 0.7.20
Use Composio to get an array of tools with your Claude LLMs.
Requires Python: <4,>=3.9

## 🚀🔗 Leveraging Claude with Composio

Facilitate the integration of Claude with Composio to empower Claude models to directly interact with external applications, broadening their capabilities and application scope.

### Objective

- **Automate starring a GitHub repository** using conversational instructions via Claude Function Calls.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-claude

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage Steps

#### 1. Import Base Packages

Prepare your environment by initializing necessary imports from Claude and setting up your client.

```python
import anthropic

# Initialize Claude client
client = anthropic.Anthropic()
```

### Step 2: Integrating GitHub Tools with Composio

This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.
```python
from composio_claude import App, ComposioToolSet

toolset = ComposioToolSet()
actions = toolset.get_tools(tools=App.GITHUB)
```

### Step 3: Agent Execution

This step involves configuring and executing the agent to carry out actions, such as starring a GitHub repository.

```python
my_task = "Star a repo composiohq/composio on GitHub"

# Create a chat completion request to decide on the action
response = client.beta.tools.messages.create(
    model="claude-3-opus-20240229",
    max_tokens=1024,
    tools= actions,
    messages=[{"role": "user", "content": "Star me composiohq/composio repo in github."}],
)
pprint(response)
```

### Step 4: Validate Execution Response

Execute the following code to validate the response, ensuring that the intended task has been successfully completed.

```python
result = toolset.handle_tool_calls(response)
pprint(result)
```
composio-camel 0.7.20
Use Composio to get an array of tools with your Claude LLMs.
Requires Python: <4,>=3.9

## 🚀🔗 Leveraging CamelAI with Composio

Facilitate the integration of Camel Agents with Composio to empower the agents to directly interact with external applications, broadening their capabilities and application scope.

### Objective

- **Automate starring a GitHub repository** using conversational instructions via Camel's Tool Usage ability.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-camel

# Connect your GitHub account
composio-cli add github

# View available applications you can connect with
composio-cli show-apps
```

### Usage Steps

#### 1. Import Base Packages

Prepare your environment by initializing necessary imports from Composio & Camel.

```python
from colorama import Fore

from camel.agents import ChatAgent
from camel.configs import ChatGPTConfig
from camel.messages import BaseMessage
from camel.models import ModelFactory
from camel.types import ModelPlatformType, ModelType
from camel.utils import print_text_animated
from composio_camel import ComposioToolSet, Action
```

### Step 2: Integrating GitHub Tools with Composio

This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for Camel operations.
```python
composio_toolset = ComposioToolSet()
tools = composio_toolset.get_actions(
    actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)
```

### Step 3: Camel Agent Setup

This step involves configuring and executing the agent to carry out actions, such as starring a GitHub repository.

```python
# set up LLM model
assistant_model_config = ChatGPTConfig(
    temperature=0.0,
    tools=tools,
)

model = ModelFactory.create(
    model_platform=ModelPlatformType.OPENAI,
    model_type=ModelType.GPT_3_5_TURBO,
    model_config_dict=assistant_model_config.__dict__,
)


# set up agent
assistant_sys_msg = BaseMessage.make_assistant_message(
    role_name="Developer",
    content=(
        "You are a programmer as well an experienced github user. "
        "When asked given a instruction, "
        "you try to use available tools, and execute it"
    ),
)

agent = ChatAgent(
    assistant_sys_msg,
    model,
    tools=tools,
)
agent.reset()
```

### Step 4: Execute with your prompt/task.

Execute the following code to execute the agent, ensuring that the intended task has been successfully completed.

```python
prompt = (
    "I have created a new Github Repo,"
    "Please star my github repository: camel-ai/camel"
)
user_msg = BaseMessage.make_user_message(role_name="User", content=prompt)
print(Fore.YELLOW + f"user prompt:\n{prompt}\n")

response = agent.step(user_msg)
for msg in response.msgs:
    print_text_animated(Fore.GREEN + f"Agent response:\n{msg.content}\n")

```
composio-agno 0.7.20
Use Composio to get an array of tools with your Agno Plugin.

## 🚀🔗 Leveraging Agno with Composio

Facilitate the integration of Agno with Composio to empower LLMs to directly interact with external applications & knowledge base, broadening their capabilities and application scope.

### Objective

- **Automate starring a GitHub repository** using conversational instructions via Agno Tool Calls.

### Installation and Setup

Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.

```bash
# Install Composio LangChain package
pip install composio-agno

# Connect your GitHub account
composio add github

# View available applications you can connect with
composio apps
```

### Usage Steps

#### 1. Import Base Packages

Prepare your environment by initializing necessary imports from Agno.

```python
from agno.agent import Agent
```

### Step 2: Integrating GitHub Tools with Composio

This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.
```python
from composio_agno import ComposioToolSet, Action

toolset = ComposioToolSet()
composio_tools = toolset.get_actions(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```

### Step 3: Agent Execution

This step involves configuring and executing the assistant to carry out actions, such as starring a GitHub repository.

```python

# Create a chat completion request to decide on the action
agent = Agent(tools=composio_tools, show_tool_calls=True)

agent.print_response("Can you star ComposioHQ/composio repo?")
```
casrel-datautils-yyd 0.0.1
A Chinese relation extraction data utility toolkit based on CasRel model
Requires Python: >=3.7

CasRel 数据处理工具包

这是一个基于 CasRel 模型的中文关系抽取数据处理工具包，支持 BERT 预训练模型。

## 支持的 BERT 模型

- **bert-base-chinese**: 默认中文 BERT 基础模型，适用于通用中文任务，参数量适中，bert_dim=768。

## 安装

- pip install casrel_datautils_yyd

## 使用示例

以下是一个使用 `casrel_datautils` 进行数据加载和单条样本处理的示例代码：

```python
from casrel_datautils.Base_Conf import BaseConfig
from casrel_datautils.data_loader import get_dataloader
from casrel_datautils.process import single_sample_process

# 配置基础参数
baseconf = BaseConfig(
    bert_path_or_bertModel_name="bert-base-chinese", #模型路径或模型名称
    train_data=r"本地数据路径train.json",
    test_data=r"本地数据路径test.json",
    rel_data=r"本地关系数据路径relation.json",
    batch_size=2
)

# 获取数据加载器
dataloaders = get_dataloader(baseconf)

# 单条样本处理
sample = {"text": "这是一个测试句子"}
input_tensor, mask_tensor = single_sample_process(baseconf, sample)
print(input_tensor.shape)
print(mask_tensor.shape)
```

### 说明

- **BaseConfig**: 用于设置 BERT 模型路径、数据路径和批次大小等参数。
- **get_dataloader**: 返回训练、验证和测试的数据加载器。
- **single_sample_process**: 处理单条文本样本，返回输入张量和掩码张量。

## 注意事项

- 确保数据文件（如 `train.json`、`test.json`、`relation.json`）路径正确。
- 根据任务需求选择合适的 BERT 模型。