Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
306 commits
Select commit Hold shift + click to select a range
e6571fc
updated unit testing workflow
Jun 29, 2023
4ccf0ad
tools not accessed
Jun 29, 2023
143f549
documentation
Jun 29, 2023
bc0a736
usage
Jun 29, 2023
589d4e1
whisper x tool
Jun 29, 2023
38a3faa
tools clean up config
Jun 29, 2023
121f5f9
swarming banner
Jun 29, 2023
fc507cc
tools from langchain
Jun 30, 2023
56f9aad
clean up
Jun 30, 2023
d07cbbc
very weird formatting error
Jun 30, 2023
8b3dc2b
clean up
Jun 30, 2023
3f541cd
workerx
Jun 30, 2023
de6abeb
recrete examples
Jun 30, 2023
6ad29fb
init
Jun 30, 2023
b9b9bb7
updated usage
Jun 30, 2023
875dc67
env example
Jun 30, 2023
fbcc302
clean up
Jun 30, 2023
302965b
circular dependency issue
Jun 30, 2023
9ae296d
new verison
Jun 30, 2023
eb2dc24
new unit test yml
Jun 30, 2023
e0e50ac
unit test
Jun 30, 2023
35c1627
clean up
Jun 30, 2023
6ee5b37
name of file
Jun 30, 2023
ca8f02b
clean up
Jun 30, 2023
80e6305
set up py requirements.txt
Jun 30, 2023
349c907
clean up setup
Jun 30, 2023
e6b2c36
comma error
Jun 30, 2023
d0f143f
pippppppppp installllllllllllllll babbyyyyyyyyy
Jun 30, 2023
6f4b2b6
clean up
Jun 30, 2023
f10b2f5
otpimizations
Jun 30, 2023
84aa448
tree of thoughts prompting for worker
Jun 30, 2023
20bfe07
clean up + worker examples
Jun 30, 2023
6439cf5
math tool
Jun 30, 2023
678416a
organized tools
Jun 30, 2023
f8e8196
cleean up
Jun 30, 2023
5580ae3
clean up for init of main boss and worker classes
Jun 30, 2023
66ed76e
clean up
Jun 30, 2023
147045b
set up py
Jun 30, 2023
57310b1
example clean up
Jun 30, 2023
c7b0aa9
read me clean
Jun 30, 2023
c5289a8
clean up
Jun 30, 2023
e90562c
clean up swarms
Jun 30, 2023
0efe7f7
roadmap
Jun 30, 2023
781ebdb
clean up
Jun 30, 2023
2e6f4f8
clean up for unit test workflow'
Jun 30, 2023
e457809
whiserx mes
Jun 30, 2023
e2dba47
missed wrong pip name
Jun 30, 2023
a894633
wromg import name
Jun 30, 2023
5db93f5
swarms todo
Jun 30, 2023
6cc2779
test swarms clean up
Jun 30, 2023
9353332
inspiration
Jun 30, 2023
ad998df
clean up
Jun 30, 2023
207084f
inspiration
Jul 1, 2023
bdc9932
clean up file paths i suck at
Jul 3, 2023
c29fd77
v setup
Jul 3, 2023
9408bba
langchain level
Jul 3, 2023
962f109
clean up
Jul 3, 2023
12d224f
set up py
Jul 3, 2023
b919418
import module test
Jul 3, 2023
bdf5d87
testing
Jul 3, 2023
39ffd6a
clean up
Jul 3, 2023
09c7cf1
vit check
Jul 3, 2023
8f26ade
clean up
Jul 3, 2023
d81d71a
ui roadmap
Jul 3, 2023
ebd3d3e
clean up
Jul 3, 2023
094ccf8
clean up with init
Jul 4, 2023
0eb6e26
setup
Jul 4, 2023
9ef17e5
verison 0.1.6
Jul 4, 2023
5c7dd6a
clean up
Jul 4, 2023
18ad70a
swarms setup
Jul 4, 2023
ce9d17b
worker agent
Jul 4, 2023
1103ff2
clean up
Jul 4, 2023
91ca92a
new v
Jul 4, 2023
3898358
multimodal visual agent
Jul 4, 2023
0206f20
setup v
Jul 4, 2023
7e71016
clean up
Jul 4, 2023
6f0fb1e
verison setup
Jul 4, 2023
4b23afb
no dino
Jul 4, 2023
9aeb86b
new setup
Jul 4, 2023
267cca2
clean up
Jul 4, 2023
0116e44
roadmap
Jul 4, 2023
3e875f8
clean up
Jul 4, 2023
cc06171
clean up
Jul 4, 2023
94bdd05
test
Jul 4, 2023
27f322b
dependency links
Jul 4, 2023
3c2ed83
clean up
Jul 4, 2023
2c3adb7
clean up
Jul 4, 2023
7a60430
clean up
Jul 4, 2023
ef9df4a
2.8
Jul 4, 2023
6e82b71
imports
Jul 4, 2023
a21904e
verison
Jul 4, 2023
20d3526
clean up
Jul 4, 2023
4e904b1
clean up
Jul 4, 2023
5131f2b
relative imports
Jul 4, 2023
b338f63
clean up
Jul 4, 2023
7163180
clean up
Jul 4, 2023
d5d3547
verison
Jul 4, 2023
379b62b
clean up
Jul 4, 2023
6b03817
clean u[
Jul 4, 2023
edaeece
no multi modal agent tool
Jul 4, 2023
b48c967
clean u
Jul 4, 2023
baf5985
main swarms class
Jul 4, 2023
aedc595
clean up
Jul 4, 2023
f7e722e
clean u[
Jul 4, 2023
171809a
now commences tool clean up
Jul 4, 2023
b06d1e1
clean up file structure + example
Jul 4, 2023
332efa8
setup
Jul 4, 2023
6e587db
new vrison
Jul 4, 2023
fe952ea
clean up
Jul 4, 2023
ace9031
clean up
Jul 4, 2023
0200ce7
api logic
Jul 4, 2023
ac4ce99
clean up
Jul 4, 2023
2a9e911
setup py cleanup
Jul 4, 2023
ce3dd47
clean up
Jul 4, 2023
d0634ce
clean up
Jul 4, 2023
a0e83e7
example
Jul 4, 2023
067cdab
clean up
Jul 4, 2023
e87966c
foler re-architecture
Jul 4, 2023
6b9cdfe
clean up
Jul 4, 2023
36e861c
ansi
Jul 4, 2023
49185ea
clean up
Jul 4, 2023
2fcd8a0
git ignore
Jul 4, 2023
38ee859
ansi utils
Jul 4, 2023
7d9626b
clean u[
Jul 4, 2023
aaebb69
clean up
Jul 4, 2023
9246afa
clean up
Jul 4, 2023
d69e0fe
clean up
Jul 4, 2023
eea5f99
read me example
Jul 4, 2023
091ed07
clean upg
Jul 4, 2023
11a9f90
utils/ env cleanup
Jul 4, 2023
dc2eb19
clean up
Jul 4, 2023
ca3b30f
clean up
Jul 4, 2023
47be079
no ansi package
Jul 4, 2023
72f93d0
manifesto
Jul 4, 2023
3c49764
clean up
Jul 4, 2023
0fc60e7
clean up
Jul 4, 2023
7b35369
5.4
Jul 4, 2023
3a8ea68
readme
Jul 5, 2023
c92d5bd
clean up
Jul 5, 2023
0c469eb
clean up
Jul 5, 2023
2d42a74
clean up
Jul 5, 2023
8fcd2f6
clean up
Jul 5, 2023
e3d424c
clean up
Jul 5, 2023
56db73b
clean up
Jul 5, 2023
d175939
re-architecture with __init__ files
Jul 5, 2023
6db9b99
clean uo
Jul 5, 2023
499da70
utilities for contributing
Jul 5, 2023
fef21a9
clean up
Jul 5, 2023
332d72d
poetry
Jul 5, 2023
5825fe3
clean up
Jul 5, 2023
9d76466
clean up
Jul 5, 2023
733ac91
clean up
Jul 5, 2023
360a802
clean up
Jul 5, 2023
6ad7907
cleaan up
Jul 5, 2023
950c56c
clean up
Jul 5, 2023
d7dcfb8
clean up
Jul 5, 2023
5ba72b9
clean up pillow
Jul 5, 2023
db4a780
clean up
Jul 5, 2023
e71c50c
git push
Jul 5, 2023
ff3564e
clean up tool
Jul 5, 2023
1a9a26e
clean up
Jul 5, 2023
106fafc
clean up
Jul 5, 2023
abc6a7c
chatopenai
Jul 5, 2023
62739a1
clean up
Jul 5, 2023
c6d93d7
clean up
Jul 5, 2023
b00f9ee
clean up
Jul 5, 2023
6438ba8
clean up
Jul 5, 2023
cbcc799
clean up
Jul 5, 2023
f605e6d
clean up
Jul 5, 2023
8e7c279
clean up
Jul 5, 2023
55e0762
clean up
Jul 5, 2023
13185b1
clean up
Jul 5, 2023
4a72039
clean up
Jul 5, 2023
beac3a4
clean up
Jul 5, 2023
7bfce2b
clean up
Jul 5, 2023
a88403b
clean up
Jul 5, 2023
9ced5d2
meaningless
Jul 5, 2023
ab24ecb
clean up
Jul 5, 2023
0819411
clean up
Jul 5, 2023
19c1971
vectorstore
Jul 5, 2023
47adbe8
clean up
Jul 5, 2023
22fee22
workernode
Jul 5, 2023
52d689a
clean up
Jul 5, 2023
f091cc4
clean upg
Jul 5, 2023
760a747
clean up
Jul 5, 2023
388eca8
wrong push
Jul 5, 2023
ea74d21
clean up
Jul 5, 2023
efffb0c
clean up
Jul 5, 2023
8559ce3
clean up tools
Jul 5, 2023
3018a14
tools
Jul 5, 2023
a75bd9d
no terminals
Jul 5, 2023
bc63c07
clean up tools
Jul 5, 2023
44590f9
clean up tools
Jul 5, 2023
20d9488
clean up
Jul 5, 2023
306b8ff
tool
Jul 5, 2023
af40e46
swarms
Jul 5, 2023
1d6bf5e
clean up
Jul 5, 2023
a128b0b
tools
Jul 5, 2023
88a50e6
goal
Jul 5, 2023
94beff2
clean up
Jul 5, 2023
7b2a113
clean up
Jul 5, 2023
96b9ed1
clean up
Jul 5, 2023
ca3fdb0
clean up auto agent
Jul 5, 2023
566b85e
file paths
Jul 5, 2023
26dc656
file path
Jul 5, 2023
2c00c67
file path errors
Jul 5, 2023
9f9c53b
massive clean up
Jul 5, 2023
11c849a
workernode re-creation
Jul 5, 2023
7758c65
prompts
Jul 5, 2023
9820749
no module named tools
Jul 5, 2023
2b852ad
swarms object has no attribute initworker
Jul 5, 2023
b0fb5ab
worker object has no field
Jul 5, 2023
1774fe2
workernode
Jul 5, 2023
2af7fab
commit error
Jul 5, 2023
bd41be5
clean up
Jul 5, 2023
3fbb202
worker node error
Jul 5, 2023
97dafa7
test
Jul 5, 2023
2a19770
doc string
Jul 5, 2023
2b7d620
worker node tool langchain setup
Jul 5, 2023
78deded
clean up workernode
Jul 5, 2023
5058acb
clean up init
Jul 5, 2023
80750a3
init test
Jul 5, 2023
0e70d1e
run swarms
Jul 5, 2023
7d612b6
base tool test
Jul 5, 2023
e584032
worker init
Jul 5, 2023
fe3baa5
worker init method
Jul 5, 2023
c0b79c0
name and descriptiona dded to swarms class
Jul 5, 2023
c936aaa
workernode is inited with llm tools and vectorstoe
Jul 5, 2023
0966bce
clean up
Jul 5, 2023
920697c
workernode cleanup
Jul 5, 2023
a588ff1
clean up
Jul 5, 2023
e8fffe1
weird init stuff
Jul 5, 2023
dfc37c6
weird init stuff
Jul 5, 2023
e83da49
clean up
Jul 5, 2023
ecbb1a1
clean up tool logic
Jul 5, 2023
4402367
example
Jul 6, 2023
a902953
omni worker agent
Jul 6, 2023
ca37c65
docstring
Jul 6, 2023
a9838e6
omni agent clean up
Jul 6, 2023
1468dd0
worker of worker poor omni
Jul 6, 2023
df2e469
swarms
Jul 6, 2023
9a4d748
omni agent added to swarm classs
Jul 6, 2023
ef2ae6d
clean up
Jul 6, 2023
2eb0751
groundingdino import
Jul 6, 2023
1a2452f
Open-interpreter
ZackBradshaw Oct 18, 2023
9f7b8e2
feat: Add open-sourcerer
ZackBradshaw Oct 18, 2023
ed5c8ee
Add Leonidias and Open-Interpreter
ZackBradshaw Oct 18, 2023
b4245f8
restored missing sync files
hughiwnl Nov 17, 2025
88e3a36
Merge remote-tracking branch 'upstream/master'
hughiwnl Nov 17, 2025
c8fed4f
added tests for custom_agent
hughiwnl Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
__pycache__
.venv
32 changes: 32 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

env:
POETRY_VERSION: "1.4.2"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
test_type:
- "core"
- "extended"
name: Python ${{ matrix.python-version }} ${{ matrix.test_type }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: "./.github/actions/poetry_setup"
with:
python-version: ${{ matrix.python-version }}
poetry-version: "1.4.2"
cache-key: ${{ matrix.test_type }}
install-command: |
if [ "${{ matrix.test_type }}" == "core" ]; then
echo "Running core tests, installing dependencies with poetry..."
poetry install
else
echo "Running extended tests, installing dependencies with poetry..."
poetry install -E extended_testing
fi
- name: Run ${{matrix.test_type}} tests
run: |
if [ "${{ matrix.test_type }}" == "core" ]; then
make test
else
make extended_tests
fi
shell: bash
45 changes: 45 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run Python unit tests
run: python3 -m unittest tests/swarms

- name: Verify that the Docker image for the action builds
run: docker build . --file Dockerfile

- name: Integration test 1
uses: ./
with:
input-one: something
input-two: true

- name: Integration test 2
uses: ./
with:
input-one: something else
input-two: false

- name: Verify integration test results
run: python3 -m unittest unittesting/swarms
75 changes: 75 additions & 0 deletions DOCS/DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Swarms Documentation

## Overview
The Swarm module includes the implementation of two classes, `WorkerNode` and `BossNode`, which respectively represent a worker agent and a boss agent. A worker agent is responsible for completing given tasks, while a boss agent is responsible for creating and managing tasks for the worker agent(s).

## Key Classes

### WorkerNode
```python
class WorkerNode:
```

The WorkerNode class represents an autonomous worker agent that can perform a range of tasks.

__Methods__:

- `create_agent(ai_name: str, ai_role: str, human_in_the_loop: bool, search_kwargs: dict) -> None`:

This method creates a new autonomous agent that can complete tasks. The agent utilizes several tools such as search engines, a file writer/reader, and a multi-modal visual tool.
The agent's configuration is customizable through the method parameters.

```python
# Example usage
worker_node = WorkerNode(llm, tools, vectorstore)
worker_node.create_agent('test_agent', 'test_role', False, {})
```

- `run_agent(prompt: str) -> None`:

This method runs the agent on a given task, defined by the `prompt` parameter.

```python
# Example usage
worker_node = WorkerNode(llm, tools, vectorstore)
worker_node.create_agent('test_agent', 'test_role', False, {})
worker_node.run_agent('Calculate the square root of 144.')
```

### BossNode
```python
class BossNode:
```

The BossNode class represents a manager agent that can create tasks and control the execution of these tasks.

__Methods__:

- `create_task(objective: str) -> dict`:

This method creates a new task based on the provided `objective`. The created task is a dictionary with the objective as its value.

```python
# Example usage
boss_node = BossNode(llm, vectorstore, task_execution_chain, False, 3)
task = boss_node.create_task('Find the square root of 144.')
```

- `execute_task(task: dict) -> None`:

This method triggers the execution of a given task.

```python
# Example usage
boss_node = BossNode(llm, vectorstore, task_execution_chain, False, 3)
task = boss_node.create_task('Find the square root of 144.')
boss_node.execute_task(task)
```

### Note

Before creating the WorkerNode and BossNode, make sure to initialize the lower level model (llm), tools, and vectorstore which are used as parameters in the constructors of the two classes.

In addition, the WorkerNode class uses the MultiModalVisualAgentTool which is a custom tool that enables the worker agent to run multi-modal visual tasks. Ensure that this tool is correctly initialized before running the WorkerNode.

This documentation provides an overview of the main functionalities of the Swarm module. For additional details and advanced functionalities, please review the source code and the accompanying comments.
Loading
Loading