Skip to content

Commit 47eef3a

Browse files
authored
Merge branch 'develop' into feat/sol-agent-kit
2 parents 635b672 + 8b23c3a commit 47eef3a

File tree

66 files changed

+1716
-1532
lines changed

Some content is hidden

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

66 files changed

+1716
-1532
lines changed

.github/workflows/pr.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@ jobs:
1010

1111
steps:
1212
- name: Check out the repository
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v3
1414

1515
- name: Validate PR title
1616
id: validate
1717
run: |
1818
PR_TITLE=$(jq -r .pull_request.title "$GITHUB_EVENT_PATH")
1919
echo "PR Title: $PR_TITLE"
20-
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore):\ .+ ]]; then
20+
if [[ ! "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore)(\([a-zA-Z0-9-]+\))?:\ .+ ]]; then
2121
echo "PR title does not match the required pattern."
2222
exit 1
2323
fi
2424
2525
- name: Set status
2626
if: failure()
2727
run: |
28-
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use the format: 'type: description' (e.g., 'feat|fix|docs|style|refactor|test|chore: title')."
28+
gh pr comment ${{ github.event.pull_request.number }} --body "❌ PR title does not match the required pattern. Please use one of these formats:
29+
- 'type: description' (e.g., 'feat: add new feature')
30+
- 'type(scope): description' (e.g., 'chore(core): update dependencies')"

agent/src/index.ts

+36-5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import fs from "fs";
6161
import path from "path";
6262
import { fileURLToPath } from "url";
6363
import yargs from "yargs";
64+
import net from "net";
6465

6566
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
6667
const __dirname = path.dirname(__filename); // get the name of the directory
@@ -696,13 +697,30 @@ async function startAgent(
696697
}
697698
}
698699

700+
const checkPortAvailable = (port: number): Promise<boolean> => {
701+
return new Promise((resolve) => {
702+
const server = net.createServer();
703+
704+
server.once("error", (err: NodeJS.ErrnoException) => {
705+
if (err.code === "EADDRINUSE") {
706+
resolve(false);
707+
}
708+
});
709+
710+
server.once("listening", () => {
711+
server.close();
712+
resolve(true);
713+
});
714+
715+
server.listen(port);
716+
});
717+
};
718+
699719
const startAgents = async () => {
700720
const directClient = new DirectClient();
701-
const serverPort = parseInt(settings.SERVER_PORT || "3000");
721+
let serverPort = parseInt(settings.SERVER_PORT || "3000");
702722
const args = parseArguments();
703-
704723
let charactersArg = args.characters || args.character;
705-
706724
let characters = [defaultCharacter];
707725

708726
if (charactersArg) {
@@ -717,19 +735,32 @@ const startAgents = async () => {
717735
elizaLogger.error("Error starting agents:", error);
718736
}
719737

738+
// Find available port
739+
while (!(await checkPortAvailable(serverPort))) {
740+
elizaLogger.warn(
741+
`Port ${serverPort} is in use, trying ${serverPort + 1}`
742+
);
743+
serverPort++;
744+
}
745+
720746
// upload some agent functionality into directClient
721747
directClient.startAgent = async (character: Character) => {
722748
// wrap it so we don't have to inject directClient later
723749
return startAgent(character, directClient);
724750
};
751+
725752
directClient.start(serverPort);
726753

754+
if (serverPort !== parseInt(settings.SERVER_PORT || "3000")) {
755+
elizaLogger.log(`Server started on alternate port ${serverPort}`);
756+
}
757+
727758
elizaLogger.log(
728-
"Run `pnpm start:client` to start the client and visit the outputted URL (http://localhost:5173) to chat with your agents"
759+
"Run `pnpm start:client` to start the client and visit the outputted URL (http://localhost:5173) to chat with your agents. When running multiple agents, use client with different port `SERVER_PORT=3001 pnpm start:client`"
729760
);
730761
};
731762

732763
startAgents().catch((error) => {
733764
elizaLogger.error("Unhandled error in startAgents:", error);
734-
process.exit(1); // Exit the process after logging
765+
process.exit(1);
735766
});

client/package.json

+45-45
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
2-
"name": "eliza-client",
3-
"private": true,
4-
"version": "0.1.7-alpha.1",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite",
8-
"build": "vite build",
9-
"check-types": "tsc --noEmit",
10-
"lint": "eslint .",
11-
"preview": "vite preview"
12-
},
13-
"dependencies": {
14-
"@elizaos/core": "workspace:*",
15-
"@radix-ui/react-dialog": "1.1.2",
16-
"@radix-ui/react-separator": "1.1.0",
17-
"@radix-ui/react-slot": "1.1.0",
18-
"@radix-ui/react-tooltip": "1.1.4",
19-
"@tanstack/react-query": "5.61.0",
20-
"class-variance-authority": "0.7.1",
21-
"clsx": "2.1.1",
22-
"lucide-react": "0.460.0",
23-
"react": "18.3.1",
24-
"react-dom": "18.3.1",
25-
"react-router-dom": "6.22.1",
26-
"tailwind-merge": "2.5.5",
27-
"tailwindcss-animate": "1.0.7",
28-
"vite-plugin-top-level-await": "1.4.4",
29-
"vite-plugin-wasm": "3.3.0"
30-
},
31-
"devDependencies": {
32-
"@eslint/js": "9.16.0",
33-
"@types/node": "22.8.4",
34-
"@types/react": "18.3.12",
35-
"@types/react-dom": "18.3.1",
36-
"@vitejs/plugin-react": "4.3.3",
37-
"autoprefixer": "10.4.20",
38-
"eslint-plugin-react-hooks": "5.0.0",
39-
"eslint-plugin-react-refresh": "0.4.14",
40-
"globals": "15.11.0",
41-
"postcss": "8.4.49",
42-
"tailwindcss": "3.4.15",
43-
"typescript": "5.6.3",
44-
"typescript-eslint": "8.11.0",
45-
"vite": "link:@tanstack/router-plugin/vite"
46-
}
2+
"name": "eliza-client",
3+
"private": true,
4+
"version": "0.1.7-alpha.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"check-types": "tsc --noEmit",
10+
"lint": "eslint .",
11+
"preview": "vite preview"
12+
},
13+
"dependencies": {
14+
"@elizaos/core": "workspace:*",
15+
"@radix-ui/react-dialog": "1.1.2",
16+
"@radix-ui/react-separator": "1.1.0",
17+
"@radix-ui/react-slot": "1.1.0",
18+
"@radix-ui/react-tooltip": "1.1.4",
19+
"@tanstack/react-query": "5.61.0",
20+
"class-variance-authority": "0.7.1",
21+
"clsx": "2.1.1",
22+
"lucide-react": "0.460.0",
23+
"react": "18.3.1",
24+
"react-dom": "18.3.1",
25+
"react-router-dom": "6.22.1",
26+
"tailwind-merge": "2.5.5",
27+
"tailwindcss-animate": "1.0.7",
28+
"vite-plugin-top-level-await": "1.4.4",
29+
"vite-plugin-wasm": "3.3.0"
30+
},
31+
"devDependencies": {
32+
"@eslint/js": "9.16.0",
33+
"@types/node": "22.8.4",
34+
"@types/react": "18.3.12",
35+
"@types/react-dom": "18.3.1",
36+
"@vitejs/plugin-react": "4.3.3",
37+
"autoprefixer": "10.4.20",
38+
"eslint-plugin-react-hooks": "5.0.0",
39+
"eslint-plugin-react-refresh": "0.4.14",
40+
"globals": "15.11.0",
41+
"postcss": "8.4.49",
42+
"tailwindcss": "3.4.15",
43+
"typescript": "5.6.3",
44+
"typescript-eslint": "8.11.0",
45+
"vite": "link:@tanstack/router-plugin/vite"
46+
}
4747
}

docs/community/Streams/12-2024/2024-12-03.md

+23-64
Original file line numberDiff line numberDiff line change
@@ -8,73 +8,32 @@ description: "Building Complex AI Agents with Actions, Providers, & Evaluators"
88

99
**Building Complex AI Agents with Actions, Providers, & Evaluators**
1010

11-
Date: 2024-12-03
12-
YouTube Link: https://www.youtube.com/watch?v=XenGeAcPAQo
11+
- Date: 2024-12-03
12+
- YouTube Link: https://www.youtube.com/watch?v=XenGeAcPAQo
1313

1414
## Timestamps
1515

16-
**00:03:33** - Shift in focus from characters (Dev School Part 1) to agent capabilities
17-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=213
18-
19-
**00:07:09** - Deep dive into providers, actions, and evaluators, the core building blocks of Eliza
20-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=429
21-
22-
**00:07:28** - Discussion about actions vs. tools, favoring decoupled intent and action execution
23-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=448
24-
25-
**00:18:02** - Explanation of providers and their function as information sources for agents
26-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=1082
27-
28-
**00:20:15** - Introduction to evaluators and their role in agent reflection and state analysis
29-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=1215
30-
31-
**00:29:22** - Brief overview of clients as connectors to external platforms
32-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=1762
33-
34-
**00:31:02** - Description of adapters and their function in database interactions
35-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=1862
36-
37-
**00:34:02** - Discussion about plugins as bundles of core components, examples, and recommendations
38-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=2042
39-
40-
**00:40:31** - Live Coding Demo begins: Creating a new plugin from scratch (DevSchoolExamplePlugin)
41-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=2431
42-
43-
**00:47:54** - Implementing the simple HelloWorldAction
44-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=2791
45-
46-
**01:00:26** - Implementing the CurrentNewsAction (fetching and formatting news data)
47-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=3626
48-
49-
**01:22:09** - Demonstrating the Eliza Client for interacting with agents locally
50-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=4929
51-
52-
**01:23:54** - Q&A: Plugin usage in character files, installation, Eliza vs. Eliza Starter
53-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=5034
54-
55-
**01:36:17** - Saving agent responses as memories in the database
56-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=5777
57-
58-
**01:43:06** - Using prompts for data extraction within actions
59-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=6186
60-
61-
**01:51:54** - Importance of deleting the database during development to avoid context issues
62-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=6714
63-
64-
**01:57:04** - Viewing agent context via console logs to understand model inputs
65-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=7024
66-
67-
**02:07:07** - Explanation of memory management with knowledge, facts, and lore
68-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=7627
69-
70-
**02:16:53** - Q&A: Prompt engineering opportunities, knowledge chunking and retrieval
71-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=8213
72-
73-
**02:22:57** - Call for contributions: Encouraging viewers to create their own actions and plugins
74-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=8577
75-
76-
**02:26:31** - Closing remarks and future DevSchool session announcements
77-
- Link: https://www.youtube.com/watch?v=XenGeAcPAQo&t=8791
16+
- [00:03:33](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=213>) - Shift in focus from characters (DevSchool Part 1) to agent capabilities.
17+
- [00:07:09](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=429>) - Deep dive into providers, actions, and evaluators, the core building blocks of Eliza.
18+
- [00:07:28](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=448>) - Discussion about actions vs. tools, favoring decoupled intent and action execution.
19+
- [00:18:02](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=1082>) - Explanation of providers and their function as information sources for agents.
20+
- [00:20:15](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=1215>) - Introduction to evaluators and their role in agent reflection and state analysis.
21+
- [00:29:22](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=1762>) - Brief overview of clients as connectors to external platforms.
22+
- [00:31:02](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=1862>) - Description of adapters and their function in database interactions.
23+
- [00:34:02](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=2042>) - Discussion about plugins as bundles of core components, examples, and recommendations.
24+
- [00:40:31](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=2431>) - Live Coding Demo begins: Creating a new plugin from scratch (DevSchoolExamplePlugin).
25+
- [00:47:54](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=2874>) - Implementing the simple HelloWorldAction.
26+
- [01:00:26](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=3626>) - Implementing the CurrentNewsAction (fetching and formatting news data).
27+
- [01:22:09](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=4929>) - Demonstrating the Eliza Client for interacting with agents locally.
28+
- [01:23:54](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=5034>) - Q&A: Plugin usage in character files, installation, Eliza vs. Eliza Starter.
29+
- [01:36:17](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=5777>) - Saving agent responses as memories in the database.
30+
- [01:43:06](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=6186>) - Using prompts for data extraction within actions.
31+
- [01:51:54](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=6714>) - Importance of deleting the database during development to avoid context issues.
32+
- [01:57:04](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=7024>) - Viewing agent context via console logs to understand model inputs.
33+
- [02:07:07](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=7627>) - Explanation of memory management with knowledge, facts, and lore.
34+
- [02:16:53](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=8213>) - Q&A: Prompt engineering opportunities, knowledge chunking and retrieval.
35+
- [02:22:57](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=8577>) - Call for contributions: Encouraging viewers to create their own actions and plugins.
36+
- [02:26:31](<https://www.youtube.com/watch?v=XenGeAcPAQo&t=8791>) - Closing remarks and future DevSchool session announcements.
7837

7938
## Summary
8039

docs/community/Streams/12-2024/2024-12-05.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ description: "Form-Filling Frenzy & Eliza's Wild Ride"
88

99
**Form-Filling Frenzy & Eliza's Wild Ride**
1010

11-
Date: 2024-12-05
12-
YouTube Link: https://www.youtube.com/watch?v=Y1DiqSVy4aU
11+
- Date: 2024-12-05
12+
- YouTube Link: https://www.youtube.com/watch?v=Y1DiqSVy4aU
1313

1414
## Timestamps
1515

0 commit comments

Comments
 (0)