@sulala/agent-os 0.1.19 → 0.1.22

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/README.md CHANGED
@@ -1,37 +1,137 @@
1
- # Agent OS
1
+ # Sulala Agent OS
2
2
 
3
- Lightweight **Bun-based Agent Operating System** — micro-agents, installable skills, workflows.
3
+ Lightweight **Bun-based Agent Operating System** — micro-agents, installable skills, workflows, and a web dashboard.
4
4
 
5
- ## Quick start
5
+ ## How lightweight is Sulala?
6
+
7
+ Compared to typical AI agent frameworks, **Sulala is extremely small** — the core repo is only on the order of **~100 KB**, and even with dependencies it stays around **sub‑MB scale**.
8
+
9
+ | Framework | Core size (approx.) | With dependencies (approx.) |
10
+ | ----------- | ------------------- | ---------------------------- |
11
+ | **Sulala** | ~100–150 KB | ~0.5–1 MB |
12
+ | LangChain | tens of MB | 100+ MB |
13
+ | CrewAI | few MB | 50–80 MB |
14
+ | AutoGen | tens of MB | 150–300 MB |
15
+ | AutoGPT | tens of MB | 200 MB+ |
16
+
17
+ Sulala stays tiny because it focuses on a **minimal runtime**:
18
+
19
+ - **Core runtime + CLI + dashboard**
20
+ - **Agents, skills, channels, tools**
21
+ - **External AI providers** (OpenAI, Anthropic, OpenRouter, etc.)
22
+
23
+ It does **not** bundle heavy Python stacks (numpy, vector DBs, complex orchestration engines), so it fits into the category of **“minimal runtime agent frameworks”**—closer to MicroGPT/SmolAgents than to large toolkits like LangChain.
24
+
25
+ ## Install
26
+
27
+ **From npm (Bun or Node 18+):**
28
+
29
+ ```bash
30
+ bun add -g @sulala/agent-os
31
+ # or: npm install -g @sulala/agent-os
32
+ ```
33
+
34
+ **One-line install (macOS & Linux):**
6
35
 
7
36
  ```bash
8
- # Install deps
37
+ curl -fsSL --proto '=https' --tlsv1.2 https://sulala.ai/install.sh | bash
38
+ ```
39
+
40
+ **Windows (PowerShell):**
41
+
42
+ ```powershell
43
+ irm -useb https://sulala.ai/install.ps1 | iex
44
+ ```
45
+
46
+ After install, run `sulala onboard` to create config, seed agents, and open the dashboard. The installer prints a **dashboard login token** — copy it to log in at `http://127.0.0.1:3010`.
47
+
48
+ ## Run locally (from source)
49
+
50
+ ```bash
51
+ # 1) Install dependencies (requires Bun 1.0+)
9
52
  bun install
10
53
 
54
+ # 2) (Optional) Configure agents directory
11
55
  # For dev, agents are loaded from ./data/agents (pre-configured).
12
56
  # For production, copy to ~/.agent-os/agents/ or set AGENT_OS_AGENTS_DIR.
13
57
 
14
- # Set LLM API key (OpenAI or OpenRouter)
58
+ # 3) Set LLM API key (OpenAI, OpenRouter, Anthropic, or Google — or add in Dashboard → Settings)
15
59
  export OPENAI_API_KEY=sk-...
16
60
  # or: export OPENROUTER_API_KEY=sk-or-...
17
61
 
18
- # Start server
62
+ # 4) Start the dev server from the package root
19
63
  bun run dev
20
64
  ```
21
65
 
22
- Then:
66
+ Then open **http://127.0.0.1:3010** for the dashboard. If the dashboard isn’t built yet, build it from the `dashboard/` directory:
67
+
68
+ ```bash
69
+ cd dashboard
70
+ npm install
71
+ npm run build
72
+ cd ..
73
+ ```
74
+
75
+ Then restart `bun run dev`.
76
+
77
+ ## Dashboard
78
+
79
+ The web UI at **http://127.0.0.1:3010** (or your `PORT`) lets you:
80
+
81
+ - **Agents** — Create, edit, and run agents
82
+ - **Chat** — Talk to an agent with streaming and attachments
83
+ - **Graphs** — Multi-agent workflows
84
+ - **Skills** — Install and configure skills from the marketplace
85
+ - **Schedules** — Cron-style runs
86
+ - **Memory** — View and search agent memory
87
+ - **Settings** — AI provider keys, Telegram/Slack/Discord/Viber, and dashboard access
88
+
89
+ ### Dashboard access (gateway token)
90
+
91
+ The server protects the dashboard with a **gateway token** (stored in `~/.agent-os/config.json` or set via `DASHBOARD_SECRET`). To get or regenerate it:
92
+
93
+ ```bash
94
+ # View current token (copy and paste in the dashboard login)
95
+ sulala dashboard-token
96
+
97
+ # Generate a new token (then restart the server)
98
+ sulala dashboard-token --regenerate
99
+ ```
100
+
101
+ After `sulala onboard`, the token is printed in the terminal — copy it to log in. You can also regenerate the token from **Settings → Dashboard access** in the dashboard (restart the server for the new token to take effect).
102
+
103
+ ## CLI
104
+
105
+ When installed globally, the `sulala` CLI is available:
106
+
107
+ | Command | Description |
108
+ |--------|-------------|
109
+ | `sulala start` | Start the server (foreground) |
110
+ | `sulala start --daemon` | Start the server in the background |
111
+ | `sulala stop` | Stop the daemon (macOS/Linux) |
112
+ | `sulala onboard` | First-time setup: create config, seed agents, open dashboard |
113
+ | `sulala dashboard-token` | Show the dashboard login token |
114
+ | `sulala dashboard-token --regenerate` | Generate a new token (restart server after) |
115
+ | `sulala run <agent_id> <task>` | Run an agent with a one-off task |
116
+ | `sulala update` | Update package and system agents/skills |
117
+ | `sulala version` | Show version |
118
+
119
+ Example:
120
+
121
+ ```bash
122
+ sulala run echo_agent "What is 2+2?"
123
+ ```
124
+
125
+ ## HTTP API
23
126
 
24
127
  ```bash
25
128
  # List agents
26
129
  curl http://127.0.0.1:3010/api/agents
27
130
 
28
- # Run agent (HTTP)
131
+ # Run agent (HTTP). If the server uses a gateway token, add: -H "Authorization: Bearer <token>"
29
132
  curl -X POST http://127.0.0.1:3010/api/agents/run \
30
133
  -H "Content-Type: application/json" \
31
134
  -d '{"agent_id":"echo_agent","task":"Hello, what can you do?"}'
32
-
33
- # Or run from CLI
34
- AGENT_OS_AGENTS_DIR=./data/agents bun run cli echo_agent "What is 2+2?"
35
135
  ```
36
136
 
37
137
  ## Configuration
@@ -40,25 +140,37 @@ AGENT_OS_AGENTS_DIR=./data/agents bun run cli echo_agent "What is 2+2?"
40
140
  |-----|-------------|
41
141
  | `PORT` | Server port (default: 3010) |
42
142
  | `HOST` | Server host (default: 127.0.0.1) |
143
+ | `AGENT_OS_HOME` | Config and data directory (default: ~/.agent-os) |
144
+ | `DASHBOARD_SECRET` | Optional. Dashboard gateway token; if unset, a token is auto-generated and stored in config. View or regenerate: `sulala dashboard-token` |
43
145
  | `OPENAI_API_KEY` | OpenAI API key |
44
- | `OPENROUTER_API_KEY` | OpenRouter API key (alternative) |
146
+ | `ANTHROPIC_API_KEY` | Anthropic API key |
147
+ | `GOOGLE_API_KEY` | Google AI API key |
148
+ | `OPENROUTER_API_KEY` | OpenRouter API key |
45
149
  | `AGENT_OS_AGENTS_DIR` | Override agents directory (default: ~/.agent-os/agents/) |
150
+ | `AGENT_MEMORY_DB_PATH` | SQLite path for memory (default: ~/.agent-os/database.db) |
151
+
152
+ API keys can also be set in **Dashboard → Settings → AI Provider** and are stored in `~/.agent-os/config.json`.
46
153
 
47
154
  ## Project structure
48
155
 
49
156
  ```
50
- tinyagent/
157
+ sulala/
51
158
  src/
52
- core/ # Agent registry, runtime, LLM, tools
53
- types/ # Agent config schema
54
- server.ts # HTTP API
159
+ core/ # Agent registry, runtime, LLM, config
160
+ http/ # API handlers, channels (Telegram, Slack, etc.)
161
+ skills/ # Skill loader, tools
162
+ tools/ # Built-in tools (exec, run-agent, etc.)
163
+ server.ts # HTTP API + dashboard static
164
+ cli.ts # sulala CLI
55
165
  index.ts # Entry point
56
- examples/ # Example agent configs
57
- skills/ # Example skills (weather, etc.)
58
- docs/ # Specs (AGENT_SPEC, SKILL_SPEC, etc.)
166
+ dashboard/ # Vite + React dashboard (build → dashboard-dist)
167
+ data/ # Agents, skills, templates
168
+ install.sh # One-line install (macOS/Linux)
169
+ install.ps1 # One-line install (Windows)
170
+ docs/ # Specs and setup guides
59
171
  ```
60
172
 
61
- ## Built-in tools (Phase 2)
173
+ ## Built-in tools
62
174
 
63
175
  | Tool | Description |
64
176
  |--------|---------------------------|
@@ -67,36 +179,27 @@ tinyagent/
67
179
 
68
180
  Agents get all tools by default. Restrict via `tools: ["echo"]` in agent config.
69
181
 
70
- ## Skills (Phase 3)
182
+ ## Skills
71
183
 
72
- Skills live under `~/.agent-os/skills/<name>/` (or `AGENT_OS_SKILLS_DIR`). Example:
184
+ Skills live under `~/.agent-os/skills/<name>/` (or `AGENT_OS_SKILLS_DIR`). Each skill is defined by **SKILL.md** only (no standalone `skill.yaml` or `tools.yaml`). You can add any supported script (e.g. shell, Python, Node) in a `scripts/` folder; the agent runs them via the exec tool using the skill id. Example:
73
185
 
74
186
  ```
75
187
  ~/.agent-os/skills/weather/
76
- skill.yaml
77
- tools.yaml
188
+ SKILL.md
189
+ scripts/
190
+ fetch.sh
78
191
  ```
79
192
 
80
- Agents declare skills:
81
-
82
- ```json
83
- {
84
- "id": "weather_agent",
85
- "name": "Weather Assistant",
86
- "model": "gpt-4o-mini",
87
- "skills": ["weather"],
88
- "tools": ["weather_current"]
89
- }
90
- ```
193
+ Agents declare skills in their config; install default skills from the **Dashboard → Skills** marketplace. The skill loader reads **SKILL.md** (YAML frontmatter or a ` ```yaml ` block) for metadata and optional HTTP tools; scripts in `scripts/` are invoked by the exec tool.
91
194
 
92
- At runtime, the skill loader reads `tools.yaml` and registers HTTP tools into the tool registry.
195
+ ## Channels (Telegram, Slack, Discord, …)
93
196
 
94
- ## Channels (Telegram)
197
+ You can talk to your agent from Telegram, Slack, Discord, Signal, or Viber. Create a bot (e.g. [@BotFather](https://t.me/BotFather) for Telegram), add the token and default agent in **Dashboard → Settings**, expose your server over HTTPS (e.g. ngrok), and set the webhook. Full steps for Telegram: [doc/TELEGRAM_SETUP.md](doc/TELEGRAM_SETUP.md) (if present).
95
198
 
96
- You can talk to your agent from Telegram. Create a bot with [@BotFather](https://t.me/BotFather), add the token and default agent in **Dashboard → Settings → Telegram**, expose your server over HTTPS (e.g. ngrok), and set the webhook. Full steps: [doc/TELEGRAM_SETUP.md](doc/TELEGRAM_SETUP.md).
199
+ ## Documentation
97
200
 
98
- ## Roadmap
201
+ For full setup guides, advanced configuration, and examples, see the official docs at [`https://doc.sulala.ai`](https://doc.sulala.ai).
99
202
 
100
- See [roadmap.md](./roadmap.md) for phases. Phases 1–3 (Core Runtime, Tool System, Skill System) are implemented at a minimal level.
203
+ ## License
101
204
 
102
- # sulala
205
+ MIT