Skip to content

Commit cb80fb1

Browse files
authored
Merge pull request #120 from MorpheusAIs/develop
0.2.1 main
2 parents 95b5b3b + cff90c4 commit cb80fb1

File tree

178 files changed

+36159
-2124
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+36159
-2124
lines changed

.flake8

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[flake8]
2+
max-line-length = 100
3+
max-complexity = 10
4+
exclude =
5+
.git,
6+
__pycache__,
7+
build,
8+
dist,
9+
*.egg-info,
10+
venv,
11+
.venv
12+
extend-ignore =
13+
# Black conflicts with E203 (whitespace before ':')
14+
E203,
15+
# Line break before binary operator (Black formats this way)
16+
W503,
17+
# Lambda assignments (used in routes)
18+
E731,
19+
# Bugbear errors that might cause recursion
20+
B023,
21+
# Ignore nested function definition
22+
B006,
23+
# Ignore missing docstring in public module/package/class/function/method
24+
D100,
25+
D101,
26+
D104,
27+
D102,
28+
D103,
29+
D105,
30+
D106,
31+
D107,
32+
33+
per-file-ignores =
34+
# Allow unused imports in __init__.py
35+
__init__.py: F401
36+
# Allow longer lines in config files
37+
config.py: E501
38+
39+
# Limit the plugins to avoid recursion issues
40+
enable-extensions = B
41+
42+
# Increased recursion depth adjustment for bugbear
43+
max-recursion-depth = 1000

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# .github/workflows/lint.yml
2+
name: Lint
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: 'recursive'
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: '20'
27+
28+
- name: Install Python linting dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install flake8 black isort
32+
pip install -r requirements.txt
33+
34+
- name: Run Python linters
35+
run: |
36+
black . --check
37+
isort . --check-only

.github/workflows/mor-agents-build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
local model=\$1
105105
local max_attempts=3
106106
local attempt=1
107-
107+
108108
while [ \$attempt -le \$max_attempts ]; do
109109
echo -e "\${YELLOW}Pulling Ollama model \$model (Attempt \$attempt)...${NC}"
110110
if ollama pull \$model; then
@@ -115,7 +115,7 @@ jobs:
115115
sleep 5
116116
attempt=\$((attempt + 1))
117117
done
118-
118+
119119
echo -e "\${RED}Failed to pull \$model after \$max_attempts attempts.${NC}"
120120
return 1
121121
}

.github/workflows/mor-agents-build-mac-arm.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,45 @@ on:
1010
jobs:
1111
build:
1212
runs-on: macos-latest
13-
13+
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:
1717
submodules: 'recursive'
18-
18+
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
2222
python-version: '3.12'
23-
23+
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install -r requirements.txt
2828
pip install pyinstaller
29-
29+
3030
- name: Build with PyInstaller
3131
run: |
3232
pyinstaller --windowed --name="MORagents" --icon="images/moragents.icns" --osx-entitlements-file "build_assets/macOS/MORagents.entitlements" main.py
33-
33+
3434
- name: Move .app to expected location
3535
run: |
3636
mv dist/MORagents.app build_assets/macOS/
37-
37+
3838
- name: Install Packages app
3939
run: |
4040
wget http://s.sudre.free.fr/files/Packages_1211_dev.dmg
4141
hdiutil attach Packages_1211_dev.dmg
4242
sudo installer -pkg /Volumes/Packages\ 1.2.11/packages/Packages.pkg -target /
4343
hdiutil detach /Volumes/Packages\ 1.2.11
44-
44+
4545
- name: Create installer package
4646
run: |
4747
cd build_assets/macOS
4848
/usr/local/bin/packagesbuild --verbose --project MorpheusPackagesSudre.pkgproj
49-
49+
5050
- name: Upload Installer
5151
uses: actions/upload-artifact@v4
5252
with:
5353
name: MORagentsSetup-macOS
54-
path: ./build_assets/macOS/MORAgentsInstaller.pkg
54+
path: ./build_assets/macOS/MORAgentsInstaller.pkg

.github/workflows/mor-agents-build-mac-intel.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,45 @@ on:
1010
jobs:
1111
build:
1212
runs-on: macos-latest
13-
13+
1414
steps:
1515
- uses: actions/checkout@v4
1616
with:
1717
submodules: 'recursive'
18-
18+
1919
- name: Set up Python
2020
uses: actions/setup-python@v5
2121
with:
2222
python-version: '3.12'
23-
23+
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install -r requirements.txt
2828
pip install pyinstaller
29-
29+
3030
- name: Build with PyInstaller
3131
run: |
3232
pyinstaller --windowed --name="MORagents" --icon="images/moragents.icns" --osx-entitlements-file "build_assets/macOS/MORagents.entitlements" main.py
33-
33+
3434
- name: Move .app to expected location
3535
run: |
3636
mv dist/MORagents.app build_assets/macOS/
37-
37+
3838
- name: Install Packages app
3939
run: |
4040
wget http://s.sudre.free.fr/files/Packages_1211_dev.dmg
4141
hdiutil attach Packages_1211_dev.dmg
4242
sudo installer -pkg /Volumes/Packages\ 1.2.11/packages/Packages.pkg -target /
4343
hdiutil detach /Volumes/Packages\ 1.2.11
44-
44+
4545
- name: Create installer package
4646
run: |
4747
cd build_assets/macOS
4848
/usr/local/bin/packagesbuild --verbose --project MorpheusPackagesSudreIntel.pkgproj
49-
49+
5050
- name: Upload Installer
5151
uses: actions/upload-artifact@v4
5252
with:
5353
name: MORagentsSetup-macOS
54-
path: ./build_assets/macOS/MORAgentsInstaller.pkg
54+
path: ./build_assets/macOS/MORAgentsInstaller.pkg

.github/workflows/mor-agents-build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
runs-on: windows-latest
13-
13+
1414
steps:
1515
- uses: actions/checkout@v4
1616

.github/workflows/security_scan.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ jobs:
3030
run: bandit -r . -f custom
3131
continue-on-error: true
3232
- name: Run Trivy vulnerability scanner
33-
uses: aquasecurity/trivy-action@0.20.0
33+
uses: aquasecurity/trivy-action@master
3434
with:
3535
scan-type: 'fs'
3636
ignore-unfixed: true
3737
format: 'sarif'
3838
output: 'trivy-results.sarif'
3939
severity: 'CRITICAL'
40+
scanners: 'vuln,secret,config'
4041
- name: Upload Trivy scan results
4142
uses: github/codeql-action/upload-sarif@v3
4243
with:
43-
sarif_file: 'trivy-results.sarif'
44+
sarif_file: 'trivy-results.sarif'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ resources/*
5656
## installer
5757
MORagentsWindowsInstaller
5858
MORagentsWindowsInstaller.zip
59+
build_assets/macOS/MORAgentsInstaller.pkg
5960

6061
## app
6162
MORagents.app
63+
64+
## lint
65+
.pytest_cache/

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-json
9+
- id: check-added-large-files
10+
- id: detect-private-key
11+
- id: check-merge-conflict
12+
13+
- repo: https://github.com/psf/black
14+
rev: 24.2.0
15+
hooks:
16+
- id: black
17+
language_version: python3.12
18+
19+
- repo: https://github.com/pycqa/isort
20+
rev: 5.13.2
21+
hooks:
22+
- id: isort

AGENTABILITIES.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# MORagents
2-
Welcome to the world of Web3 agents! If you're interested in building and using agents locally, this document will guide you through the principles and
2+
Welcome to the world of Web3 agents! If you're interested in building and using agents locally, this document will guide you through the principles and
33
current projects underway.
44

55
### Principles:
6-
1. **Agents cannot execute decisions**: Agents should not be given private keys or allowed to make transactions on their own. They can only construct transaction
6+
1. **Agents cannot execute decisions**: Agents should not be given private keys or allowed to make transactions on their own. They can only construct transaction
77
payloads for a user's approval. This is due to the limitations of current LLMs in understanding complex transactions and the risk of [gaslighting](https://arxiv.org/abs/2311.04235).
88
2. **Local installation**: Agents should run on the user's laptop, typically with 8-16 GB of RAM. This allows for faster execution and better performance.
9-
3. **No private keys**: Agents must not have access to private keys or be able to execute transactions independently. User's cryptographic approval is essential for any
9+
3. **No private keys**: Agents must not have access to private keys or be able to execute transactions independently. User's cryptographic approval is essential for any
1010
transaction.
1111

1212
### Current Projects:
13-
1. **lachsbagel on Discord** - [this repo](https://github.com/MorpheusAIs/moragents):
13+
1. **lachsbagel on Discord** - [this repo](https://github.com/MorpheusAIs/moragents):
1414
1. Architecture
1515
2. **IODmitri, SanatSharma, LachsBagel on GitHhub**
1616
1. [HideNSeek](https://github.com/MorpheusAIs/HideNSeek): An algorithm for verifying and fingerprinting which model a compute provider is actually running
@@ -25,10 +25,10 @@ transaction.
2525
4. CICD builds for Linux and macOS (apple and intel)
2626
5. Vulnerability scanning of dependencies and code
2727
4. GenLayer
28-
1. (pending) [FeedBuzz](https://github.com/yeagerai/feedbuzz-contracts) - AI filtered logging system to surface user demand and failure modes for new functionality
28+
1. (pending) [FeedBuzz](https://github.com/yeagerai/feedbuzz-contracts) - AI filtered logging system to surface user demand and failure modes for new functionality
2929
5. **CliffordAttractor on Discord** - Following Assume 16GB+ RAM:
3030
1. Developed a [price fetcher agent](submodules/moragents_dockers/agents/src/data_agent) using CoinGecko.
31-
2. A [web interface](submodules/moragents_dockers/frontend) which is served by the local Docker installation and integrated with Rainbow, enabling the use of MetaMask, WalletConnect, and other
31+
2. A [web interface](submodules/moragents_dockers/frontend) which is served by the local Docker installation and integrated with Rainbow, enabling the use of MetaMask, WalletConnect, and other
3232
EVM-based wallets.
3333
3. (NEEDS REFACTORING DUE TO 1INCH CHANGE) [Swap agent](submodules/moragents_dockers/agents/src/swap_agent) which can iteratively ask users to provide needed details for disambiguation.
3434
4. [General-purpose agent](https://github.com/MorpheusAIs/moragents/pull/34) that can ingest arbitrary documents, such as PDFs, for basic document QA and text generation.
@@ -57,7 +57,7 @@ Pending Lumerin's work. Eventually Agent Builders will be able to permission-les
5757

5858

5959
### How to Contribute:
60-
- If you are working on an agent which can provide value through open models and relies on processing public data, please reach out to lachsbagel on Discord (link below)
60+
- If you are working on an agent which can provide value through open models and relies on processing public data, please reach out to lachsbagel on Discord (link below)
6161
- Otherwise, you are more than welcome to publish your agent to the registry when it goes live pending Lumerin's work and any other necessary pieces which come up to better ensure security and verifiability of models in non-local execution environments.
6262
- If you are working on security and/or verifiability of models and the runtime, please reach out to LachsBagel on the Morpheus Discord.
6363
- Currently looking at [Hyperbolic.xyz](https://hyperbolic.xyz) and [6079](https://docs.6079.ai/technology/6079-proof-of-inference-protocol). See more ecosystem members [here](https://mor.org/ecosystem).
File renamed without changes.

DISCLAIMER.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
This highly experimental chatbot is not intended for making important decisions, and its responses are generated based on incomplete data and algorithms that may evolve
1+
This highly experimental chatbot is not intended for making important decisions, and its responses are generated based on incomplete data and algorithms that may evolve
22
rapidly. By using this chatbot, you acknowledge that you use it at your own discretion and assume all risks associated with its limitations and potential errors.

0 commit comments

Comments
 (0)