Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperKoza343 committed Jan 17, 2025
2 parents e0b95c6 + c4d173d commit b286798
Show file tree
Hide file tree
Showing 197 changed files with 35,120 additions and 1,474 deletions.
34 changes: 29 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ VITE_SERVER_PORT=${SERVER_PORT}
SUPABASE_URL=
SUPABASE_ANON_KEY=

# Remote character url (optional)
REMOTE_CHARACTER_URL=
# Comma separated list of remote character urls (optional)
REMOTE_CHARACTER_URLS=

###############################
#### Client Configurations ####
Expand Down Expand Up @@ -87,6 +87,13 @@ EMBEDDING_OPENAI_MODEL= # Default: text-embedding-3-small
IMAGE_OPENAI_MODEL= # Default: dall-e-3
USE_OPENAI_EMBEDDING= # Set to TRUE for OpenAI/1536, leave blank for local

# Atoma SDK Configuration
ATOMASDK_BEARER_AUTH= # Atoma SDK Bearer Auth token
ATOMA_API_URL= # Default: https://api.atoma.network/v1
SMALL_ATOMA_MODEL= # Default: meta-llama/Llama-3.3-70B-Instruct
MEDIUM_ATOMA_MODEL= # Default: meta-llama/Llama-3.3-70B-Instruct
LARGE_ATOMA_MODEL= # Default: meta-llama/Llama-3.3-70B-Instruct

# Eternal AI's Decentralized Inference API
ETERNALAI_URL=
ETERNALAI_MODEL= # Default: "NousResearch/Hermes-3-Llama-3.1-70B-FP8"
Expand Down Expand Up @@ -134,8 +141,12 @@ MEDIUM_AKASH_CHAT_API_MODEL= # Default: Meta-Llama-3-3-70B-Instruct
LARGE_AKASH_CHAT_API_MODEL= # Default: Meta-Llama-3-1-405B-Instruct-FP8

# Livepeer configuration
LIVEPEER_GATEWAY_URL= # Free inference gateways and docs: https://livepeer-eliza.com/
LIVEPEER_IMAGE_MODEL= # Default: ByteDance/SDXL-Lightning

LIVEPEER_GATEWAY_URL=https://dream-gateway.livepeer.cloud # Free inference gateways and docs: https://livepeer-eliza.com/
IMAGE_LIVEPEER_MODEL= # Default: ByteDance/SDXL-Lightning
SMALL_LIVEPEER_MODEL= # Default: meta-llama/Meta-Llama-3.1-8B-Instruct
MEDIUM_LIVEPEER_MODEL= # Default: meta-llama/Meta-Llama-3.1-8B-Instruct
LARGE_LIVEPEER_MODEL= # Default: meta-llama/Meta-Llama-3.1-8B-Instruct

# Speech Synthesis
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
Expand Down Expand Up @@ -302,6 +313,10 @@ SOLANA_ADMIN_PRIVATE_KEY= # This wallet is used to verify NFTs
SOLANA_ADMIN_PUBLIC_KEY= # This wallet is used to verify NFTs
SOLANA_VERIFY_TOKEN= # Authentication token for calling the verification API

# Injective
INJECTIVE_PRIVATE_KEY= #
INJECTIVE_PUBLIC_KEY= #
INJECTIVE_NETWORK= #
# Fallback Wallet Configuration (deprecated)
WALLET_PRIVATE_KEY=
WALLET_PUBLIC_KEY=
Expand Down Expand Up @@ -337,6 +352,11 @@ COINBASE_GENERATED_WALLET_ID= # Not your address but the wallet ID from ge
COINBASE_GENERATED_WALLET_HEX_SEED= # Not your address but the wallet hex seed from generating a wallet through the plugin and calling export
COINBASE_NOTIFICATION_URI= # For webhook plugin the uri you want to send the webhook to for dummy ones use https://webhook.site

# Coinbase AgentKit
COINBASE_AGENT_KIT_NETWORK= # defaults to 'base-sepolia'
CDP_API_KEY_NAME=
CDP_API_KEY_PRIVATE_KEY=

# Coinbase Charity Configuration
IS_CHARITABLE=false # Set to true to enable charity donations
CHARITY_ADDRESS_BASE=0x1234567890123456789012345678901234567890
Expand Down Expand Up @@ -366,7 +386,7 @@ SQUID_SDK_URL=https://apiplus.squidrouter.com # Default: https://apiplus.squidro
SQUID_INTEGRATOR_ID= # get integrator id through https://docs.squidrouter.com/
SQUID_EVM_ADDRESS=
SQUID_EVM_PRIVATE_KEY=
SQUID_API_THROTTLE_INTERVAL= # Default: 0; Used to throttle API calls to avoid rate limiting (in ms)
SQUID_API_THROTTLE_INTERVAL=1000 # Default: 1000; Used to throttle API calls to avoid rate limiting (in ms)

# TEE Configuration
# TEE_MODE options:
Expand Down Expand Up @@ -543,6 +563,10 @@ AWS_SECRET_ACCESS_KEY=
AWS_REGION=
AWS_S3_BUCKET=
AWS_S3_UPLOAD_PATH=
AWS_S3_ENDPOINT=
AWS_S3_SSL_ENABLED=
AWS_S3_FORCE_PATH_STYLE=


# Deepgram
DEEPGRAM_API_KEY=
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,24 @@ on:
jobs:
smoke-tests:
runs-on: ubuntu-latest
container:
image: node:23-bullseye
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
- name: Cache pnpm
uses: actions/cache@v4
with:
version: 9.15.0
path: |
~/.pnpm-store
**/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-

- uses: actions/setup-node@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
node-version: "23.3.0"
cache: "pnpm"
version: 9.15.0

- name: Run smoke tests
run: pnpm run smokeTests
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ tsup.config.bundled_*.mjs
.turbo
.cursorrules
.pnpm-store
instructions.md
wallet_data.txt

coverage
.eslintcache
Expand Down
2 changes: 2 additions & 0 deletions agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@elizaos/core": "workspace:*",
"@elizaos/plugin-0g": "workspace:*",
"@elizaos/plugin-abstract": "workspace:*",
"@elizaos/plugin-agentkit": "workspace:*",
"@elizaos/plugin-aptos": "workspace:*",
"@elizaos/plugin-birdeye": "workspace:*",
"@elizaos/plugin-coingecko": "workspace:*",
Expand All @@ -61,6 +62,7 @@
"@elizaos/plugin-nft-generation": "workspace:*",
"@elizaos/plugin-node": "workspace:*",
"@elizaos/plugin-solana": "workspace:*",
"@elizaos/plugin-injective": "workspace:*",
"@elizaos/plugin-solana-agentkit": "workspace:*",
"@elizaos/plugin-squid-router": "workspace:*",
"@elizaos/plugin-autonome": "workspace:*",
Expand Down
60 changes: 42 additions & 18 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,9 @@ import { evmPlugin } from "@elizaos/plugin-evm";
import { flowPlugin } from "@elizaos/plugin-flow";
import { fuelPlugin } from "@elizaos/plugin-fuel";
import { genLayerPlugin } from "@elizaos/plugin-genlayer";
import { giphyPlugin } from "@elizaos/plugin-giphy";
import { gitcoinPassportPlugin } from "@elizaos/plugin-gitcoin-passport";
import { hyperliquidPlugin } from "@elizaos/plugin-hyperliquid";
import { imageGenerationPlugin } from "@elizaos/plugin-image-generation";
import { lensPlugin } from "@elizaos/plugin-lensNetwork";
import { letzAIPlugin } from "@elizaos/plugin-letzai";
import { multiversxPlugin } from "@elizaos/plugin-multiversx";
import { nearPlugin } from "@elizaos/plugin-near";
import createNFTCollectionsPlugin from "@elizaos/plugin-nft-collections";
Expand All @@ -87,7 +84,7 @@ import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
import { quaiPlugin } from "@elizaos/plugin-quai";
import { sgxPlugin } from "@elizaos/plugin-sgx";
import { solanaPlugin } from "@elizaos/plugin-solana";
import { solanaAgentkitPlguin } from "@elizaos/plugin-solana-agentkit";
import { solanaAgentkitPlugin } from "@elizaos/plugin-solana-agentkit";
import { squidRouterPlugin } from "@elizaos/plugin-squid-router";
import { stargazePlugin } from "@elizaos/plugin-stargaze";
import { storyPlugin } from "@elizaos/plugin-story";
Expand All @@ -96,9 +93,13 @@ import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
import { teeLogPlugin } from "@elizaos/plugin-tee-log";
import { teeMarlinPlugin } from "@elizaos/plugin-tee-marlin";
import { verifiableLogPlugin } from "@elizaos/plugin-tee-verifiable-log";
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
import { tonPlugin } from "@elizaos/plugin-ton";
import { webSearchPlugin } from "@elizaos/plugin-web-search";
import { injectivePlugin } from "@elizaos/plugin-injective";
import { giphyPlugin } from "@elizaos/plugin-giphy";
import { letzAIPlugin } from "@elizaos/plugin-letzai";
import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
import { hyperliquidPlugin } from "@elizaos/plugin-hyperliquid";
import { echoChambersPlugin } from "@elizaos/plugin-echochambers";
import { dexScreenerPlugin } from "@elizaos/plugin-dexscreener";

Expand Down Expand Up @@ -245,12 +246,15 @@ async function loadCharacter(filePath: string): Promise<Character> {
return jsonToCharacter(filePath, character);
}

function commaSeparatedStringToArray(commaSeparated: string): string[] {
return commaSeparated?.split(",").map(value => value.trim())
}


export async function loadCharacters(
charactersArg: string
): Promise<Character[]> {
let characterPaths = charactersArg
?.split(",")
.map((filePath) => filePath.trim());
let characterPaths = commaSeparatedStringToArray(charactersArg)
const loadedCharacters: Character[] = [];

if (characterPaths?.length > 0) {
Expand Down Expand Up @@ -322,17 +326,16 @@ export async function loadCharacters(
}
}

if (loadedCharacters.length === 0) {
if (
process.env.REMOTE_CHARACTER_URL != "" &&
process.env.REMOTE_CHARACTER_URL.startsWith("http")
) {
const character = await loadCharacterFromUrl(
process.env.REMOTE_CHARACTER_URL
);
if (hasValidRemoteUrls()) {
elizaLogger.info("Loading characters from remote URLs");
let characterUrls = commaSeparatedStringToArray(process.env.REMOTE_CHARACTER_URLS)
for (const characterUrl of characterUrls) {
const character = await loadCharacterFromUrl(characterUrl);
loadedCharacters.push(character);
}
}

if (loadedCharacters.length === 0) {
elizaLogger.info("No characters found, using default character");
loadedCharacters.push(defaultCharacter);
}
Expand Down Expand Up @@ -474,6 +477,11 @@ export function getTokenForProvider(
character.settings?.secrets?.VENICE_API_KEY ||
settings.VENICE_API_KEY
);
case ModelProviderName.ATOMA:
return (
character.settings?.secrets?.ATOMASDK_BEARER_AUTH ||
settings.ATOMASDK_BEARER_AUTH
);
case ModelProviderName.AKASH_CHAT_API:
return (
character.settings?.secrets?.AKASH_CHAT_API_KEY ||
Expand Down Expand Up @@ -504,6 +512,11 @@ export function getTokenForProvider(
character.settings?.secrets?.DEEPSEEK_API_KEY ||
settings.DEEPSEEK_API_KEY
);
case ModelProviderName.LIVEPEER:
return (
character.settings?.secrets?.LIVEPEER_GATEWAY_URL ||
settings.LIVEPEER_GATEWAY_URL
);
default:
const errorMessage = `Failed to get token - unsupported model provider: ${provider}`;
elizaLogger.error(errorMessage);
Expand Down Expand Up @@ -786,7 +799,7 @@ export async function createAgent(
? solanaPlugin
: null,
getSecret(character, "SOLANA_PRIVATE_KEY")
? solanaAgentkitPlguin
? solanaAgentkitPlugin
: null,
getSecret(character, "AUTONOME_JWT_TOKEN") ? autonomePlugin : null,
(getSecret(character, "NEAR_ADDRESS") ||
Expand All @@ -799,6 +812,10 @@ export async function createAgent(
getSecret(character, "WALLET_PUBLIC_KEY")?.startsWith("0x"))
? evmPlugin
: null,
((getSecret(character, "EVM_PUBLIC_KEY") || getSecret(character, "INJECTIVE_PUBLIC_KEY")) &&
getSecret(character, "INJECTIVE_PRIVATE_KEY"))
? injectivePlugin
: null,
getSecret(character, "COSMOS_RECOVERY_PHRASE") &&
getSecret(character, "COSMOS_AVAILABLE_CHAINS") &&
createCosmosPlugin(),
Expand Down Expand Up @@ -1099,14 +1116,21 @@ const checkPortAvailable = (port: number): Promise<boolean> => {
});
};


const hasValidRemoteUrls = () =>
process.env.REMOTE_CHARACTER_URLS &&
process.env.REMOTE_CHARACTER_URLS !== "" &&
process.env.REMOTE_CHARACTER_URLS.startsWith("http");


const startAgents = async () => {
const directClient = new DirectClient();
let serverPort = parseInt(settings.SERVER_PORT || "3000");
const args = parseArguments();
let charactersArg = args.characters || args.character;
let characters = [defaultCharacter];

if (charactersArg) {
if (charactersArg || hasValidRemoteUrls()) {
characters = await loadCharacters(charactersArg);
}

Expand Down
63 changes: 0 additions & 63 deletions characters/tate.character.json

This file was deleted.

2 changes: 1 addition & 1 deletion client/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const fetcher = async ({

if (method === "POST") {
if (body instanceof FormData) {
// @ts-expect-error - Supressing potentially undefined options header
// @ts-expect-error - Suppressing potentially undefined options header
delete options.headers["Content-Type"];
options.body = body;
} else {
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "0.1.8+build.1"}
{"version": "0.1.9-alpha.1"}
2 changes: 1 addition & 1 deletion docs/community/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ElizaOS empowers developers of all skill levels to harness the potential of AI a

## Governance

ai16z originates as being an AI agent led DAO. Similar to how we can influence the autonomous agents on memecoins to buy, we intend to bring similar functionality for token holders to actively participate in the decision-making process and shape the future of the project. Community members can pitch ideas, provide insights, and influence investment strategies based on their expertise and track record.
ai16z originates as being an AI agent-led DAO. Similar to how we can influence the autonomous agents on memecoins to buy, we intend to bring similar functionality for token holders to actively participate in the decision-making process and shape the future of the project. Community members can pitch ideas, provide insights, and influence investment strategies based on their expertise and track record.

## Explore and Contribute

Expand Down
Loading

0 comments on commit b286798

Please sign in to comment.