composio-claude


Namecomposio-claude JSON
Version 0.6.5 PyPI version JSON
download
home_pagehttps://github.com/ComposioHQ/composio
SummaryUse Composio to get an array of tools with your Claude LLMs.
upload_time2024-12-20 10:44:35
maintainerNone
docs_urlNone
authorSawradip
requires_python<4,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## 🚀🔗 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)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ComposioHQ/composio",
    "name": "composio-claude",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Sawradip",
    "author_email": "sawradip@composio.dev",
    "download_url": "https://files.pythonhosted.org/packages/98/72/008ed1104e8ca486c501039ac14755bae3936661f0498448bea2e35bfef6/composio_claude-0.6.5.tar.gz",
    "platform": null,
    "description": "## \ud83d\ude80\ud83d\udd17 Leveraging Claude with Composio\n\nFacilitate the integration of Claude with Composio to empower Claude models to directly interact with external applications, broadening their capabilities and application scope.\n\n### Objective\n\n- **Automate starring a GitHub repository** using conversational instructions via Claude Function Calls.\n\n### Installation and Setup\n\nEnsure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.\n\n```bash\n# Install Composio LangChain package\npip install composio-claude\n\n# Connect your GitHub account\ncomposio-cli add github\n\n# View available applications you can connect with\ncomposio-cli show-apps\n```\n\n### Usage Steps\n\n#### 1. Import Base Packages\n\nPrepare your environment by initializing necessary imports from Claude and setting up your client.\n\n```python\nimport anthropic\n\n# Initialize Claude client\nclient = anthropic.Anthropic()\n```\n\n### Step 2: Integrating GitHub Tools with Composio\n\nThis step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.\n```python\nfrom composio_claude import App, ComposioToolSet\n\ntoolset = ComposioToolSet()\nactions = toolset.get_tools(tools=App.GITHUB)\n```\n\n### Step 3: Agent Execution\n\nThis step involves configuring and executing the agent to carry out actions, such as starring a GitHub repository.\n\n```python\nmy_task = \"Star a repo composiohq/composio on GitHub\"\n\n# Create a chat completion request to decide on the action\nresponse = client.beta.tools.messages.create(\n    model=\"claude-3-opus-20240229\",\n    max_tokens=1024,\n    tools= actions,\n    messages=[{\"role\": \"user\", \"content\": \"Star me composiohq/composio repo in github.\"}],\n)\npprint(response)\n```\n\n### Step 4: Validate Execution Response\n\nExecute the following code to validate the response, ensuring that the intended task has been successfully completed.\n\n```python\nresult = toolset.handle_tool_calls(response)\npprint(result)\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Use Composio to get an array of tools with your Claude LLMs.",
    "version": "0.6.5",
    "project_urls": {
        "Homepage": "https://github.com/ComposioHQ/composio"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5d4e40054782a3ba0c2cc5baf954e93e577cf6bebd8c093464be0997514e4f8c",
                "md5": "963819e381ba9845e11888fa052b5823",
                "sha256": "8ff8f6b157ea1b833b60ce12cc66980e46e7a10387f661f65bc48bf7fc0dc4bf"
            },
            "downloads": -1,
            "filename": "composio_claude-0.6.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "963819e381ba9845e11888fa052b5823",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 4471,
            "upload_time": "2024-12-20T10:44:33",
            "upload_time_iso_8601": "2024-12-20T10:44:33.837800Z",
            "url": "https://files.pythonhosted.org/packages/5d/4e/40054782a3ba0c2cc5baf954e93e577cf6bebd8c093464be0997514e4f8c/composio_claude-0.6.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9872008ed1104e8ca486c501039ac14755bae3936661f0498448bea2e35bfef6",
                "md5": "0e951ef79a34969b673f740eca338ead",
                "sha256": "e5d36d5dea922db673d7ad832fe50e681bc431af9b78aa218a626933b54837b4"
            },
            "downloads": -1,
            "filename": "composio_claude-0.6.5.tar.gz",
            "has_sig": false,
            "md5_digest": "0e951ef79a34969b673f740eca338ead",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.9",
            "size": 3988,
            "upload_time": "2024-12-20T10:44:35",
            "upload_time_iso_8601": "2024-12-20T10:44:35.828903Z",
            "url": "https://files.pythonhosted.org/packages/98/72/008ed1104e8ca486c501039ac14755bae3936661f0498448bea2e35bfef6/composio_claude-0.6.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-20 10:44:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ComposioHQ",
    "github_project": "composio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "composio-claude"
}
        
Elapsed time: 2.32218s