@stevederico/dotbot 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +136 -0
- package/README.md +380 -0
- package/bin/dotbot.js +461 -0
- package/core/agent.js +779 -0
- package/core/compaction.js +261 -0
- package/core/cron_handler.js +262 -0
- package/core/events.js +229 -0
- package/core/failover.js +193 -0
- package/core/gptoss_tool_parser.js +173 -0
- package/core/init.js +154 -0
- package/core/normalize.js +324 -0
- package/core/trigger_handler.js +148 -0
- package/docs/core.md +103 -0
- package/docs/protected-files.md +59 -0
- package/examples/sqlite-session-example.js +69 -0
- package/index.js +341 -0
- package/observer/index.js +164 -0
- package/package.json +42 -0
- package/storage/CronStore.js +145 -0
- package/storage/EventStore.js +71 -0
- package/storage/MemoryStore.js +175 -0
- package/storage/MongoAdapter.js +291 -0
- package/storage/MongoCronAdapter.js +347 -0
- package/storage/MongoTaskAdapter.js +242 -0
- package/storage/MongoTriggerAdapter.js +158 -0
- package/storage/SQLiteAdapter.js +382 -0
- package/storage/SQLiteCronAdapter.js +562 -0
- package/storage/SQLiteEventStore.js +300 -0
- package/storage/SQLiteMemoryAdapter.js +240 -0
- package/storage/SQLiteTaskAdapter.js +419 -0
- package/storage/SQLiteTriggerAdapter.js +262 -0
- package/storage/SessionStore.js +149 -0
- package/storage/TaskStore.js +100 -0
- package/storage/TriggerStore.js +90 -0
- package/storage/cron_constants.js +48 -0
- package/storage/index.js +21 -0
- package/tools/appgen.js +311 -0
- package/tools/browser.js +634 -0
- package/tools/code.js +101 -0
- package/tools/events.js +145 -0
- package/tools/files.js +201 -0
- package/tools/images.js +253 -0
- package/tools/index.js +97 -0
- package/tools/jobs.js +159 -0
- package/tools/memory.js +332 -0
- package/tools/messages.js +135 -0
- package/tools/notify.js +42 -0
- package/tools/tasks.js +404 -0
- package/tools/triggers.js +159 -0
- package/tools/weather.js +82 -0
- package/tools/web.js +283 -0
- package/utils/providers.js +136 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
0.16.0
|
|
2
|
+
|
|
3
|
+
Rename to @stevederico/dotbot
|
|
4
|
+
Default provider xAI/grok-3
|
|
5
|
+
Update examples to xAI
|
|
6
|
+
|
|
7
|
+
0.15.0
|
|
8
|
+
|
|
9
|
+
Add CLI (dotbot chat, repl, serve)
|
|
10
|
+
Add bin/dotbot.js entry point
|
|
11
|
+
|
|
12
|
+
0.14.1
|
|
13
|
+
|
|
14
|
+
Rename package to dotbot
|
|
15
|
+
|
|
16
|
+
0.14.0
|
|
17
|
+
|
|
18
|
+
Rename Goal to Task throughout
|
|
19
|
+
Add full audit trail logging
|
|
20
|
+
Add configurable maxTurns param
|
|
21
|
+
Add max_tokens to API calls
|
|
22
|
+
Add upsertSession to SQLiteAdapter
|
|
23
|
+
Add updateTitle to SQLiteAdapter
|
|
24
|
+
Add smarter title generation
|
|
25
|
+
Add Morning Brief cron feature
|
|
26
|
+
Add goal_id to task_id migration
|
|
27
|
+
Update browser tool description
|
|
28
|
+
Update web search tool description
|
|
29
|
+
|
|
30
|
+
0.13.0
|
|
31
|
+
|
|
32
|
+
Rename taskTools to jobTools
|
|
33
|
+
Rename task tools to job tools
|
|
34
|
+
Add heartbeat protection to toggle/cancel
|
|
35
|
+
Add heartbeat filter to job queries
|
|
36
|
+
Fix cron schedule-before-fire
|
|
37
|
+
Add ImageEvent to SSE events
|
|
38
|
+
Add image event emission
|
|
39
|
+
Lazy-load playwright
|
|
40
|
+
Add close() to SQLite adapters
|
|
41
|
+
Fix goal ID consistency
|
|
42
|
+
|
|
43
|
+
0.12.0
|
|
44
|
+
|
|
45
|
+
Add EventStore interface
|
|
46
|
+
Add SQLiteEventStore implementation
|
|
47
|
+
Add eventTools (event_query, events_summary)
|
|
48
|
+
Add event logging to agent loop
|
|
49
|
+
|
|
50
|
+
0.11.1
|
|
51
|
+
|
|
52
|
+
Add appgenTools (app_generate, app_validate)
|
|
53
|
+
Add envKey to AI_PROVIDERS
|
|
54
|
+
Add generateImage helper
|
|
55
|
+
Add extractVisualPrompt helper
|
|
56
|
+
Add generateImageFromText helper
|
|
57
|
+
Export appgenTools from index
|
|
58
|
+
Update README for 47 tools
|
|
59
|
+
|
|
60
|
+
0.10.1
|
|
61
|
+
|
|
62
|
+
Rename cronTools to taskTools
|
|
63
|
+
Add backwards compatibility alias
|
|
64
|
+
|
|
65
|
+
0.10.0
|
|
66
|
+
|
|
67
|
+
Add init() unified initialization
|
|
68
|
+
Add core/cron_handler.js
|
|
69
|
+
Add core/trigger_handler.js
|
|
70
|
+
Add storesOnly mode for simple use cases
|
|
71
|
+
Fix createAgent provider scoping bug
|
|
72
|
+
Export createCronHandler
|
|
73
|
+
Export createTriggerHandler
|
|
74
|
+
|
|
75
|
+
0.9.5
|
|
76
|
+
|
|
77
|
+
Add SQLiteCronStore
|
|
78
|
+
Add SQLiteGoalStore
|
|
79
|
+
Add SQLiteTriggerStore
|
|
80
|
+
Add SQLiteMemoryStore
|
|
81
|
+
Add cronTools
|
|
82
|
+
Refactor memory tools to use memoryStore
|
|
83
|
+
Extract cron constants to cron_constants.js
|
|
84
|
+
|
|
85
|
+
0.9.4
|
|
86
|
+
|
|
87
|
+
Add Cerebras provider
|
|
88
|
+
Add local text tool call parsing
|
|
89
|
+
Add passthrough mode for plain models
|
|
90
|
+
Restore SQLiteSessionStore export
|
|
91
|
+
|
|
92
|
+
0.9.3
|
|
93
|
+
|
|
94
|
+
Fix OpenAI content
|
|
95
|
+
Add failover logging
|
|
96
|
+
|
|
97
|
+
0.9.2
|
|
98
|
+
|
|
99
|
+
Standardize SSE events across all providers
|
|
100
|
+
Add core/events.js with event schemas and validation
|
|
101
|
+
Normalize thinking events (always include text + hasNativeThinking flag)
|
|
102
|
+
Normalize stats events (inputTokens/outputTokens across all providers)
|
|
103
|
+
Remove bare thinking events at iteration start
|
|
104
|
+
Validate all events before emission
|
|
105
|
+
|
|
106
|
+
0.9.1
|
|
107
|
+
|
|
108
|
+
Remove SQLiteSessionStore exports
|
|
109
|
+
|
|
110
|
+
0.9.0
|
|
111
|
+
|
|
112
|
+
**BREAKING:** All SessionStore implementations now store messages in standard format only
|
|
113
|
+
Agent loop writes standard format natively; provider-specific wire formats produced just-in-time via toProviderFormat()
|
|
114
|
+
SessionStore adapters normalize legacy messages on read and migrate them on next save
|
|
115
|
+
MemoryStore, SQLiteAdapter, and MongoAdapter all store/return standard format
|
|
116
|
+
Compaction utilities updated to operate on standard format messages
|
|
117
|
+
normalizeMessages() in /history endpoint is now a backward-compatible no-op for already-normalized data
|
|
118
|
+
|
|
119
|
+
**Migration:** Existing sessions auto-migrate on first read — no manual steps required
|
|
120
|
+
|
|
121
|
+
0.8.0
|
|
122
|
+
|
|
123
|
+
Add core/normalize.js - provider-agnostic message normalization
|
|
124
|
+
Export toStandardFormat, toProviderFormat, normalizeMessages from core
|
|
125
|
+
Standardize message format across Anthropic/OpenAI providers
|
|
126
|
+
Collapse tool calls and results into unified assistant message structure
|
|
127
|
+
|
|
128
|
+
0.7.0
|
|
129
|
+
|
|
130
|
+
Add SQLite session store
|
|
131
|
+
Make SQLite default
|
|
132
|
+
Update documentation examples
|
|
133
|
+
|
|
134
|
+
0.1.0
|
|
135
|
+
|
|
136
|
+
Initial release
|
package/README.md
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExaGNjeWoweGx4bGYxZXNvYmtsYW80MjlxODFmeTN0cHE3cHN6emFoNiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gYWeVOiMmbg3kzCTq5/giphy.gif" alt="dotbot" width="200">
|
|
3
|
+
<h1 align="center" style="border-bottom: none; margin-bottom: 0;">dotbot</h1>
|
|
4
|
+
<h3 align="center" style="margin-top: 0; font-weight: normal;">
|
|
5
|
+
The ultra-lean AI agent. 11k lines. 47 tools. Zero bloat.
|
|
6
|
+
</h3>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://opensource.org/licenses/mit">
|
|
9
|
+
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="MIT License">
|
|
10
|
+
</a>
|
|
11
|
+
<a href="https://github.com/stevederico/dotbot/stargazers">
|
|
12
|
+
<img src="https://img.shields.io/github/stars/stevederico/dotbot?style=social" alt="GitHub stars">
|
|
13
|
+
</a>
|
|
14
|
+
<a href="https://github.com/stevederico/dotbot">
|
|
15
|
+
<img src="https://img.shields.io/badge/version-0.16.0-green" alt="version">
|
|
16
|
+
</a>
|
|
17
|
+
<img src="https://img.shields.io/badge/LOC-11k-orange" alt="Lines of Code">
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<br />
|
|
22
|
+
|
|
23
|
+
## Why dotbot?
|
|
24
|
+
|
|
25
|
+
**90% smaller than [OpenClaw](https://github.com/openclaw/openclaw). Half the size of [nanobot](https://github.com/HKUDS/nanobot). 4x the tools.**
|
|
26
|
+
|
|
27
|
+
| | dotbot | nanobot | OpenClaw |
|
|
28
|
+
|---|:---:|:---:|:---:|
|
|
29
|
+
| **Lines of Code** | **11k** | 22k | 1M+ |
|
|
30
|
+
| **Tools** | **47** | ~10 | ~50 |
|
|
31
|
+
| **Dependencies** | Minimal | Heavy | Heavy |
|
|
32
|
+
|
|
33
|
+
Everything you need for AI agents. Nothing you don't. No bloated abstractions. No dependency hell. Just a clean, focused agent that works.
|
|
34
|
+
|
|
35
|
+
<br />
|
|
36
|
+
|
|
37
|
+
## What is dotbot?
|
|
38
|
+
|
|
39
|
+
A **streaming AI agent** with tool execution, autonomous tasks, and scheduled jobs. Use it as a CLI or as a library.
|
|
40
|
+
|
|
41
|
+
**As a CLI:**
|
|
42
|
+
```bash
|
|
43
|
+
dotbot chat "What's the weather in San Francisco?"
|
|
44
|
+
dotbot repl
|
|
45
|
+
dotbot serve --port 3000
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**As a library:**
|
|
49
|
+
```javascript
|
|
50
|
+
import { createAgent, SQLiteSessionStore, coreTools } from '@stevederico/dotbot';
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
<br />
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
### CLI Usage
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install globally
|
|
61
|
+
npm install -g @stevederico/dotbot
|
|
62
|
+
|
|
63
|
+
# Set your API key
|
|
64
|
+
export XAI_API_KEY=xai-...
|
|
65
|
+
|
|
66
|
+
# Chat
|
|
67
|
+
dotbot chat "Summarize the top 3 AI news stories today"
|
|
68
|
+
|
|
69
|
+
# Interactive REPL
|
|
70
|
+
dotbot repl
|
|
71
|
+
|
|
72
|
+
# Start HTTP server
|
|
73
|
+
dotbot serve --port 3000
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Library Usage
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install @stevederico/dotbot
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```javascript
|
|
83
|
+
import { createAgent, SQLiteSessionStore, coreTools } from '@stevederico/dotbot';
|
|
84
|
+
|
|
85
|
+
const sessionStore = new SQLiteSessionStore();
|
|
86
|
+
await sessionStore.init('./sessions.db');
|
|
87
|
+
|
|
88
|
+
const agent = createAgent({
|
|
89
|
+
sessionStore,
|
|
90
|
+
providers: {
|
|
91
|
+
xai: { apiKey: process.env.XAI_API_KEY },
|
|
92
|
+
},
|
|
93
|
+
tools: coreTools,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const session = await agent.createSession('user123');
|
|
97
|
+
|
|
98
|
+
for await (const event of agent.chat({
|
|
99
|
+
sessionId: session.id,
|
|
100
|
+
message: 'Search for the latest AI news',
|
|
101
|
+
provider: 'xai',
|
|
102
|
+
model: 'grok-3',
|
|
103
|
+
})) {
|
|
104
|
+
if (event.type === 'text_delta') process.stdout.write(event.text);
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
<br />
|
|
109
|
+
|
|
110
|
+
## What's Included
|
|
111
|
+
|
|
112
|
+
### 🤖 **Streaming Agent Loop**
|
|
113
|
+
- **Async generator** yields typed SSE events
|
|
114
|
+
- **Multi-turn** conversations with tool execution
|
|
115
|
+
- **Abort support** via AbortSignal
|
|
116
|
+
- **Automatic retries** with provider failover
|
|
117
|
+
|
|
118
|
+
### 🔧 **47 Built-in Tools**
|
|
119
|
+
- **Memory** — save, search, update, delete long-term memory
|
|
120
|
+
- **Web** — search, fetch, browser automation with Playwright
|
|
121
|
+
- **Files** — read, write, list, delete, move files
|
|
122
|
+
- **Images** — generate images via xAI Grok
|
|
123
|
+
- **Tasks** — multi-step autonomous workflows
|
|
124
|
+
- **Jobs** — scheduled prompts with cron-like intervals
|
|
125
|
+
- **Triggers** — event-driven agent responses
|
|
126
|
+
- **Weather** — Open-Meteo API (no key required)
|
|
127
|
+
|
|
128
|
+
### 🔌 **Multi-Provider Support**
|
|
129
|
+
- **xAI Grok** — grok-3, with real-time web search and image generation
|
|
130
|
+
- **Anthropic Claude** — claude-sonnet-4-5, claude-opus-4, etc.
|
|
131
|
+
- **OpenAI** — gpt-4o, gpt-4-turbo, etc.
|
|
132
|
+
- **Cerebras** — ultra-fast inference
|
|
133
|
+
- **Ollama** — local models, no API cost
|
|
134
|
+
|
|
135
|
+
### 💾 **Pluggable Storage**
|
|
136
|
+
- **SQLite** — zero dependencies with Node.js 22.5+
|
|
137
|
+
- **MongoDB** — scalable with full-text search
|
|
138
|
+
- **Memory** — in-memory for testing
|
|
139
|
+
|
|
140
|
+
### 📊 **Full Audit Trail**
|
|
141
|
+
- **Every message** logged with full content
|
|
142
|
+
- **Every tool call** logged with input/output
|
|
143
|
+
- **Event store** for analytics and debugging
|
|
144
|
+
|
|
145
|
+
<br />
|
|
146
|
+
|
|
147
|
+
## CLI Reference
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
dotbot v0.16.0 — AI agent CLI
|
|
151
|
+
|
|
152
|
+
Usage:
|
|
153
|
+
dotbot chat "message" Send a one-shot message
|
|
154
|
+
dotbot repl Interactive chat session
|
|
155
|
+
dotbot serve [--port N] Start HTTP server (default: 3000)
|
|
156
|
+
|
|
157
|
+
Options:
|
|
158
|
+
--provider, -p AI provider: xai, anthropic, openai, ollama (default: xai)
|
|
159
|
+
--model, -m Model name (default: grok-3)
|
|
160
|
+
--db SQLite database path (default: ./dotbot.db)
|
|
161
|
+
--port Server port for 'serve' command
|
|
162
|
+
--help, -h Show help
|
|
163
|
+
--version, -v Show version
|
|
164
|
+
|
|
165
|
+
Environment Variables:
|
|
166
|
+
XAI_API_KEY API key for xAI
|
|
167
|
+
ANTHROPIC_API_KEY API key for Anthropic
|
|
168
|
+
OPENAI_API_KEY API key for OpenAI
|
|
169
|
+
OLLAMA_BASE_URL Base URL for Ollama (default: http://localhost:11434)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
<br />
|
|
173
|
+
|
|
174
|
+
## Library API
|
|
175
|
+
|
|
176
|
+
### `createAgent(options)`
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
const agent = createAgent({
|
|
180
|
+
sessionStore, // required — SessionStore instance
|
|
181
|
+
providers: {
|
|
182
|
+
xai: { apiKey }, // API keys for each provider
|
|
183
|
+
anthropic: { apiKey },
|
|
184
|
+
openai: { apiKey },
|
|
185
|
+
ollama: { baseUrl },
|
|
186
|
+
},
|
|
187
|
+
tools: coreTools, // array of tool definitions
|
|
188
|
+
cronStore, // optional — for scheduled jobs
|
|
189
|
+
taskStore, // optional — for autonomous tasks
|
|
190
|
+
triggerStore, // optional — for event triggers
|
|
191
|
+
memoryStore, // optional — for long-term memory
|
|
192
|
+
eventStore, // optional — for audit logging
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### `agent.chat(options)`
|
|
197
|
+
|
|
198
|
+
Streams a response as an async generator:
|
|
199
|
+
|
|
200
|
+
```javascript
|
|
201
|
+
for await (const event of agent.chat({
|
|
202
|
+
sessionId: 'sess_123',
|
|
203
|
+
message: 'Hello',
|
|
204
|
+
provider: 'xai',
|
|
205
|
+
model: 'grok-3',
|
|
206
|
+
signal: abortController.signal, // optional
|
|
207
|
+
context: { userID: 'user123' }, // passed to tools
|
|
208
|
+
})) {
|
|
209
|
+
switch (event.type) {
|
|
210
|
+
case 'text_delta': console.log(event.text); break;
|
|
211
|
+
case 'tool_start': console.log(`[${event.name}]`); break;
|
|
212
|
+
case 'tool_result': console.log(event.result); break;
|
|
213
|
+
case 'done': console.log('Complete'); break;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### SSE Event Types
|
|
219
|
+
|
|
220
|
+
| Event | Fields | Description |
|
|
221
|
+
|-------|--------|-------------|
|
|
222
|
+
| `text_delta` | `text` | Incremental text from model |
|
|
223
|
+
| `thinking` | `text` | Model reasoning (Claude) |
|
|
224
|
+
| `tool_start` | `name`, `input` | Tool execution begins |
|
|
225
|
+
| `tool_result` | `name`, `result` | Tool completed |
|
|
226
|
+
| `tool_error` | `name`, `error` | Tool failed |
|
|
227
|
+
| `done` | `content` | Agent loop complete |
|
|
228
|
+
| `stats` | `inputTokens`, `outputTokens` | Token usage |
|
|
229
|
+
|
|
230
|
+
<br />
|
|
231
|
+
|
|
232
|
+
## Built-in Tools (47)
|
|
233
|
+
|
|
234
|
+
| Category | Tools |
|
|
235
|
+
|----------|-------|
|
|
236
|
+
| **Memory** (6) | `memory_save`, `memory_search`, `memory_delete`, `memory_list`, `memory_read`, `memory_update` |
|
|
237
|
+
| **Web** (3) | `web_search`, `web_fetch`, `grokipedia_search` |
|
|
238
|
+
| **Browser** (7) | `browser_navigate`, `browser_read_page`, `browser_click`, `browser_type`, `browser_screenshot`, `browser_extract`, `browser_close` |
|
|
239
|
+
| **Files** (6) | `file_read`, `file_write`, `file_list`, `file_delete`, `file_move`, `folder_create` |
|
|
240
|
+
| **Images** (3) | `image_generate`, `image_list`, `image_search` |
|
|
241
|
+
| **Tasks** (9) | `task_create`, `task_list`, `task_plan`, `task_work`, `task_step_done`, `task_complete`, `task_delete`, `task_search`, `task_stats` |
|
|
242
|
+
| **Triggers** (4) | `trigger_create`, `trigger_list`, `trigger_toggle`, `trigger_delete` |
|
|
243
|
+
| **Jobs** (4) | `schedule_job`, `list_jobs`, `cancel_job`, `toggle_job` |
|
|
244
|
+
| **Messages** (4) | `message_list`, `message_send`, `message_read`, `message_delete` |
|
|
245
|
+
| **Code** (1) | `run_code` |
|
|
246
|
+
| **Weather** (1) | `weather_get` |
|
|
247
|
+
| **Notify** (1) | `notify_user` |
|
|
248
|
+
| **App Gen** (2) | `app_generate`, `app_validate` |
|
|
249
|
+
|
|
250
|
+
<br />
|
|
251
|
+
|
|
252
|
+
## Task System
|
|
253
|
+
|
|
254
|
+
Tasks enable multi-step autonomous workflows. In `auto` mode, the agent executes steps sequentially without user intervention.
|
|
255
|
+
|
|
256
|
+
```javascript
|
|
257
|
+
// Agent creates and executes a task
|
|
258
|
+
await agent.chat({
|
|
259
|
+
sessionId,
|
|
260
|
+
message: `Create a task to audit our API endpoints.
|
|
261
|
+
Break it into 5 steps, use auto mode.`,
|
|
262
|
+
provider: 'xai',
|
|
263
|
+
model: 'grok-3',
|
|
264
|
+
context: { userID: 'user-123' },
|
|
265
|
+
});
|
|
266
|
+
// Step 1 runs → schedules Step 2 → ... → task complete
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Requires:** `taskStore` and `cronStore` passed to `createAgent()`.
|
|
270
|
+
|
|
271
|
+
<br />
|
|
272
|
+
|
|
273
|
+
## Scheduled Jobs
|
|
274
|
+
|
|
275
|
+
Jobs are cron-like scheduled prompts that fire automatically.
|
|
276
|
+
|
|
277
|
+
```javascript
|
|
278
|
+
// Agent schedules a daily job
|
|
279
|
+
await agent.chat({
|
|
280
|
+
sessionId,
|
|
281
|
+
message: 'Schedule a daily job at 9am to check my calendar and summarize my day',
|
|
282
|
+
...
|
|
283
|
+
});
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**Requires:** `cronStore` passed to `createAgent()`.
|
|
287
|
+
|
|
288
|
+
<br />
|
|
289
|
+
|
|
290
|
+
## Tech Stack
|
|
291
|
+
|
|
292
|
+
| Technology | Purpose |
|
|
293
|
+
|------------|---------|
|
|
294
|
+
| **Node.js 22.5+** | Runtime with built-in SQLite |
|
|
295
|
+
| **Playwright** | Browser automation |
|
|
296
|
+
| **SQLite** | Default storage (zero deps) |
|
|
297
|
+
| **MongoDB** | Scalable storage option |
|
|
298
|
+
|
|
299
|
+
<br />
|
|
300
|
+
|
|
301
|
+
## Package Structure
|
|
302
|
+
|
|
303
|
+
```
|
|
304
|
+
dotbot/
|
|
305
|
+
├── bin/
|
|
306
|
+
│ └── dotbot.js # CLI entry point
|
|
307
|
+
├── core/
|
|
308
|
+
│ ├── agent.js # Streaming agent loop
|
|
309
|
+
│ ├── events.js # SSE event schemas
|
|
310
|
+
│ ├── compaction.js # Context window management
|
|
311
|
+
│ ├── normalize.js # Message format conversion
|
|
312
|
+
│ ├── cron_handler.js # Scheduled job execution
|
|
313
|
+
│ └── trigger_handler.js # Event-driven triggers
|
|
314
|
+
├── storage/
|
|
315
|
+
│ ├── SessionStore.js # Session interface
|
|
316
|
+
│ ├── TaskStore.js # Task interface
|
|
317
|
+
│ ├── CronStore.js # Job scheduling interface
|
|
318
|
+
│ ├── TriggerStore.js # Trigger interface
|
|
319
|
+
│ ├── SQLite*.js # SQLite adapters
|
|
320
|
+
│ └── Mongo*.js # MongoDB adapters
|
|
321
|
+
├── tools/ # 47 built-in tools
|
|
322
|
+
│ ├── memory.js
|
|
323
|
+
│ ├── web.js
|
|
324
|
+
│ ├── browser.js
|
|
325
|
+
│ ├── tasks.js
|
|
326
|
+
│ ├── jobs.js
|
|
327
|
+
│ └── ...
|
|
328
|
+
└── utils/
|
|
329
|
+
└── providers.js # AI provider configs
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
<br />
|
|
333
|
+
|
|
334
|
+
## Requirements
|
|
335
|
+
|
|
336
|
+
- **Node.js 22.5+** with `--experimental-sqlite` flag, or **Node.js 23+**
|
|
337
|
+
- API key for at least one provider (Anthropic, OpenAI, xAI) or local Ollama
|
|
338
|
+
|
|
339
|
+
<br />
|
|
340
|
+
|
|
341
|
+
## Contributing
|
|
342
|
+
|
|
343
|
+
```bash
|
|
344
|
+
git clone https://github.com/stevederico/dotbot
|
|
345
|
+
cd dotbot
|
|
346
|
+
node bin/dotbot.js --help
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
<br />
|
|
350
|
+
|
|
351
|
+
## Community & Support
|
|
352
|
+
|
|
353
|
+
- **X**: [@stevederico](https://x.com/stevederico)
|
|
354
|
+
- **Issues**: [GitHub Issues](https://github.com/stevederico/dotbot/issues)
|
|
355
|
+
|
|
356
|
+
<br />
|
|
357
|
+
|
|
358
|
+
## Related Projects
|
|
359
|
+
|
|
360
|
+
- [dottie-desktop](https://github.com/stevederico/dottie-desktop) — macOS AI assistant powered by dotbot
|
|
361
|
+
- [skateboard](https://github.com/stevederico/skateboard) — React starter with auth, Stripe, and SQLite
|
|
362
|
+
|
|
363
|
+
<br />
|
|
364
|
+
|
|
365
|
+
## License
|
|
366
|
+
|
|
367
|
+
MIT License — use it however you want. See [LICENSE](LICENSE) for details.
|
|
368
|
+
|
|
369
|
+
<br />
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
<div align="center">
|
|
374
|
+
<p>
|
|
375
|
+
Built with care by <a href="https://github.com/stevederico">Steve Derico</a>
|
|
376
|
+
</p>
|
|
377
|
+
<p>
|
|
378
|
+
<a href="https://github.com/stevederico/dotbot">Star on GitHub</a> — it helps!
|
|
379
|
+
</p>
|
|
380
|
+
</div>
|