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

chore: Push Develop into Main #1028

Merged
merged 122 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
ac79f72
refactor contributor page
tcm390 Dec 3, 2024
211a549
clean code
tcm390 Dec 3, 2024
398b198
add go back
tcm390 Dec 3, 2024
a519e65
specific the text color
tcm390 Dec 3, 2024
2e2da1e
add total_count and load more for each item
tcm390 Dec 3, 2024
6d2e077
add animation
tcm390 Dec 3, 2024
592e717
margin
tcm390 Dec 3, 2024
209b172
use grid for contributor cards
tcm390 Dec 3, 2024
86f5828
implement dark/light mode color
tcm390 Dec 3, 2024
38a690a
change back icon
tcm390 Dec 3, 2024
9b5d335
tweak text
tcm390 Dec 3, 2024
70a9c14
lazy load contributors
tcm390 Dec 3, 2024
52c973c
rename
tcm390 Dec 3, 2024
1470fdc
tweak animation
tcm390 Dec 3, 2024
91e9af5
use github token
tcm390 Dec 3, 2024
315beb0
use dotenv
tcm390 Dec 3, 2024
b81b8d1
clean code
tcm390 Dec 3, 2024
80d3b3c
add customFields
tcm390 Dec 3, 2024
88e90a9
Merge pull request #825 from ai16z/tcm-docusaurus-env
tcm390 Dec 3, 2024
c0696da
loading indicator
tcm390 Dec 3, 2024
c6e2ae3
Merge pull request #827 from ai16z/tcm-docusaurus-env
tcm390 Dec 3, 2024
e459648
small fix
tcm390 Dec 3, 2024
fe14a22
small fix
tcm390 Dec 3, 2024
849e2a6
auto scroll when new datas are added
tcm390 Dec 3, 2024
171ffec
prevent scrolling for first fetching data
tcm390 Dec 5, 2024
980cdf2
add bullet
tcm390 Dec 5, 2024
2933aba
rename enum
tcm390 Dec 5, 2024
ca1ca5d
integrate dummy summary and score
tcm390 Dec 5, 2024
5a334f4
add hero component and move the files to components folder
tcm390 Dec 5, 2024
ec7efea
use dummy json file
tcm390 Dec 5, 2024
58dd171
small tweak
tcm390 Dec 5, 2024
6168afc
update contributors json file
tcm390 Dec 6, 2024
b4c08cf
use custom hook for token access
tcm390 Dec 6, 2024
8e1b63b
fix load more issue
tcm390 Dec 6, 2024
7c1029f
init echochambers
lalalune Dec 8, 2024
982dec5
fix ts
lalalune Dec 8, 2024
0bef8ac
Update interactions.ts
tharak123455 Dec 8, 2024
cc2aa50
Update .env.example
tharak123455 Dec 8, 2024
0d5ff61
fetch remote contributors json file
tcm390 Dec 8, 2024
107d9e9
Initial release of smoke/integration tests + testing framework
jzvikart Dec 11, 2024
7bcd5b8
Add plugin-evm wallet provider tests and refactor the provider
nicky-ru Dec 5, 2024
c42f9fb
Add test script to package.json
nicky-ru Dec 5, 2024
fc9d68b
Make chainNames optional for WalletProvider constructor
nicky-ru Dec 5, 2024
4515d48
Add chain config getter
nicky-ru Dec 5, 2024
36f594f
Refactor bridge action
nicky-ru Dec 5, 2024
5c39893
Refactor plugin-evm swap action
nicky-ru Dec 5, 2024
bd26814
Refactor plugin-evm transfer action
nicky-ru Dec 5, 2024
c6a3531
feat: add custom rpc url support
nicky-ru Dec 7, 2024
a420a96
feat: add better feedback from wallet provider
nicky-ru Dec 7, 2024
ee0a3aa
fix: fix undefined chain
nicky-ru Dec 9, 2024
b95bf03
fix: transfer action fix #735
nicky-ru Dec 10, 2024
ee43b45
fix: transfer action fix for EVM Plugin can't run any action #735
nicky-ru Dec 10, 2024
9fc4b0e
fix: throw if evm private key is missing
nicky-ru Dec 11, 2024
47e4c2f
chore: add console log for transfer action
nicky-ru Dec 11, 2024
5e7efb0
fix: fix rpcError for ethereum mainnet
nicky-ru Dec 11, 2024
8c15447
fix: remove duplicated import
nicky-ru Dec 11, 2024
e9b6c1c
update lock file
pgoos Dec 11, 2024
f1a6c2b
Original Source: Echochambers
savageops Dec 11, 2024
af0b94d
read TWITTER_SEARCH_ENABLE and set enableSearch on TwitterClients
odilitime Dec 12, 2024
e7964c3
add enableSearch flag/property, display warning to console
odilitime Dec 12, 2024
9ce1292
Merge branch 'main' into twitter-search-switch
odilitime Dec 12, 2024
c79f5a4
Update interactions.ts
savageops Dec 12, 2024
5f60510
isFalsish(), TWITTER_SEARCH_ENABLE accept more values that are falsis…
odilitime Dec 12, 2024
c5b5dd9
add TWITTER_SEARCH_ENABLE
odilitime Dec 12, 2024
ddc08e0
update warning message to be more coherent
odilitime Dec 12, 2024
5b36db7
Merge branch 'twitter-search-switch' of https://github.com/odilitime/…
odilitime Dec 12, 2024
06c1c41
Merge pull request #1006 from ai16z/main
odilitime Dec 12, 2024
64220cb
Update interactions.ts
tharak123455 Dec 12, 2024
314ffe1
Merge branch 'main' into twitterClient-enhancements
tharak123455 Dec 12, 2024
b50a5bf
feat: improve Twitter client with action processing
dorianjanezic Dec 12, 2024
d89a879
Update interactions.ts
tharak123455 Dec 12, 2024
2fcca62
Merge pull request #913 from tharak123455/twitterClient-enhancements
odilitime Dec 12, 2024
5fd9b40
feat: improve Twitter client with action processing + fix post interv…
dorianjanezic Dec 12, 2024
9a33703
fix: improve chain selection
nicky-ru Dec 12, 2024
5b76da6
refactor: remove unused code
nicky-ru Dec 12, 2024
66de6f5
Merge branch 'ai16z:main' into plugin-evm-multichain
nicky-ru Dec 12, 2024
a7a8fd0
agent custom fetch
v1xingyue Dec 12, 2024
7290ae8
add sleep for stability
pgoos Dec 12, 2024
b0d91d2
reverse sleep order
pgoos Dec 12, 2024
5749bea
more complex CI fix
pgoos Dec 12, 2024
a24934e
update workflow file
pgoos Dec 12, 2024
1a9ced2
update how the secret is passed
pgoos Dec 12, 2024
0e347f8
update workflow file
pgoos Dec 12, 2024
bb0563c
cleanup
pgoos Dec 12, 2024
44b1e55
Merge branch 'main' into test/integration-test-poc
pgoos Dec 12, 2024
1fd12ca
add logic to skip the run
pgoos Dec 12, 2024
dfac323
Merge branch 'test/integration-test-poc' of github.com:Sifchain/sa-el…
pgoos Dec 12, 2024
3ddcf87
Add templates documentation to the project
Lukapetro Dec 12, 2024
3520954
Add README
jzvikart Dec 12, 2024
ff82bb9
update exit code
pgoos Dec 12, 2024
08d8a0d
Merge pull request #1013 from Lukapetro/feature/templates-docs
odilitime Dec 12, 2024
d88f3b5
Merge branch 'develop' into plugin-evm-multichain
nicky-ru Dec 12, 2024
43436e5
docs: Add "AI Agent Dev School Part 4" livestream notes
YoungPhlo Dec 12, 2024
6e1548d
Merge pull request #1009 from nicky-ru/plugin-evm-multichain
odilitime Dec 12, 2024
3faf92a
Merge pull request #993 from Sifchain/test/integration-test-poc
monilpat Dec 12, 2024
3bb4350
Merge pull request #1015 from YoungPhlo/docs/community-streams
monilpat Dec 12, 2024
193860b
Merge branch 'develop' into twitter-search-switch
monilpat Dec 12, 2024
e4dac88
Merge pull request #1003 from odilitime/twitter-search-switch
monilpat Dec 12, 2024
0128a1e
Merge branch 'develop' into patch-custom-fetch
v1xingyue Dec 12, 2024
c411c2f
Merge pull request #1007 from dorianjanezic/main
odilitime Dec 12, 2024
3e15c72
chore: Update CI configuration to enable test coverage and add covera…
snobbee Dec 12, 2024
4fd51a8
Merge branch 'develop' into ci/generate-coverage-files-to-upload-to-c…
snobbee Dec 12, 2024
a3fc744
Merge branch 'main' of https://github.com/odilitime/eliza into twitte…
odilitime Dec 12, 2024
5cac96a
Merge branch 'develop' of https://github.com/ai16z/eliza into twitter…
odilitime Dec 12, 2024
6d62417
fetchHomeTimeline => fetchOwnPosts, fetchFeedTimeline => fetchHomeTim…
odilitime Dec 12, 2024
d623ef1
Merge remote-tracking branch 'origin/main' into tcm-contributor-page
madjin Dec 12, 2024
7cb7ec1
Merge branch 'main' into tcm-contributor-page
tcm390 Dec 12, 2024
5573af6
chore: Update CI workflow to run tests with coverage reporting
snobbee Dec 12, 2024
78e5c57
Merge branch 'tcm-contributor-page' of github.com:ai16z/eliza into tc…
madjin Dec 12, 2024
bedb291
Merge remote-tracking branch 'origin/develop' into tcm-contributor-page
madjin Dec 12, 2024
12e1063
fix broken page
madjin Dec 12, 2024
7ad74e3
Merge pull request #809 from ai16z/tcm-contributor-page
madjin Dec 12, 2024
bbbbad7
adjust logging
odilitime Dec 12, 2024
ffd5e0a
Merge pull request #1019 from Sifchain/ci/generate-coverage-files-to-…
monilpat Dec 12, 2024
6b04741
Update README.md
sergical Dec 12, 2024
3f8317b
Merge pull request #1021 from odilitime/twitter-search-switch
odilitime Dec 12, 2024
5f266f1
Merge pull request #1024 from sergical/patch-1
odilitime Dec 12, 2024
4d5d680
Merge pull request #1010 from v1xingyue/patch-custom-fetch
odilitime Dec 12, 2024
028e901
Update README.md
sergical Dec 12, 2024
84a7aaf
Merge pull request #1025 from sergical/patch-2
monilpat Dec 13, 2024
5f30beb
Merge branch 'main' into shaw/add-echochambers
lalalune Dec 13, 2024
4d6dfd4
Merge pull request #997 from savageops/shaw/add-echochambers
lalalune Dec 13, 2024
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
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ TWITTER_EMAIL= # Account email
TWITTER_2FA_SECRET=
TWITTER_COOKIES= # Account cookies
TWITTER_POLL_INTERVAL=120 # How often (in seconds) the bot should check for interactions
TWITTER_SEARCH_ENABLE=FALSE # Enable timeline search, WARNING this greatly increases your chance of getting banned
TWITTER_TARGET_USERS= # Comma separated list of Twitter user names to interact with
X_SERVER_URL=
XAI_API_KEY=
XAI_MODEL=
Expand All @@ -62,6 +64,10 @@ POST_INTERVAL_MIN= # Default: 90
POST_INTERVAL_MAX= # Default: 180
POST_IMMEDIATELY=

# Twitter action processing configuration
ACTION_INTERVAL=300000 # Interval in milliseconds between action processing runs (default: 5 minutes)
ENABLE_ACTION_PROCESSING=false # Set to true to enable the action processing loop

# Feature Flags
IMAGE_GEN= # Set to TRUE to enable image generation
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI/1536, leave blank for local
Expand Down Expand Up @@ -244,6 +250,13 @@ INTERNET_COMPUTER_ADDRESS=
APTOS_PRIVATE_KEY= # Aptos private key
APTOS_NETWORK= # must be one of mainnet, testnet

# EchoChambers Configuration
ECHOCHAMBERS_API_URL=http://127.0.0.1:3333
ECHOCHAMBERS_API_KEY=testingkey0011
ECHOCHAMBERS_USERNAME=eliza
ECHOCHAMBERS_DEFAULT_ROOM=general
ECHOCHAMBERS_POLL_INTERVAL=60
ECHOCHAMBERS_MAX_MESSAGES=10

# AWS S3 Configuration Settings for File Upload
AWS_ACCESS_KEY_ID=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "NODE_ENV=test" >> packages/core/.env.test

- name: Run tests
run: cd packages/core && pnpm test
run: cd packages/core && pnpm test:coverage

- name: Build packages
run: pnpm run build
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/integrationTests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: integration-test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
smoke-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 9.4.0

- uses: actions/setup-node@v4
with:
node-version: "23"
cache: "pnpm"

- name: Run smoke tests
run: pnpm run smokeTests
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 9.4.0

- uses: actions/setup-node@v4
with:
node-version: "23"
cache: "pnpm"

- name: Install dependencies
run: pnpm install -r

- name: Build packages
run: pnpm build

- name: Run integration tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
if [ -z "$OPENAI_API_KEY" ]; then
echo "Skipping integration tests due to missing required API keys"
exit 1
else
pnpm run integrationTests
fi
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ packages/plugin-coinbase/package-lock.json
tsup.config.bundled_*.mjs

.turbo

coverage
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ git clone https://github.com/ai16z/eliza-starter.git

cp .env.example .env

pnpm i && pnpm start
pnpm i && pnpm build && pnpm start
```

Then read the [Documentation](https://ai16z.github.io/eliza/) to learn how to customize your Eliza.
Expand Down Expand Up @@ -90,7 +90,7 @@ sh scripts/start.sh

### Edit the character file

1. Open `agent/src/character.ts` to modify the default character. Uncomment and edit.
1. Open `packages/core/src/defaultCharacter.ts` to modify the default character. Uncomment and edit.

2. To load custom characters:
- Use `pnpm start --characters="path/to/your/character.json"`
Expand Down
24 changes: 24 additions & 0 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ export const wait = (minTime: number = 1000, maxTime: number = 3000) => {
return new Promise((resolve) => setTimeout(resolve, waitTime));
};

const logFetch = async (url: string, options: any) => {
elizaLogger.info(`Fetching ${url}`);
elizaLogger.info(options);
return fetch(url, options);
};

export function parseArguments(): {
character?: string;
characters?: string;
Expand Down Expand Up @@ -335,6 +341,7 @@ export async function initializeClients(
}

if (clientTypes.includes("twitter")) {
TwitterClientInterface.enableSearch = !isFalsish(getSecret(character, "TWITTER_SEARCH_ENABLE"));
const twitterClients = await TwitterClientInterface.start(runtime);
clients.push(twitterClients);
}
Expand All @@ -358,6 +365,22 @@ export async function initializeClients(
return clients;
}

function isFalsish(input: any): boolean {
// If the input is exactly NaN, return true
if (Number.isNaN(input)) {
return true;
}

// Convert input to a string if it's not null or undefined
const value = input == null ? '' : String(input);

// List of common falsish string representations
const falsishValues = ['false', '0', 'no', 'n', 'off', 'null', 'undefined', ''];

// Check if the value (trimmed and lowercased) is in the falsish list
return falsishValues.includes(value.trim().toLowerCase());
}

function getSecret(character: Character, secret: string) {
return character.settings.secrets?.[secret] || process.env[secret];
}
Expand Down Expand Up @@ -456,6 +479,7 @@ export async function createAgent(
services: [],
managers: [],
cacheManager: cache,
fetch: logFetch,
});
}

Expand Down
94 changes: 94 additions & 0 deletions docs/community/Streams/12-2024/2024-12-10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
sidebar_position: 4
title: "AI Agent Dev School Part 4"
description: "AI Pizza: Hacking Eliza for Domino's Delivery (plus TEE Deep Dive)"
---

# AI Agent Dev School Part 4

**AI Pizza: Hacking Eliza for Domino's Delivery (plus TEE Deep Dive)**

Date: 2024-12-10
YouTube Link: https://www.youtube.com/watch?v=6I9e9pJprDI

## Timestamps

Part 1: Trusted Execution Environments (TEEs) with Agent Joshua
- **00:00:09** - Stream starts, initial setup issues.
- **00:01:58** - Intro to Trusted Execution Environments (TEEs).
- **00:08:03** - Agent Joshua begins explaining TEEs and the Eliza plugin.
- **00:19:15** - Deeper dive into remote attestation.
- **00:24:50** - Discussion of derived keys.
- **00:37:00** - Deploying to a real TEE, Phala Network's TEE cloud.
- **00:50:48** - Q&A with Joshua, contact info, and next steps.

Part 2: Building a Domino's pizza ordering agent
- **01:04:37** - Transition to building a Domino's pizza ordering agent.
- **01:14:20** - Discussion of the pizza ordering agent’s order flow and state machine.
- **01:22:07** - Using Claude to generate a state machine diagram.
- **01:32:17** - Creating the Domino's plugin in Eliza.
- **01:54:15** - Working on the pizza order provider.
- **02:16:46** - Pizza provider code completed.
- **02:28:50** - Discussion of caching customer and order data.
- **03:13:45** - Pushing fixes to main branch and continuing work on the agent.
- **04:24:30** - Discussion of summarizing past agent dev school sessions.
- **05:01:18** - Shaw returns, admits to ordering Domino's manually.
- **05:09:00** - Discussing payment flow and a confirm order action.
- **05:27:17** - Final code push, wrap-up, and end of stream.


## Summary

This is a livestream titled "AI Agent Dev School Part 4" from the ai16z project, featuring Shaw. The stream is divided into two main parts: a technical discussion on Trusted Execution Environments (TEEs) and a coding session where Shaw attempts to build a pizza-ordering agent using the Domino's API.

**Part 1: Trusted Execution Environments (TEEs) with Agent Joshua**

This segment begins with Shaw introducing the concept of TEEs and their importance for running autonomous agents securely. He emphasizes the need to protect private keys and ensure that code execution is tamper-proof. Joshua from the Phala Network is brought on to explain TEEs in more detail and demonstrate how to use the TEE plugin he built for Eliza.

* **Key Concepts:**
* **Trusted Execution Environments (TEEs):** Secure areas within a processor that isolate code and data, protecting them from unauthorized access and tampering.
* **Secure Enclave:** A cryptographic primitive that allows data to be encrypted and isolated within a processor.
* **Remote Attestation:** A method to verify that a program running inside a TEE is genuine and hasn't been tampered with, providing verifiability to users.
* **D-Stack:** An SDK developed in collaboration with Flashbots and Andrew Miller, enabling developers to build and launch Docker containers in TEEs.
* **Derived Key Provider:** A component that generates cryptographic keys based on a secret salt, ensuring that private keys are not exposed to humans.

* **Demonstration:**
* Joshua walks through the process of setting up and deploying an Eliza agent in a TEE simulator, demonstrating how to generate remote attestations and derive keys.
* He shows how to use the remote attestation explorer to verify the authenticity of the agent running inside the TEE.
* He explains how to build a Docker image of the agent and deploy it to the Phala Network's TEE cloud solution.

* **Use Cases:**
* Securely storing private keys for on-chain actions.
* Ensuring the integrity of autonomous agents, preventing tampering or unauthorized access.
* Providing verifiable execution for users and investors.

* **Phala Network's TEE Cloud:**
* Joshua introduces Phala Network's TEE cloud solution, which allows developers to deploy Docker images and host their agents in a trusted execution environment.
* He mentions that the service supports various compute-intensive applications beyond AI agents.
* He invites interested developers to contact him on Discord (@hashwarlock) for onboarding and further details.

**Part 2: Building a Pizza Ordering Agent**

In the second part, Shaw transitions to a more lighthearted coding session where he attempts to build an agent that can order a pizza using the Domino's API. He highlights the challenges of handling payments securely and connecting user information to the conversation.

* **Challenges:**
* Securely handling payment information.
* Connecting user data to the current conversation.
* Defining the order flow using a state machine.

* **Approach:**
* Shaw uses a state machine to model the pizza ordering process, defining different states and transitions based on user input and available information.
* He uses Claude (an AI assistant) to generate code snippets and assist with the development process.
* He decides to initially focus on a simplified version where the user's payment information is hardcoded in the environment variables, and the agent only needs to collect the user's address.

## Hot Takes

1. **"Maybe we'll mix it on LinkedIn so people can order Domino's on LinkedIn. There you go. Now we're cooking." (00:03:26)** - Shaw's seemingly flippant idea of ordering pizza on LinkedIn highlights the potential for integrating everyday services into unexpected platforms through agents. This sparked discussion about the wider implications for businesses and social media.

2. **"Yeah, it'll probably get drained real quick. These fucking people." (00:28:30)** - Shaw accidentally leaked an API key on stream and expressed frustration with viewers who noticed, exposing the real-world risks of handling sensitive information during development, especially in a live environment.

3. **"The secret to making a billion dollars is to use the existing agent framework to deliver apps to people on social media that they want." (01:09:35)** - Shaw’s strong assertion about focusing on building apps *using* existing frameworks rather than creating new ones is a bold statement about the current agent development landscape, suggesting that innovation lies in application development, not framework creation.

4. **"So those are like, honest to God, if the bots are better than like 70% of tweets on Twitter, they're better than like 99.7 tweets and posts on LinkedIn." (01:39:57)** - This provocative comparison of content quality between Twitter and LinkedIn, suggesting bots surpass most LinkedIn posts, fueled lively debate in the chat and raised questions about the role and value of human-generated content in the age of AI.

5. **"I subliminally messaged Domino's into my own brain, and now I have to eat it." (05:01:24)** - After hours of working on the pizza bot, Shaw abandoned the live coding attempt and ordered pizza manually, a humorous but relatable moment that highlighted the challenges and frustrations of software development, even when aided by AI. It also underscores the human desire for immediate gratification, even in the face of a potentially groundbreaking technological advancement.
Loading
Loading