You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Daydreams is a generative agent library for executing anything onchain. It is chain agnostic and can be used to perform onchain tasks - including play any onchain game - by simply injecting context. Base, Solana, Ethereum, Starknet, etc.
6
-
7
-
It is designed to be as lite as possible while remaining powerful and flexible.
8
-
9
-
## Table of Contents
10
-
11
-
-[Quick Start](#quick-start)
12
-
-[Examples](#examples)
13
-
-[Basic Example](#basic-example)
14
-
-[Goal-Based Example](#goal-based-example)
15
-
-[Twitter Bot Example](#twitter-bot-example)
16
-
-[API Example](#api-example)
17
-
-[How It Works](#how-it-works)
18
-
-[Context](#context)
19
-
-[Actions](#actions)
20
-
-[Goals](#goals)
21
-
-[Monitor Progress](#monitor-progress)
22
-
-[Architecture](#architecture)
23
-
-[Core Concepts](#core-concepts)
24
-
-[Protocol Design](#protocol-design)
25
-
-[Development](#development)
26
-
-[Roadmap](#roadmap)
27
-
-[Contributors](#contributors)
1
+
# Solana AI Multimodal Agent
2
+
3
+
The Solana AI Multimodal Agent is a powerful generative library designed for seamless on-chain execution. It is chain-agnostic, allowing users to perform tasks across multiple blockchains, including Solana, Ethereum, and Starknet. By simply injecting context, users can effortlessly interact with various on-chain applications, including games.
28
4
29
5
## Quick Start
30
6
31
-
Prerequisites:
7
+
### Requirements
32
8
33
-
- Node.js 16+
9
+
- Node.js 16.0+
34
10
- pnpm
35
11
- Bun
36
12
- Docker Desktop
37
13
38
-
```bash
39
-
# Install dependencies
40
-
pnpm install
14
+
### Installation
15
+
16
+
1.**Install Dependencies**:
17
+
```bash
18
+
pnpm install
19
+
```
20
+
2.**Configure Environment Variables**:
21
+
```bash
22
+
cp .env.example .env
23
+
```
24
+
3.**Start Docker Services**:
25
+
```bash
26
+
./docker.sh
27
+
```
28
+
29
+
Alternatively, simplify with a Makefile:
30
+
31
+
```makefile
32
+
# Makefile
33
+
install:
34
+
pnpm install
35
+
36
+
copy-env:
37
+
cp .env.example .env
38
+
39
+
start-docker:
40
+
./docker.sh
41
+
```
41
42
42
-
# Copy environment variables
43
-
cp .env.example .env
43
+
Run the commands using Make:
44
44
45
-
# Start Docker services (ChromaDB)
46
-
sh ./docker.sh
45
+
```bash
46
+
make install copy-env start-docker
47
47
```
48
48
49
49
## Examples
50
50
51
-
The project includes several example implementations demonstrating different use cases:
51
+
The project includes professional examples for various use cases:
52
52
53
53
### Basic Example
54
54
55
-
A simple CLI agent that can execute tasks using Chain of Thought:
55
+
A simple CLI agent using Chain of Thought:
56
56
57
57
```bash
58
-
# Run basic example
59
-
bun task
58
+
bun run basic
60
59
```
61
60
62
61
### Goal-Based Example
63
62
64
63
Demonstrates hierarchical goal planning and execution:
65
64
66
65
```bash
67
-
# Run goal-based example
68
-
bun goal
66
+
bun run goals
69
67
```
70
68
71
69
### Twitter Bot Example
72
70
73
-
A Twitter bot that can monitor mentions and generate autonomous thoughts:
71
+
A bot that autonomously monitors mentions and generates responses:
74
72
75
73
```bash
76
-
# Run Twitter bot example
77
-
bun twitter
74
+
bun run twitter
78
75
```
79
76
80
-
### API Example
77
+
### API Integration Example
81
78
82
-
Shows how to integrate with external APIs:
79
+
Illustrates integration with external APIs:
83
80
84
81
```bash
85
-
# Run API example
86
-
bun api
82
+
bun run api
87
83
```
88
84
89
-
## Concepts
90
-
91
-
Daydreams is built around the following concepts:
85
+
## Concepts Overview
92
86
93
-
- Orchestrator
94
-
- Handlers
95
-
- Goals
96
-
- Memory
97
-
- Chain of Thought
87
+
**Core Concepts** include:
98
88
99
89
### Orchestrator
100
90
101
-
The Orchestrator is the central component that manages the flow of data through the system. It is responsible for:
102
-
103
-
- Registering handlers
104
-
- Routing data through the system
105
-
- Scheduling recurring tasks
106
-
- Maintaining the autonomous flow
107
-
- Calling the Chain of Thought
91
+
-**Data Flow**: Manages and routes data efficiently.
92
+
-**Task Scheduling**: Oversees recurring tasks to maintain workflow.
93
+
-**Chain of Thought**: Invokes reasoning for task execution.
108
94
109
95
### Handlers
110
96
111
-
Handlers are the building blocks of the system. They are responsible for processing data and producing outputs. They are registered with the Orchestrator and are chained together in an autonomous flow.
97
+
Handlers process data and generate outputs. They are categorized as:
112
98
113
-
Register handlers for inputs, outputs, and actions using `registerIOHandler`. Each handler has a role, description, schema, and handler function:
114
-
115
-
-**Input Handlers**: Process incoming data (e.g., user messages, API webhooks)
116
-
-**Action Handlers**: Execute operations and return results (e.g., API calls, database queries)
117
-
-**Output Handlers**: Produce side effects (e.g., sending messages, updating UI)
99
+
-**Input Handlers**: Manage incoming data (e.g., user messages).
100
+
-**Action Handlers**: Perform operations and return results (e.g., API calls).
101
+
-**Output Handlers**: Produce side effects (e.g., sending notifications).
4.**Swarm Rooms**: Multi-Agent Collaboration and Knowledge Sharing.
201
154
202
-
- Reasoning Engine
203
-
- Memory Integration
204
-
- Action Planning
205
-
206
-
3.**Vector Database**
207
-
208
-
- Experience Storage
209
-
- Knowledge Retrieval
210
-
- Similarity Search
211
-
212
-
4.**Swarm Rooms**
213
-
- Multi-Agent Collaboration
214
-
- Knowledge Sharing
215
-
- Federated Learning
216
-
217
-
### System Flow
155
+
### System Flow Diagram
218
156
219
157
```mermaid
220
158
graph TD
@@ -255,67 +193,9 @@ graph TD
255
193
style Memory System fill:#abf,stroke:#333,stroke-width:2px
256
194
```
257
195
258
-
The system works through several coordinated components:
259
-
260
-
1.**Orchestrator**: The central coordinator that:
261
-
262
-
- Manages input/output/action handlers
263
-
- Routes data through the system
264
-
- Schedules recurring tasks
265
-
- Maintains the autonomous flow
266
-
267
-
2.**Chain of Thought (CoT)**: The reasoning engine that:
268
-
269
-
- Processes complex queries asked - it can be called directly like in the examples or through the orchestrator
270
-
- Makes decisions based on goals
271
-
- Determines required actions
272
-
- Learns from outcomes
273
-
274
-
3.**Memory System**:
275
-
276
-
- Vector Memory stores experiences and knowledge
277
-
- Room Manager organizes conversations and contexts
278
-
- Enables retrieval of relevant past experiences
279
-
280
-
4.**Goal System**:
281
-
- Breaks down complex objectives
282
-
- Manages dependencies between goals
283
-
- Tracks progress and completion
284
-
- Adapts strategies based on outcomes
285
-
286
-
This architecture allows for:
287
-
288
-
- Flexible composition of handlers
289
-
- Autonomous decision-making
290
-
- Contextual memory and learning
291
-
- Goal-oriented behavior
292
-
293
-
Each component can be used independently or composed together for more complex behaviors. The system is designed to be extensible, allowing new handlers and components to be added as needed.
294
-
295
-
## Development
296
-
297
-
Design principles:
298
-
299
-
-**Lightweight**: Keep the codebase small and focused
300
-
-**Composable**: Easy to combine functions and tools
301
-
-**Extensible**: Simple to add new capabilities
302
-
303
-
## Roadmap
304
-
305
-
-[x] Chain of Thought
306
-
-[ ] Context Layers
307
-
-[ ] Graph memory system
308
-
-[ ] Swarm Rooms
309
-
-[ ] Create 'sleeves' abstract for dynamic context generation
310
-
311
-
> ⚠️ **Warning**: Daydreams is currently in pre-alpha stage, we are looking for feedback and collaboration.
0 commit comments