gloamy 0.1.9

Rust-first autonomous agent runtime for CLI, channels, gateway, and hardware workflows.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
<div align="center">
   <h1>Gloamy</h1>
</div>

<p align="center">
  <img src="https://res.cloudinary.com/diekemzs9/image/upload/v1774631483/hairy_gloam-3_den5zj.png" alt="Gloamy Mascot" width="250"/>
</p>


# Intro
When the claws 🦞 are asleep the gloamies 🦉 come out to play !

Hi I'm Gloamy, I execute tasks on your behalf without deleting your stuff, leaking your private business, oh and I'm lightweight unlike that damn lobster  (openclaw).

# Overview
![Desktop](/mobile_shots.png)
![Desktop](/desktop.png)


Gloamy is built around explicit subsystem contracts:

- `Provider` for model backends
- `Channel` for messaging platforms
- `Tool` for execution surfaces
- `Memory` for persistence and recall
- `Observer` for observability
- `RuntimeAdapter` for runtime isolation
- `Peripheral` for boards and device integrations

The project goal is simple: Local first agents for real-world tasks

## What Gloamy Does

Gloamy can:

- chat with you in your terminal
- stay running in the background to handle messages
- control apps on your pc with permissions
- let desktop and external API clients connect through the gateway
- use different AI models to answer questions
- run tools and scripts on your computer or online, safely
- remember things between sessions
- connect to devices and smart hardware

Out of the box, the runtime supports:

- local CLI usage
- channel-based operation through providers such as Telegram, Discord, Slack, Matrix, WhatsApp, iMessage, Email, IRC, Nostr, and others
- OpenAI-compatible and non-OpenAI model providers
- SQLite, Markdown, Lucid, PostgreSQL, and no-op memory modes

## Project Shape

High-level repository map:

- [`src/main.rs`]src/main.rs: CLI entrypoint and command routing
- [`src/lib.rs`]src/lib.rs: shared exports and command enums
- [`src/agent/`]src/agent: orchestration loop
- [`src/config/`]src/config: config schema, loading, merging, env overrides
- [`src/providers/`]src/providers: model provider implementations and factory wiring
- [`src/channels/`]src/channels: channel integrations
- [`src/tools/`]src/tools: tool execution surface
- [`src/memory/`]src/memory: memory backends
- [`src/security/`]src/security: policy, pairing, secret handling
- [`src/gateway/`]src/gateway: HTTP and websocket gateway
- [`src/runtime/`]src/runtime: runtime adapters
- [`src/peripherals/`]src/peripherals: hardware integrations
- [`desktop/`]desktop: Tauri + Vue desktop application
- [`docs/`]docs: operator, reference, and contribution docs

## Key Properties

- Trait-driven architecture
- Secure-by-default runtime behavior
- Small binary and low runtime overhead
- Explicit config and CLI contracts
- Swappable providers, channels, memory backends, and tools
- Deterministic, Rust-first deployment model

## Optional Robot

The repository also includes [`crates/robot`](crates/robot), a standalone robot-control crate for motion, sensing, speech, vision, simple robot expression, and safety-gated drive control.

Use it when you want to experiment with Raspberry Pi or robot hardware integrations without wiring those surfaces directly into the main runtime. It is a workspace member, but it is not auto-registered into `gloamy`'s core tool factory.

Start here:

- [`crates/robot/README.md`]crates/robot/README.md for the crate surface and integration model
- [`crates/robot/robot.toml`]crates/robot/robot.toml for the sample configuration
- [`crates/robot/PI5_SETUP.md`]crates/robot/PI5_SETUP.md for Raspberry Pi 5 setup notes

## Quick Start

### Prerequisites

You need:

- a working Rust toolchain
- standard platform build tools
- an API key or local model endpoint, depending on your provider

On macOS:

```bash
xcode-select --install
```

On Debian or Ubuntu:

```bash
sudo apt install build-essential pkg-config
```

Install Rust:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
```

Verify:

```bash
rustc --version
cargo --version
```

### Install

Install from [crates.io](https://crates.io/crates/gloamy):

```bash
cargo install gloamy --locked
```

Then run full onboarding:

```bash
gloamy onboard --interactive
```

If you prefer to run from source, clone the repository and start onboarding:

```bash
git clone https://github.com/iBz-04/gloamy.git
cd gloamy
cargo run -- onboard --interactive
```

The crates.io install is the recommended default for end users. The source path is better when you want to develop, patch, or test unreleased changes.

The full onboarding flow lets you:

- choose your provider and default model
- configure channels
- set memory behavior
- create workspace identity files
- avoid partial setup drift

After onboarding, start a direct CLI session:

```bash
cargo run -- agent
```

If you want persistent channel operation after setup:

```bash
cargo run -- daemon
```

### Bootstrap Script

If you prefer the bootstrap path:

```bash
./bootstrap.sh --interactive-onboard
```

Useful bootstrap variants:

```bash
./bootstrap.sh
./bootstrap.sh --install-system-deps --install-rust
./bootstrap.sh --prefer-prebuilt
./bootstrap.sh --prebuilt-only
./bootstrap.sh --docker
```

Reference: [`docs/one-click-bootstrap.md`](docs/one-click-bootstrap.md)

### Non-Interactive Setup

If you already know exactly what you want, you can skip the full wizard:

```bash
cargo run -- onboard --api-key YOUR_OPENAI_KEY --provider openai --model gpt-5-mini
```

This path is faster, but the interactive onboarding flow is the better default for first setup.

## Migrating from OpenClaw

Gloamy can import memory from an existing OpenClaw workspace into your current Gloamy workspace.

Preview the migration first:

```bash
cargo run -- migrate openclaw --dry-run
```

Run the import:

```bash
cargo run -- migrate openclaw
```

Use a custom OpenClaw workspace path if needed:

```bash
cargo run -- migrate openclaw --source /path/to/openclaw/workspace
```

What the migration does:

- reads importable memory from `~/.openclaw/workspace` by default
- imports entries from `memory/brain.db`, `MEMORY.md`, and `memory/*.md`
- skips unchanged entries on re-run and renames conflicting keys deterministically
- creates a backup of the target Gloamy memory before writing

What it does not do:

- it does not migrate arbitrary workspace files
- it does not convert OpenClaw config into Gloamy `config.toml`

If you want a safe preview of the candidate entries without writing data, use `--dry-run`.

## Desktop App

This repository also includes a desktop application in [`desktop/`](desktop), built with Tauri (Rust backend) and Vue 3 (frontend).

 Use the desktop app for the primary UI, and use the gateway for webhook/API access.

If you want to run the desktop UI locally:

```bash
cd desktop
pnpm install
pnpm tauri dev
```

For desktop-specific setup, development, and packaging details, see [`desktop/README.md`](desktop/README.md).

## Running Modes

### Interactive CLI

Start a direct chat session:

```bash
cargo run -- agent
```

Run a one-shot prompt:

```bash
cargo run -- agent -m "Summarize today's logs"
```

Override provider and model for one run:

```bash
cargo run -- agent --provider openai --model gpt-5-mini -m "hello"
```

### Daemon

Run the long-lived runtime:

```bash
cargo run -- daemon
```

The daemon starts:

- configured channels
- gateway server
- heartbeat
- scheduler

Use this mode when you want Telegram or other channels to stay online.

### Gateway

Run only the local gateway:

```bash
cargo run -- gateway
```

The gateway exposes HTTP, webhook, and websocket endpoints for external integrations. It no longer serves a browser dashboard.

### Channels Only

Run the configured channels without the full daemon stack:

```bash
cargo run -- channel start
```

## First-Time Configuration

The primary setup command is:

```bash
gloamy onboard
```

Common variants:

```bash
gloamy onboard --interactive
gloamy onboard --channels-only
gloamy onboard --force
gloamy onboard --api-key YOUR_KEY --provider openai --model gpt-5-mini
```

If you already have a config and only want to wire channels, use:

```bash
gloamy onboard --channels-only
```

## Channels

Gloamy supports multiple inbound and outbound channels. Channel setup is stored in config, and the daemon uses that config at runtime.

Typical flow:

1. Run `gloamy onboard --channels-only`
2. Configure Telegram, Discord, Slack, WhatsApp, or another channel
3. Start `gloamy daemon`
4. Verify with `gloamy status` and `gloamy channel doctor`

Important operational note:

- `gloamy agent` is for direct CLI use
- `gloamy daemon` is what you run for persistent channel operation

Canonical reference: [`docs/channels-reference.md`](docs/channels-reference.md)

## Configuration

Default config location:

```text
~/.gloamy/config.toml
```

Default workspace:

```text
~/.gloamy/workspace
```

Minimal example:

```toml
api_key = "sk-..."
default_provider = "openai"
default_model = "gpt-5-mini"
default_temperature = 0.7

[memory]
backend = "sqlite"
auto_save = true
embedding_provider = "none"
vector_weight = 0.7
keyword_weight = 0.3
```

Notes:

- `default_provider` controls the main runtime provider
- `default_model` controls the default model for CLI, channel, and daemon flows
- `default_temperature` may be ignored by some providers or models
- several settings can also be overridden by environment variables

Canonical reference: [`docs/config-reference.md`](docs/config-reference.md)

## Provider Model

Gloamy supports:

- direct providers such as OpenAI, Anthropic, Gemini, Groq, Mistral, DeepSeek, Venice, GLM, Qwen, and others
- OpenAI-compatible custom endpoints
- provider aliases and routed model configuration
- subscription-native auth flows for supported providers

Examples:

```bash
gloamy agent --provider openai --model gpt-5-mini -m "hello"
gloamy agent --provider anthropic -m "hello"
gloamy agent --provider openai-codex -m "hello"
```

References:

- [`docs/providers-reference.md`]docs/providers-reference.md
- [`docs/custom-providers.md`]docs/custom-providers.md

## Security Model

Gloamy is designed to fail closed where practical.

Important defaults:

- localhost-first binding
- explicit pairing for gateway auth flows
- workspace-scoped file access
- deny-by-default channel allowlists
- encrypted secret support
- explicit security policy for tool and command execution

Operational guidance:

- do not expose the gateway directly without understanding the bind and tunnel settings
- use allowlists for channels instead of wide-open routing
- keep secrets in config or environment variables, not in workspace files
- review tool and command permissions before enabling broad autonomy

References:

- [`docs/security/README.md`]docs/security/README.md
- [`docs/operations-runbook.md`]docs/operations-runbook.md
- [`docs/troubleshooting.md`]docs/troubleshooting.md

## Memory

Supported memory backends include:

- SQLite
- Markdown
- Lucid
- PostgreSQL
- `none`

SQLite is the usual default because it gives:

- local persistence
- keyword and vector search support
- practical low-friction setup

Reference: [`docs/config-reference.md`](docs/config-reference.md)

## Commands You Will Actually Use

```bash
gloamy status
gloamy doctor
gloamy channel doctor
gloamy agent
gloamy daemon
gloamy gateway
gloamy onboard --interactive
gloamy onboard --channels-only
gloamy auth status
gloamy service install
gloamy service status
gloamy service restart
```

Canonical command reference: [`docs/commands-reference.md`](docs/commands-reference.md)

## Development

Recommended local validation:

```bash
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
```

Preferred full local validation path when available:

```bash
./dev/ci.sh all
```

Useful development commands:

```bash
cargo run -- status
cargo run -- doctor
cargo run -- agent -m "hello"
cargo run -- daemon
```

If you are working on docs, start here:

- [`docs/README.md`]docs/README.md
- [`docs/SUMMARY.md`]docs/SUMMARY.md

## Documentation Map

Start from the docs hub:

- Docs hub: [`docs/README.md`]docs/README.md
- Unified TOC: [`docs/SUMMARY.md`]docs/SUMMARY.md
- Getting started: [`docs/getting-started/README.md`]docs/getting-started/README.md
- Reference: [`docs/reference/README.md`]docs/reference/README.md
- Operations: [`docs/operations/README.md`]docs/operations/README.md
- Security: [`docs/security/README.md`]docs/security/README.md
- Hardware: [`docs/hardware/README.md`]docs/hardware/README.md
- Contributing workflow: [`docs/pr-workflow.md`]docs/pr-workflow.md

High-signal runtime references:

- [`docs/commands-reference.md`]docs/commands-reference.md
- [`docs/providers-reference.md`]docs/providers-reference.md
- [`docs/channels-reference.md`]docs/channels-reference.md
- [`docs/config-reference.md`]docs/config-reference.md
- [`docs/operations-runbook.md`]docs/operations-runbook.md
- [`docs/troubleshooting.md`]docs/troubleshooting.md

## Official Repository

Official source of truth:

- [https://github.com/iBz-04/gloamy]https://github.com/iBz-04/gloamy

If you encounter impersonation or a misleading fork, open an issue in the official repository.

## Contributing

If you want to contribute:

- review [`AGENTS.md`]AGENTS.md for repository engineering expectations
- read [`docs/pr-workflow.md`]docs/pr-workflow.md
- use [`docs/reviewer-playbook.md`]docs/reviewer-playbook.md for review standards

Good entry points:

- new provider in `src/providers/`
- new channel in `src/channels/`
- new tool in `src/tools/`
- new memory backend in `src/memory/`
- new observer in `src/observability/`

## License

Gloamy is licensed under [MIT](LICENSE).

# Contact
reach me @  `issakaibrahimrayamah@gmail.com`