Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main to dev sync #1139

Merged
merged 16 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
48 changes: 18 additions & 30 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@


<p align="center">
<a href="https://superagi.com"> <img src="https://superagi.com/wp-content/uploads/2023/07/Website.svg"></a>
<a href="https://superagi.com"> <img src="https://superagi.com/wp-content/uploads/2023/08/Website.svg"></a>
<a href="https://app.superagi.com"> <img src="https://superagi.com/wp-content/uploads/2023/07/Cloud.svg"></a>
<a href="https://marketplace.superagi.com/"> <img src="https://superagi.com/wp-content/uploads/2023/07/Marketplace.svg"></a>
<a href="https://marketplace.superagi.com/"> <img src="https://superagi.com/wp-content/uploads/2023/08/Marketplace.svg"></a>
<a href="https://marketplace.superagi.com/"> <img src="https://superagi.com/wp-content/uploads/2023/08/Docs.svg"></a>
</p>

<p align="center">
Expand Down Expand Up @@ -75,14 +76,15 @@

<hr>

## 📽 Demo Video Showcasing SuperCoder (A SuperAGI agent template)
## 📽 Setting Up SuperAGI using Docker Hub

[Demo Video](https://github.com/Akki-jain/test/assets/92881074/bb18407a-b6b2-4a9f-9419-ec73ffacd2f8)
<p align="center">
<a href='https://youtu.be/qjJneWjH5v4'><img src="https://superagi.com/wp-content/uploads/2023/08/DockerHub_install-1.png" width=1000px></a>
</p>

This video demonstrates how SuperCoder can be used to create simple applications like a personal finance calculator.

<p align="center">
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=640182997&machine=basicLinux32gb&location=EastUs"> <img src="https://github.com/codespaces/badge.svg"></a><br>Not sure how to setup? <a href="https://youtu.be/iSPHZ1onQ44">Learn here</a>
<a href="https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=640182997&machine=basicLinux32gb&location=EastUs"> <img src="https://github.com/codespaces/badge.svg"></a><br>Not sure how to setup? <a href="https://youtu.be/yvmNthyWYCE">Learn here</a>
</p>


Expand All @@ -94,39 +96,26 @@ This video demonstrates how SuperCoder can be used to create simple applications
- Graphical User Interface
- Action Console
- Multiple Vector DBs
- Multi-Modal Agents
- Agent Trajectory Fine-Tuning
- Performance Telemetry
- Optimized Token Usage
- Performance Monitoring
- Agent Memory Storage
- Looping Detection Heuristics
- Concurrent Agents
- Resource Manager

## 🛠 Tools
<a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113609.png height=50px width=50px alt="Slack" valign="middle" title="Slack"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113612.png height=50px width=50px alt="Email" valign="middle" title="Email"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/07/Group-113647.png height=50px width=50px alt="Twitter" valign="middle" title="Twitter"> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113610.png height=50px width=50px alt="Jira" valign="middle" title="Jira"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113611.png height=50px width=50px alt="File Manager" valign="middle" title="File Manager"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113613.png height=50px width=50px alt="Google Search" valign="middle" title="Google Search"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113615.png height=50px width=50px alt="Dall-E" valign="middle" title="Dall-E"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113614.png height=50px width=50px alt="Github" valign="middle" title="Github"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113616.png height=50px width=50px alt="Web Interaction" valign="middle" title="Web Interaction"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113617.png height=50px width=50px alt="Zapier" valign="middle" title="Zapier"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113618.png height=50px width=50px alt="Instagram" valign="middle" title="Instagram"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113619.png height=50px width=50px alt="Trello" valign="middle" title="Trello"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113620.png height=50px width=50px alt="Google Analytics" valign="middle" title="Google Analytics"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113622.png height=50px width=50px alt="Duckduckgo" valign="middle" title="Duckduckgo"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113621.png height=50px width=50px alt="Discord" valign="middle" title="Discord">
<a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Twitter.png height=50px width=50px alt="Twitter" valign="middle" title="Twitter"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Coding.png height=50px width=50px alt="Coding Tool" valign="middle" title="Coding Tool"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Insta.png height=50px width=50px alt="Instagram" valign="middle" title="Instagram"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Knowledge_tool.png height=50px width=50px alt="Knowledge Search" valign="middle" title="Knowledge Search"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113612.png height=50px width=50px alt="Email" valign="middle" title="Email"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113610.png height=50px width=50px alt="Jira" valign="middle" title="Jira"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113611.png height=50px width=50px alt="File Manager" valign="middle" title="File Manager"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113613.png height=50px width=50px alt="Google Search" valign="middle" title="Google Search"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113615.png height=50px width=50px alt="Dall-E" valign="middle" title="Dall-E"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113614.png height=50px width=50px alt="Github" valign="middle" title="Github"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113616.png height=50px width=50px alt="Web Interaction" valign="middle" title="Web Interaction"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/05/Group-113622.png height=50px width=50px alt="Duckduckgo" valign="middle" title="Duckduckgo"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Calendar_tool.png height=50px width=50px alt="Google Calendar" valign="middle" title="Google Calendar"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Search_tool.png height=50px width=50px alt="Google Calendar" valign="middle" title="Google Search"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Serp.png height=50px width=50px alt="Serp API" valign="middle" title="Serp API"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Searx.png height=50px width=50px alt="Searx" valign="middle" title="Searx "></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Web_scraper_logo.png height=50px width=50px alt="Web Scraper" valign="middle" title="Web Scraper"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Notion_logo.png height=50px width=50px alt="Notion" valign="middle" title="Notion"></a> <a href="#"><img src=https://superagi.com/wp-content/uploads/2023/08/Apollo_logo.png height=50px width=50px alt="Apollo" valign="middle" title="Apollo"></a>


## 💻 Screenshots

[//]: # (**CLI View**)

[//]: # (![CLI]&#40;https://superagi.co/wp-content/uploads/2023/05/CLI.png&#41;)

**GUI**

<p align="center">
<a href="https://superagi.com//#gh-light-mode-only">
<img src="https://superagi.com/wp-content/uploads/2023/05/Light-dashboard.png" alt="SuperAGI logo" />
</a>
<a href="https://superagi.com//#gh-dark-mode-only">
<img src="https://superagi.com/wp-content/uploads/2023/05/Dark-Dashboard.png" alt="SuperAGI logo" />
</a>
</p>


## 🛣 Roadmap
[Click here to checkout the latest roadmap 🔗](https://github.com/users/TransformerOptimus/projects/1)
[Click here to checkout the latest roadmap 🔗](https://github.com/users/TransformerOptimus/projects/5/views/1)


<a id="architecture">
Expand Down Expand Up @@ -187,14 +176,6 @@ This video demonstrates how SuperCoder can be used to create simple applications
## ⚠️ Under Development!
This project is under active development and may still have issues. We appreciate your understanding and patience. If you encounter any problems, please first check the open issues. If your issue is not listed, kindly create a new issue detailing the error or problem you experienced. Thank you for your support!

## 📽 Curated Videos

|-|
|--|
|[GitHub Codespaces](https://youtu.be/iSPHZ1onQ44)|
|[Windows/MacOS/Linux](https://youtu.be/Unj5NLNTkLY)|
[GUI Walkthrough](https://youtu.be/7FXESG6BOgw)|
[Research Usecase](https://youtu.be/LfZ6T8XP-Q0)|

## 👩‍💻 Contributors
[![TransformerOptimus](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/133493246?v=4&w=50&h=50&mask=circle)](https://github.com/TransformerOptimus) [![Cptsnowcrasher](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/133322218?v=4&w=50&h=50&mask=circle)](https://github.com/Cptsnowcrasher) [![vectorcrow](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/133646556?v=4&w=50&h=50&mask=circle)](https://github.com/vectorcrow) [![Akki-jain](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/92881074?v=4&w=50&h=50&mask=circle)](https://github.com/Akki-jain) [![Autocop-Agent](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/129729746?v=4&w=50&h=50&mask=circle)](https://github.com/Autocop-Agent)[![COLONAYUSH](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/60507126?v=4&w=50&h=50&mask=circle)](https://github.com/COLONAYUSH)[![luciferlinx101](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/129729795?v=4&w=50&h=50&mask=circle)](https://github.com/luciferlinx101)[![mukundans89](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/101278493?v=4&w=50&h=50&mask=circle)](https://github.com/mukundans89)[![Fluder-Paradyne](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/121793617?v=4&w=50&h=50&mask=circle)](https://github.com/Fluder-Paradyne)[![nborthy](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/101320057?v=4&w=50&h=50&mask=circle)](https://github.com/nborthy)[![nihirr](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/122777244?v=4&w=50&h=50&mask=circle)](https://github.com/nihirr)[![Tarraann](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/97586318?v=4&w=50&h=50&mask=circle)](https://github.com/Tarraann)[![neelayan7](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/43145646?v=4&w=50&h=50&mask=circle)](https://github.com/neelayan7)[![Arkajit-Datta](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/61142632?v=4&w=50&h=50&mask=circle)](https://github.com/Arkajit-Datta)[![guangchen811](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/103159823?v=4&w=50&h=50&mask=circle)](https://github.com/guangchen811)[![juanfpo96](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/14787156?v=4&w=50&h=50&mask=circle)](https://github.com/juanfpo96)[![iskandarreza](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/32027019?v=4&w=50&h=50&mask=circle)](https://github.com/iskandarreza)[![jpenalbae](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8380459?v=4&w=50&h=50&mask=circle)](https://github.com/jpenalbae)[![pallasite99](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/26508636?v=4&w=50&h=50&mask=circle)](https://github.com/pallasite99)[![xutpuu](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11964505?v=4&w=50&h=50&mask=circle)](https://github.com/xutpuu)[![alexkreidler](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11166947?v=4&w=50&h=50&mask=circle)](https://github.com/alexkreidler)[![hanhyalex123](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/100895608?v=4&w=50&h=50&mask=circle)](https://github.com/hanhyalex123)[![ps4vs](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/91535358?v=4&w=50&h=50&mask=circle)](https://github.com/ps4vs)[![eltociear](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/22633385?v=4&w=50&h=50&mask=circle)](https://github.com/eltociear)
Expand All @@ -214,6 +195,13 @@ This project is under active development and may still have issues. We appreciat
[![JPDucky](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/34105363?v=4&w=50&h=50&mask=circle)](https://github.com/JPDucky)
[![Vibhusha22](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/128478691?v=4&w=50&h=50&mask=circle)](https://github.com/Vibhusha22)
[![ai-akuma](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7444521?v=4&w=50&h=50&mask=circle)](https://github.com/ai-akuma)
[![rounak610](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/81288115?v=4&w=50&h=50&mask=circle)](https://github.com/rounak610)
[![AdarshJha619](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/53672264?v=4&w=50&h=50&mask=circle)](https://github.com/AdarshJha619)
[![ResoluteStoic](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/105219157?v=4&w=50&h=50&mask=circle)](https://github.com/ResoluteStoic)
[![JohnHunt999](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/137149331?v=4&w=50&h=50&mask=circle)](https://github.com/JohnHunt999)
[![Maverick-F35](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/138012351?v=4&w=50&h=50&mask=circle)](https://github.com/Maverick-F359)
[![PaulRBerg](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8782666?v=4&w=50&h=50&mask=circle)](https://github.com/PaulRBerg)
[![jorgectf](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/46056498?v=4&w=50&h=50&mask=circle)](https://github.com/jorgectf)


<p align="center"><a href="https://github.com/TransformerOptimus/SuperAGI#"><img src="https://superagi.com/wp-content/uploads/2023/05/backToTopButton.png" alt="Back to top" height="29"/></a></p>
2 changes: 1 addition & 1 deletion gui/pages/Content/Agents/ActivityFeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
useEffect(() => {
const interval = window.setInterval(function () {
fetchFeeds();
}, 10000);
}, 5000);

return () => clearInterval(interval);
}, [selectedRunId]);
Expand Down
2 changes: 1 addition & 1 deletion superagi/agent/tool_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@
if tool.name == "QueryResourceTool":
tool.description = tool.description.replace("{summary}", resource_summary)

return tool
return tool

Check warning on line 123 in superagi/agent/tool_builder.py

View check run for this annotation

Codecov / codecov/patch

superagi/agent/tool_builder.py#L123

Added line #L123 was not covered by tests
4 changes: 2 additions & 2 deletions superagi/controllers/api/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
api_key: str = Security(validate_api_key), organisation:Organisation = Depends(get_organisation_from_api_key)):
project=Project.find_by_org_id(db.session, organisation.id)
try:
tools_arr=Toolkit.get_tool_and_toolkit_arr(db.session,agent_with_config.tools)
tools_arr=Toolkit.get_tool_and_toolkit_arr(db.session,organisation.id,agent_with_config.tools)

Check warning on line 60 in superagi/controllers/api/agent.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/api/agent.py#L60

Added line #L60 was not covered by tests
except Exception as e:
raise HTTPException(status_code=404, detail=str(e))

Expand Down Expand Up @@ -177,7 +177,7 @@
raise HTTPException(status_code=409, detail="Agent is already scheduled,cannot update")

try:
tools_arr=Toolkit.get_tool_and_toolkit_arr(db.session,agent_with_config.tools)
tools_arr=Toolkit.get_tool_and_toolkit_arr(db.session,organisation.id,agent_with_config.tools)

Check warning on line 180 in superagi/controllers/api/agent.py

View check run for this annotation

Codecov / codecov/patch

superagi/controllers/api/agent.py#L180

Added line #L180 was not covered by tests
except Exception as e:
raise HTTPException(status_code=404,detail=str(e))

Expand Down
2 changes: 1 addition & 1 deletion superagi/jobs/agent_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
logger.info("Agent Execution is completed or waiting for permission")
session.close()
return
superagi.worker.execute_agent.apply_async((agent_execution_id, datetime.now()), countdown=10)
superagi.worker.execute_agent.apply_async((agent_execution_id, datetime.now()), countdown=2)

Check warning on line 102 in superagi/jobs/agent_executor.py

View check run for this annotation

Codecov / codecov/patch

superagi/jobs/agent_executor.py#L102

Added line #L102 was not covered by tests
# superagi.worker.execute_agent.delay(agent_execution_id, datetime.now())
finally:
session.close()
Expand Down
4 changes: 2 additions & 2 deletions superagi/models/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ def fetch_tool_ids_from_toolkit(cls, session, toolkit_ids):
return agent_toolkit_tools

@classmethod
def get_tool_and_toolkit_arr(cls, session, agent_config_tools_arr: list):
def get_tool_and_toolkit_arr(cls, session, organisation_id :int,agent_config_tools_arr: list):
from superagi.models.tool import Tool
toolkits_arr= set()
tools_arr= set()
for tool_obj in agent_config_tools_arr:
toolkit=session.query(Toolkit).filter(Toolkit.name == tool_obj["name"].strip()).first()
toolkit=session.query(Toolkit).filter(Toolkit.name == tool_obj["name"].strip(), Toolkit.organisation_id == organisation_id).first()
if toolkit is None:
raise Exception("One or more of the Tool(s)/Toolkit(s) does not exist.")
toolkits_arr.add(toolkit.id)
Expand Down
5 changes: 3 additions & 2 deletions tests/unit_tests/controllers/test_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import pytest
from fastapi.testclient import TestClient
from superagi.types.key_type import ToolConfigKeyType

from main import app
from superagi.models.organisation import Organisation
from superagi.models.tool import Tool
from superagi.models.tool_config import ToolConfig
from superagi.types.key_type import ToolConfigKeyType
from superagi.models.toolkit import Toolkit

client = TestClient(app)
Expand Down Expand Up @@ -87,7 +88,6 @@ def mock_toolkit_details():
{
"key": "config_key_1",
"value": "config_value_1",
"value": "config_value_1",
'key_type': ToolConfigKeyType.STRING,
'is_secret': True,
'is_required': False
Expand All @@ -98,6 +98,7 @@ def mock_toolkit_details():
'key_type': ToolConfigKeyType.FILE,
'is_secret': True,
'is_required': False

}
]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/models/test_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_get_tool_and_toolkit_arr_with_nonexistent_toolkit():

# Use a context manager to capture the raised exception and its message
with pytest.raises(Exception) as exc_info:
Toolkit.get_tool_and_toolkit_arr(session, agent_config_tools_arr)
Toolkit.get_tool_and_toolkit_arr(session,1, agent_config_tools_arr)

# Assert that the expected error message is contained within the raised exception message
expected_error_message = "One or more of the Tool(s)/Toolkit(s) does not exist."
Expand Down