Skip to content

Commit

Permalink
Release v0.3.17 (#276)
Browse files Browse the repository at this point in the history
Co-authored-by: Karan Vaidya <[email protected]>
  • Loading branch information
angrybayblade and kaavee315 authored Jul 9, 2024
1 parent 9e8deeb commit 78525d6
Show file tree
Hide file tree
Showing 51 changed files with 319 additions and 421 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
package: [autogen, claude,crew_ai, griptape, julep, langchain, lyzr, openai, llamaindex]
package: [autogen, camel, claude, crew_ai, griptape, julep, langchain, llamaindex, lyzr, openai]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -74,3 +74,39 @@ jobs:
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/plugins/${{ matrix.package }}/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 }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
python -m pip install --upgrade pip
pip install twine build
# Build dist
python -m build
- name: Publish SWE Kit to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/swe/dist/
61 changes: 31 additions & 30 deletions python/composio/tools/env/docker/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,29 @@
from composio.tools.local.handler import LocalClient


script_path = os.path.dirname(os.path.realpath(__file__))
composio_core_path = Path(script_path).parent.parent.parent.parent.absolute()
composio_local_store_path = Path.home() / ".composio"
COMPOSIO_PATH = Path(__file__).parent.parent.parent.parent.resolve()
COMPOSIO_CACHE = Path.home() / ".composio"

CONTAINER_BASE_KWARGS = {
"command": "/bin/bash -l -m",
"tty": True,
"detach": True,
"stdin_open": True,
"auto_remove": False,
}
CONTAINER_DEVELOPMENT_MODE_KWARGS = {
"environment": {ENV_COMPOSIO_DEV_MODE: 1},
"volumes": {
COMPOSIO_PATH: {
"bind": "/opt/composio-core",
"mode": "rw",
},
COMPOSIO_CACHE: {
"bind": "/root/.composio",
"mode": "rw",
},
},
}


class DockerWorkspace(Workspace):
Expand All @@ -41,34 +61,15 @@ def __init__(self, image: t.Optional[str] = None) -> None:
super().__init__()
self._image = image or os.environ.get(ENV_COMPOSIO_SWE_AGENT, DEFAULT_IMAGE)
self.logger.info(f"Creating docker workspace with image: {self._image}")
composio_swe_env = os.environ.get(ENV_COMPOSIO_DEV_MODE, 0)
container_args = {
"image": self._image,
"command": "/bin/bash -l -m",
"name": self.id,
"tty": True,
"detach": True,
"stdin_open": True,
"auto_remove": False,
}
try:
if composio_swe_env != 0:
container_args.update(
{
"environment": {ENV_COMPOSIO_DEV_MODE: 1},
"volumes": {
composio_core_path: {
"bind": "/opt/composio-core",
"mode": "rw",
},
composio_local_store_path: {
"bind": "/root/.composio",
"mode": "rw",
},
},
}
)
self._container = self.client.containers.run(**container_args)
container_kwargs = {
"image": self._image,
"name": self.id,
**CONTAINER_BASE_KWARGS,
}
if os.environ.get(ENV_COMPOSIO_DEV_MODE, 0) != 0:
container_kwargs.update(CONTAINER_DEVELOPMENT_MODE_KWARGS)
self._container = self.client.containers.run(**container_kwargs)
self._container.start()
except Exception as e:
raise Exception("exception in starting container: ", e) from e
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/autogen/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_autogen",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Autogen agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.16", "pyautogen>=0.2.19"],
install_requires=["composio_core==0.3.17", "pyautogen>=0.2.19"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/camel/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_camel",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.16", "camel-ai>=0.1.5.4"],
install_requires=["composio_core==0.3.17", "camel-ai>=0.1.5.4"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/claude/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_claude",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.3.16", "anthropic>=0.25.7"],
install_requires=["composio_openai==0.3.17", "anthropic>=0.25.7"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/crew_ai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_crewai",
version="0.3.16",
version="0.3.17",
author="Himanshu",
author_email="[email protected]",
description="Use Composio to get an array of tools with your CrewAI agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_langchain==0.3.16"],
install_requires=["composio_langchain==0.3.17"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/griptape/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_griptape",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Griptape wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.16", "griptape>=0.24.2"],
install_requires=["composio_core==0.3.17", "griptape>=0.24.2"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/julep/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_julep",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Julep wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.3.16", "julep>=0.3.2"],
install_requires=["composio_openai==0.3.17", "julep>=0.3.2"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/langchain/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_langchain",
version="0.3.16",
version="0.3.17",
author="Karan",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LangChain agent.",
Expand All @@ -27,7 +27,7 @@
"langchain-openai>=0.0.2.post1",
"pydantic>=2.6.4",
"langchainhub>=0.1.15",
"composio_core==0.3.16",
"composio_core==0.3.17",
],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/llamaindex/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_llamaindex",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LlamaIndex agent.",
Expand All @@ -24,7 +24,7 @@
python_requires=">=3.9,<4",
install_requires=[
"llama_index>=0.10.43",
"composio_langchain==0.3.16",
"composio_langchain==0.3.17",
],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/lyzr/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_lyzr",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Lyzr workflow.",
Expand All @@ -25,7 +25,7 @@
install_requires=[
"lyzr-automata>=0.1.3",
"pydantic>=2.6.4",
"composio_core==0.3.16",
"composio_core==0.3.17",
"langchain>=0.1.0",
],
include_package_data=True,
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/openai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_openai",
version="0.3.16",
version="0.3.17",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your OpenAI Function Call.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.3.16"],
install_requires=["composio_core==0.3.17"],
include_package_data=True,
)
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="composio_core",
version="0.3.16",
version="0.3.17",
author="Utkarsh",
author_email="[email protected]",
description="Core package to act as a bridge between composio platform and other services.",
Expand Down
8 changes: 4 additions & 4 deletions python/swe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

## Overview

`Composio SWE` is a framework for building SWE agents on by utilising composio tooling ecosystem. Composio-SWE allows you to
`swekit` is a framework for building SWE agents on by utilising composio tooling ecosystem. SWE Kit allows you to

- Scaffold agents which works out-of-the-box with choice of your agentic framework, `crewai`, `llamaindex`, etc...
- Tools to add or optimise your agent's abilities
Expand All @@ -26,7 +26,7 @@ Before getting started, ensure you have the following set up:
1. **Installation**:

```
pip install composio-swe composio-core
pip install swekit composio-core
```

2. **Install agentic framework of your choice and the Composio plugin for the same**:
Expand All @@ -41,7 +41,7 @@ Before getting started, ensure you have the following set up:
The agent requires a github access token to work with your repositories, You can create one at https://github.com/settings/tokens with necessary permissions and export it as an environment variable using `export GITHUB_ACCESS_TOKEN=<your_token>`

4. **LLM Configuration**:
You also need to setup API key for the LLM provider you're planning to use. By default the agents scaffolded by `composio-swe` uses `openai` client, so export `OPENAI_API_KEY` before running your agent
You also need to setup API key for the LLM provider you're planning to use. By default the agents scaffolded by `swekit` uses `openai` client, so export `OPENAI_API_KEY` before running your agent

## Getting Started

Expand All @@ -50,7 +50,7 @@ Before getting started, ensure you have the following set up:
1. Scaffold your agent using:

```
composio-swe scaffold crewai -o <path>
swekit scaffold crewai -o <path>
```

This creates a new agent in `<path>/agent` with four key files:
Expand Down
1 change: 0 additions & 1 deletion python/swe/composio_swe/__init__.py

This file was deleted.

1 change: 0 additions & 1 deletion python/swe/composio_swe/agents/__init__.py

This file was deleted.

Loading

0 comments on commit 78525d6

Please sign in to comment.