-
Notifications
You must be signed in to change notification settings - Fork 157
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
Frontend enabling work #26
Open
foolishsailor
wants to merge
37
commits into
eumemic:master
Choose a base branch
from
foolishsailor:feInitialSetup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ca8b4e7
move existing repo to agents folder and update devops
foolishsailor 466ab7b
initial project
foolishsailor a8e73b3
proof of concept and tooling
foolishsailor 46218a0
proof of concept and tooling done
foolishsailor 62f6a55
added readme
foolishsailor cc7a0b7
added reflecting and decision dialogue to bus
foolishsailor e682c5d
added reflecting and decision dialogue to bus
foolishsailor d073356
added reflecting and decision dialogue to bus
foolishsailor f046ad7
added agent split components
foolishsailor 4dd036f
WIP
foolishsailor 6202139
added ability to send messages
foolishsailor da3a32f
touch up css
foolishsailor 901fcdd
refactorFE to best practice, tidy up css and add scroll to end for ag…
foolishsailor 2591a00
fix type in yml
foolishsailor 5afe5b2
fix yml directories for repos
foolishsailor b74929a
added default directories to jobs
foolishsailor 664c72e
small fix to agent height calc
foolishsailor 1fdaaf6
last css fix
foolishsailor 79d1a58
fix indent in yml
foolishsailor ce53407
setup basic testing infra
foolishsailor 1657a4d
finish infra for testing and add linting
foolishsailor d8dd64c
allow warnings
foolishsailor 40324df
remove unsupported node for FE
foolishsailor cdbc189
remove fe from repo
foolishsailor caeb513
merge conflict
foolishsailor 11d1af5
revert github actions back to old version
foolishsailor e2f74c2
new package.lock generated
foolishsailor 39396c8
remove old working directory in yml
foolishsailor 77eb392
change to node 14 lowest supported
foolishsailor 8fa2be1
added help and test to console parameters to allow testing agents mes…
foolishsailor 34fb6d2
updated readme
foolishsailor 7ec2370
add test flag to web socket server
foolishsailor ec247a7
fix lint issue
foolishsailor 9cbe954
prResponse
foolishsailor b7e2a70
revert github actions
foolishsailor 1dafb41
lint, test, format
foolishsailor 2baeaed
removed the test param from return of parameters
foolishsailor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
node_modules | ||
dist | ||
.env | ||
.store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
[ | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "spontaneous", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"1" | ||
], | ||
"content": "Several events are omitted here to free up space in your context window, summarized as follows:\n\nYou received a message from Control asking for the temperature in San Diego. You used the `searchWeb` action to search for the current temperature in San Diego, but the search results did not provide a clear answer. You then used the `searchWeb` action again to search for the temperature in San Diego right now, and found several websites that provided the current temperature." | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "readPage\nthoughts: I can use this action to read a summary of a web page in markdown format.\nurl: https://www.accuweather.com/en/us/san-diego/92101/current-weather/347628" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "ok", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"1" | ||
], | ||
"content": "Here is a summarized markdown version of the page, in a series of summarized chunks:\n\n=== SUMMARIZED CHUNK (61 tokens) ===\n\nUnfortunately, the requested webpage is not available at the provided link. Access to the page has been denied as you do not have the required permissions to view it. The reference number 18.ae9bd817.1681485635.26537847 can be used for further troubleshooting if required.\n\n" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "searchWeb\nthoughts: I can use this action to search the web for information.\nsearchString: temperature in San Diego right now accuweather" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "ok", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"1" | ||
], | ||
"content": "Search results:\n\n- Title: \"San Diego, CA Weather Forecast | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/weather-forecast/347628\n\n- Title: \"San Diego, CA Daily Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/daily-weather-forecast/347628\n\n- Title: \"San Diego, CA Hourly Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/hourly-weather-forecast/347628\n\n- Title: \"San Diego, CA Current Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/current-weather/347628\n\n- Title: \"San Antonio, TX Weather Forecast | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-antonio/78205/weather-forecast/351198\n\n- Title: \"San Diego, CA Weather Radar | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/weather-radar/347628\n\n- Title: \"San Antonio, TX Current Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-antonio/78205/current-weather/351198\n\n- Title: \"San Diego, CA Monthly Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/february-weather/347628\n\n- Title: \"San Diego, CA Satellite Weather Map | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/satellite/347628\n\n- Title: \"San Diego, TX Weather Forecast | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/78384/weather-forecast/335877" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "readPage\nthoughts: I can use this action to read a summary of the current weather in San Diego.\nurl: https://www.accuweather.com/en/us/san-diego/92101/current-weather/347628" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "ok", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"1" | ||
], | ||
"content": "Here is a summarized markdown version of the page, in a series of summarized chunks:\n\n=== SUMMARIZED CHUNK (78 tokens) ===\n\nUnfortunately, you don't have permission to access the webpage \"http://www.accuweather.com/en/us/san-diego/92101/current-weather/347628\" at this time. The server is denying your access with the error message \"Reference #18.ae9bd817.1681485653.2654409a\".\n\n" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "searchWeb\nthoughts: I can try searching for the temperature in San Diego using a different search engine.\nsearchString: temperature in San Diego right now" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "ok", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"1" | ||
], | ||
"content": "Search results:\n\n- Title: \"San Diego, CA Current Weather | AccuWeather\"\n URL: https://www.accuweather.com/en/us/san-diego/92101/current-weather/347628\n\n- Title: \"San Diego, CA 10-Day Weather Forecast - The Weather Channel ...\"\n URL: https://weather.com/weather/tenday/l/San+Diego+CA?canonicalCityId=cb5c473781cc06501376639dce8f0823a99187dcb42c79471a4303c076d66452\n\n- Title: \"Weather for San Diego, California, USA\"\n URL: https://www.timeanddate.com/weather/usa/san-diego\n\n- Title: \"San Diego 7-Day Weather Forecast | FOX 5 San Diego\"\n URL: https://fox5sandiego.com/weather/forecast/\n\n- Title: \"San Diego, CA\"\n URL: https://www.weather.gov/sgx/\n\n- Title: \"Zone Area Forecast for San Diego County Inland Valleys\"\n URL: https://forecast.weather.gov/MapClick.php?zoneid=CAZ050\n\n- Title: \"San Diego, CA Weather Conditions | Weather Underground\"\n URL: https://www.wunderground.com/weather/us/ca/san-diego\n\n- Title: \"Zone Area Forecast for San Diego County Coastal Areas\"\n URL: https://forecast.weather.gov/MapClick.php?zoneid=CAZ043\n\n- Title: \"Water temperature in San Diego in Pacific Ocean now\"\n URL: https://seatemperature.net/current/united-states/san-diego-california-united-states-sea-temperature\n\n- Title: \"San Diego, CA - Current Weather - The Weather Network\"\n URL: https://www.theweathernetwork.com/us/weather/california/san-diego" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "readPage\nthoughts: I can use this action to read a summary of the current weather in San Diego from The Weather Channel website.\nurl: https://weather.com/weather/today/l/32.72,-117.16?par=google&temp=f" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "agentToAgent", | ||
"source": { | ||
"type": "agent", | ||
"id": "0" | ||
}, | ||
"targetAgentIds": [ | ||
"1", | ||
"2" | ||
], | ||
"content": "how heavy is the earth" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "searchWeb\nthoughts: I can use this action to search the web for information.\nsearchString: weight of the earth" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
[ | ||
{ | ||
"type": "decision", | ||
"actionText": "noop" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "agentToAgent", | ||
"source": { | ||
"type": "agent", | ||
"id": "0" | ||
}, | ||
"targetAgentIds": [ | ||
"1", | ||
"2" | ||
], | ||
"content": "how heavy is the earth" | ||
} | ||
}, | ||
{ | ||
"type": "decision", | ||
"actionText": "searchWeb\nthoughts: I can search the web to find the answer to this question.\nquery: how heavy is the earth?" | ||
}, | ||
{ | ||
"type": "message", | ||
"message": { | ||
"type": "error", | ||
"source": { | ||
"type": "system" | ||
}, | ||
"targetAgentIds": [ | ||
"2" | ||
], | ||
"content": "Missing required parameter `searchString`. Usage:\n\n```\nsearchWeb\nthoughts: <reasoning behind this action> (optional)\nsearchString: <the string to search for>\n```" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
.env | ||
.store |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
### Install | ||
|
||
``` | ||
npm install | ||
``` | ||
|
||
### Configure | ||
|
||
Create a `.env` file at the root of the project and add your secrets to it: | ||
|
||
``` | ||
OPENAI_API_KEY=... # obtain from https://platform.openai.com/account/api-keys | ||
# the following are needed for the agent to be able to search the web: | ||
GOOGLE_SEARCH_ENGINE_ID=... # create a custom search engine at https://cse.google.com/cse/all | ||
GOOGLE_API_KEY=... # obtain from https://console.cloud.google.com/apis/credentials | ||
``` | ||
|
||
You'll also need to enable the Google Custom Search API for your Google Cloud account, e.g. <https://console.cloud.google.com/apis/library/customsearch.googleapis.com> | ||
|
||
## Run | ||
|
||
Start the program: | ||
|
||
``` | ||
npm run start [# of agents] [gpt-3.5-turbo|gpt-4] | ||
``` | ||
|
||
Interact with the agents through the console. Anything you type will be sent as a message to all agents currently. | ||
|
||
### Agent state | ||
|
||
Each agent stores its state under the `.store` directory. Agent 1, for example has | ||
|
||
``` | ||
.store/1/memory | ||
.store/1/goals | ||
.store/1/notes | ||
``` | ||
|
||
You can simply delete any of these things, or the whole agent folder (or the whole `.store`) to selectively wipe whatever state you want between runs. Otherwise agents will pick up where you left off on restart. | ||
|
||
A nice aspect of this is that when you want to debug a problem you ran into with a particular agent, you can delete the events in their memory subsequent to the point where the problem occurred, make changes to the code, and restart them to effectively replay that moment until you've fixed the bug. You can also ask an agent to implement a feature, and once they've done so you can restart, tell them that you've loaded the feature and ask them to try it out. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will revert