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
Add integration tests for auto-orchestration, profile reflection, and scheduler
- Implement integration tests for auto-orchestration in natural language turns, ensuring orchestrator functionality when enabled and fallback to agent loop when disabled.
- Create tests for user profile prompt injection and learned-skill reflection, verifying the correct handling of user profiles and skill materialization.
- Introduce tests for the reusable scheduler tick executor, validating the execution of scheduled tasks, task state management, and interaction with active sessions.
- Document the implementation plan for the second phase of the Alice agent evolution, outlining tasks for runtime-state persistence, identity binding, background scheduling, and multi-ACP orchestration.
Copy file name to clipboardExpand all lines: README.md
+122Lines changed: 122 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,13 @@
9
9
10
10
A configurable AI agent application with pluggable backends, built with hexagonal architecture on top of the [Bob](https://github.com/longcipher/bob) framework.
11
11
12
+
Alice combines short-term turn memory with two longer-lived learning layers:
13
+
14
+
- User profiles: Alice distills durable user preferences and project context into a profile that is injected into future turns.
15
+
- Learned skills: when reflection is enabled, Alice can synthesize reusable `SKILL.md` files from successful sessions and save them into a configured skills directory.
16
+
- Global identity bindings: CLI, Telegram, and Discord users can be linked to one global user id so active sessions survive channel switches.
17
+
- Scheduled tasks: Alice can persist recurring background prompts in SQLite, execute them from a Tokio scheduler loop, and push results back into the active bound channel thread when available.
cargo run -p alice-cli -- --config alice.toml schedule add \
97
+
--global-user-id alice-user-1 \
98
+
--prompt "summarize recent alerts" \
99
+
--every-minutes 60
100
+
85
101
# Run with multi-channel support
86
102
cargo run -p alice-cli -- --config alice.toml channel
87
103
```
@@ -104,6 +120,14 @@ bm25_weight = 0.3
104
120
vector_weight = 0.7
105
121
vector_dimensions = 384
106
122
enable_vector = true
123
+
124
+
[reflection]
125
+
enabled = false
126
+
learned_skills_dir = "./skills/learned"
127
+
128
+
[scheduler]
129
+
enabled = false
130
+
poll_interval_ms = 30000
107
131
```
108
132
109
133
### Agent Backend
@@ -122,6 +146,22 @@ backend = "acp"
122
146
acp_command = "opencode"
123
147
acp_args = ["serve", "--acp"]
124
148
acp_working_dir = "/path/to/project"
149
+
150
+
# Multi-profile ACP orchestration
151
+
[agent]
152
+
backend = "acp"
153
+
auto_orchestrate = true
154
+
primary_profile = "manager"
155
+
156
+
[agent.acp_profiles.manager]
157
+
command = "opencode"
158
+
args = ["serve", "--acp"]
159
+
working_dir = "/path/to/project"
160
+
161
+
[agent.acp_profiles.writer]
162
+
command = "codex"
163
+
args = ["--acp"]
164
+
working_dir = "/path/to/project"
125
165
```
126
166
127
167
Build with ACP support:
@@ -145,6 +185,41 @@ path = "./skills"
145
185
recursive = true
146
186
```
147
187
188
+
When `[reflection]` is enabled, point `learned_skills_dir` under one of your configured skill source roots, for example `./skills/learned`. Alice reloads skill sources on each turn, so reflected skills can be selected without restarting the process.
189
+
190
+
### Long-Term Profiles
191
+
192
+
Alice stores long-lived user profiles alongside the memory index in SQLite. These profiles are updated from durable self-descriptions in user turns, such as preferences, project constraints, and repository context, then injected into future prompts as "Known user profile" context.
193
+
194
+
### Global Identity Binding
195
+
196
+
Use `--global-user-id` on CLI `run` or `chat` sessions to anchor them to a stable user identity:
197
+
198
+
```bash
199
+
cargo run -p alice-cli -- --config alice.toml chat --global-user-id alice-user-1
200
+
```
201
+
202
+
Then issue a bind token and consume it from Telegram or Discord with `/bind <token>`:
Once a channel identity is bound, Alice reuses the latest active session lease for that global user whenever possible.
209
+
For long-running channel sessions, Alice also records the active thread id so background scheduler results can be posted back to the same Telegram or Discord conversation.
210
+
211
+
### Learned Skill Reflection
212
+
213
+
Enable post-turn reflection to have Alice run a hidden reflection pass after successful responses:
214
+
215
+
```toml
216
+
[reflection]
217
+
enabled = true
218
+
learned_skills_dir = "./skills/learned"
219
+
```
220
+
221
+
The reflector writes learned workflows as `./skills/learned/<skill-name>/SKILL.md`. If a turn does not teach a reusable workflow, nothing is written.
222
+
148
223
### Telegram
149
224
150
225
Alice supports Telegram as a chat channel via the `teloxide` crate.
Enable the background scheduler loop in long-running `chat` or `channel` sessions:
290
+
291
+
```toml
292
+
[scheduler]
293
+
enabled = true
294
+
poll_interval_ms = 30000
295
+
```
296
+
297
+
Create and inspect scheduled tasks from the CLI:
298
+
299
+
```bash
300
+
# Every 30 minutes
301
+
cargo run -p alice-cli -- --config alice.toml schedule add \
302
+
--global-user-id alice-user-1 \
303
+
--prompt "summarize pending PR reviews" \
304
+
--every-minutes 30
305
+
306
+
# Daily at 08:15
307
+
cargo run -p alice-cli -- --config alice.toml schedule add \
308
+
--global-user-id alice-user-1 \
309
+
--prompt "prepare the morning project brief" \
310
+
--daily-hour 8 \
311
+
--daily-minute 15
312
+
313
+
cargo run -p alice-cli -- --config alice.toml schedule list
314
+
```
315
+
316
+
Scheduled tasks execute through the normal memory-aware turn pipeline. When the owning global user has an active bound channel/thread lease and that channel adapter is live, Alice posts the task result back into that same thread.
317
+
318
+
### ACP Orchestration
319
+
320
+
When multiple ACP profiles are configured, you can run an explicit manager/worker orchestration flow:
--manager-prompt "Plan how to refactor the auth subsystem." \
326
+
--worker planner "Outline the migration steps." \
327
+
--worker writer "Draft the concrete code changes."
328
+
```
329
+
330
+
If `agent.auto_orchestrate = true`, ordinary natural-language chat turns also fan out through the configured non-primary ACP profiles and return the aggregated orchestration summary to the user.
331
+
210
332
## Example: Using OpenCode as an ACP Agent
211
333
212
334
[OpenCode](https://opencode.ai) is a terminal-based AI coding agent that supports ACP mode.
0 commit comments