Skip to content

Commit

Permalink
Merge branch 'master' into fix-pr1162-1736171567
Browse files Browse the repository at this point in the history
  • Loading branch information
Prat011 authored Jan 9, 2025
2 parents bd7bc6c + 9f70e14 commit 1175579
Show file tree
Hide file tree
Showing 204 changed files with 1,571 additions and 2,852 deletions.
94 changes: 34 additions & 60 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,12 @@ jobs:
defaults:
run:
working-directory: ./python
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"
- name: Build
env:
COMPOSIO_BASE_URL: https://backend.composio.dev/api
Expand All @@ -43,6 +39,7 @@ jobs:
pip install twine build
python -m build
- name: Publish Core to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
Expand All @@ -51,80 +48,56 @@ jobs:
packages-dir: python/dist/

publish-plugins:
needs: publish-core
name: Create Plugin Releases
defaults:
run:
working-directory: ./python
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
package:
[
autogen,
camel,
claude,
crew_ai,
griptape,
julep,
langchain,
llamaindex,
lyzr,
openai,
praisonai,
langgraph,
phidata,
google,
]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build ${{ matrix.package }}
python-version: "3.10"
- name: Build plugins
run: |
pip install twine build
# Build dist
cd plugins/${{ matrix.package }}
python -m build
- name: Publish ${{ matrix.package }} to PyPI
pip install build twine
plugins="autogen camel claude crew_ai griptape julep langchain llamaindex lyzr openai praisonai langgraph phidata google"
mkdir plugins_dist
for plugin in $plugins; do
cd plugins/$plugin
python -m build
mv dist/* ../../plugins_dist/
cd ../..
done
- name: Publish plugins to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/plugins/${{ matrix.package }}/dist/
packages-dir: python/plugins_dist/

publish-swe:
needs: publish-core
name: Create SWE Toolkit Release
defaults:
run:
working-directory: ./python/swe
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"
- name: Build
run: |
pip install twine build
# Build dist
pip install build twine
python -m build
- name: Publish SWE Kit to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
Expand All @@ -134,11 +107,10 @@ jobs:

publish-cli:
name: Build and upload CLI
needs: publish-core
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand All @@ -158,7 +130,7 @@ jobs:
pyinstaller composio/cli/__main__.py
# Ubuntu Release
- if: matrix.os == 'ubuntu-latest'
- if: matrix.os == 'ubuntu-latest' && github.event_name == 'release'
run: |
cd python/
mv dist/__main__ dist/bin
Expand All @@ -167,14 +139,14 @@ jobs:
cd dist/
zip -r composio-linux-amd64.zip bin/*
rm -rf bin/
- if: matrix.os == 'ubuntu-latest'
- if: matrix.os == 'ubuntu-latest' && github.event_name == 'release'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-linux-amd64.zip

# Mac Intel Release
- if: matrix.os == 'macos-12'
- if: matrix.os == 'macos-13' && github.event_name == 'release'
run: |
cd python/
mv dist/__main__ dist/bin
Expand All @@ -183,14 +155,14 @@ jobs:
cd dist/
zip -r composio-darwin-amd64.zip bin/*
rm -rf bin/
- if: matrix.os == 'macos-12'
- if: matrix.os == 'macos-13' && github.event_name == 'release'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-darwin-amd64.zip

# Mac ARM Release
- if: matrix.os == 'macos-14'
- if: matrix.os == 'macos-14' && github.event_name == 'release'
run: |
cd python/
mv dist/__main__ dist/bin
Expand All @@ -199,14 +171,14 @@ jobs:
cd dist/
zip -r composio-darwin-arm64.zip bin/*
rm -rf bin/
- if: matrix.os == 'macos-14'
- if: matrix.os == 'macos-14' && github.event_name == 'release'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-darwin-arm64.zip

# # Windows release
# - if: matrix.os == 'windows-latest'
# - if: matrix.os == 'windows-latest' && github.event_name == 'release'
# run: |
# cd python/
# mv dist/__main__ dist/bin
Expand All @@ -215,7 +187,7 @@ jobs:
# cd dist/
# zip -r composio-win.zip bin/*
# rm -rf bin/
# - if: matrix.os == 'windows-latest'
# - if: matrix.os == 'windows-latest' && github.event_name == 'release'
# name: Upload artifact
# uses: softprops/action-gh-release@v2
# with:
Expand Down Expand Up @@ -243,6 +215,7 @@ jobs:
with:
python-version: "3.10"
- name: Publishing tool server images
if: github.event_name == 'release'
run: |
cd python/
pip3 install .
Expand All @@ -261,6 +234,7 @@ jobs:
run: |
npm install -g @e2b/cli@latest
- name: Publishing Template
if: github.event_name == 'release'
env:
E2B_ACCESS_TOKEN: ${{secrets.E2B_ACCESS_TOKEN}}
run: |
Expand Down
34 changes: 10 additions & 24 deletions docs/faq/integrations_and_connections/list_of_tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,41 @@ sidebarTitle: "Listing Tools & Actions"
description: "This section will walk you through discovering and managing the tools, integrations, actions, and more."
---

### Listing All Tools

You can list all available applications in Composio along with their logos, descriptions, and more.


### Listing All Apps (Tools)
<CodeGroup>
```python Python Get all apps
```python Python
from composio import ComposioToolSet

toolset = ComposioToolSet()

print(toolset.get_apps()) # Get all apps
print(toolset.get_apps())
```

```javascript Javascript Get all apps
```javascript JavaScript
import { Composio } from "composio-core";

const composio = new Composio();
const apps = await composio.apps.list();
console.log(await composio.apps.list());
```

```bash CLI Get all apps
```bash CLI
composio apps
```


</CodeGroup>

### Listing all Actions

All actions supported by the Composio along with function signatures and parameter descriptions.

### Listing All Actions
<CodeGroup>
```python Python Get all actions
```python Python
from composio import Composio

client = Composio()
print(client.actions.get(limit=10)) # print all actions supported
```

```javascript Javascript Get all actions
```javascript JavaScript
import { Composio } from "composio-core";
const composio = new Composio();
const actions = await composio.actions.list({ data: { limit: 10 } });

console.log(actions); // print all actions supported
```

```bash CLI Get all actions
```bash CLI
composio actions --limit 10
```
</CodeGroup>
20 changes: 18 additions & 2 deletions docs/framework/autogen.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sidebarTitle: "Autogen"
description: "Integrate Composio with Autogen agents to let them seamlessly interact with external Apps"
---

## Star A Repository on Github
In this example, we will use Autogen Agent to star a repository on Github using Composio Tools
## Star A Repository on GitHub
In this example, we will use Autogen Agent to star a repository on GitHub using Composio Tools

<Steps>
<Step title="Install Packages">
Expand All @@ -29,6 +29,22 @@ llm_config = {
}
```
</Step>
<Step title="Connect Your GitHub Account">
<Info>You need to have an active GitHub Integration. Learn how to do this [here](https://youtu.be/LmyWy4LiedQ?si=u5uFArlNL0tew0Wf)</Info>
<CodeGroup>
```shell CLI
composio login
composio add github
```
```python Python
request = toolset.initiate_connection(app=App.GITHUB)
print(f"Open this URL to authenticate: {request.redirectUrl}")
```
</CodeGroup>
<Tip>
Don't forget to set your `COMPOSIO_API_KEY` and `OPENAI_API_KEY` in your environment variables.
</Tip>
</Step>

<Step title="Define the Assistant & resigter the tools">
You can get all the tools for a given app as shown below, but you can get **specific actions** and filter actions using **usecase** & **tags**. Learn more [here](../../patterns/tools/use-tools/use-specific-actions)
Expand Down
4 changes: 2 additions & 2 deletions docs/framework/camelai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Ensure you have the necessary packages installed and connect your GitHub account
``` bash Run command
pip install camel-ai
pip install composio-camel -U
# Connect your Github so agents can use it.
# Connect your GitHub so agents can use it.
composio add github
# Check all different apps which you can connect with
composio apps
Expand Down Expand Up @@ -107,7 +107,7 @@ Execute the following code to execute the agent, ensuring that the intended task
<CodeGroup>
```python CAMEL Agent Execution
prompt = (
"I have created a new Github Repo,"
"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)
Expand Down
29 changes: 23 additions & 6 deletions docs/framework/crewai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ sidebarTitle: "CrewAI"
description: "Integrate Composio with CrewAI agents to let them seamlessly interact with external apps"
---

## Star A Repository on Github
In this example, we will use CrewAI Agent to star a repository on Github using Composio Tools
## Star A Repository on GitHub
In this example, we will use CrewAI Agent to star a repository on GitHub using Composio Tools

<Steps>
<Step title="Install Packages">
Expand All @@ -24,7 +24,24 @@ llm = ChatOpenAI(api_key="<your-openai-api-key>")
```
</Step>

<Step title="Get All Github Tools">
<Step title="Connect Your GitHub Account">
<Info>You need to have an active GitHub Integration. Learn how to do this [here](https://youtu.be/LmyWy4LiedQ?si=u5uFArlNL0tew0Wf)</Info>
<CodeGroup>
```shell CLI
composio login
composio add github
```
```python Python
request = toolset.initiate_connection(app=App.GITHUB)
print(f"Open this URL to authenticate: {request.redirectUrl}")
```
</CodeGroup>
<Tip>
Don't forget to set your `COMPOSIO_API_KEY` and `OPENAI_API_KEY` in your environment variables.
</Tip>
</Step>

<Step title="Get All GitHub Tools">
You can get all the tools for a given app as shown below, but you can get **specific actions** and filter actions using **usecase** & **tags**. Learn more [here](../../patterns/tools/use-tools/use-specific-actions)
<CodeGroup>
```python Python
Expand All @@ -36,9 +53,9 @@ tools = toolset.get_tools(apps=[App.GITHUB])
<Step title="Define the Agent, Task & Crew">
```python Python
crewai_agent = Agent(
role="Github Agent",
goal="You take action on Github using Github APIs",
backstory="You are AI agent that is responsible for taking actions on Github on behalf of users using Github APIs",
role="GitHub Agent",
goal="You take action on GitHub using GitHub APIs",
backstory="You are AI agent that is responsible for taking actions on GitHub on behalf of users using GitHub APIs",
verbose=True,
tools=tools,
llm=llm,
Expand Down
Loading

0 comments on commit 1175579

Please sign in to comment.