@mono-agent/agent-app 0.2.2 → 0.4.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/README.md +9 -5
- package/dist/adapter-send-tools-main.d.ts +3 -0
- package/dist/adapter-send-tools-main.d.ts.map +1 -0
- package/dist/adapter-send-tools-main.js +20 -0
- package/dist/adapter-send-tools-main.js.map +1 -0
- package/dist/adapter-send-tools.d.ts +59 -0
- package/dist/adapter-send-tools.d.ts.map +1 -0
- package/dist/adapter-send-tools.js +254 -0
- package/dist/adapter-send-tools.js.map +1 -0
- package/dist/app-config.d.ts +40 -17
- package/dist/app-config.d.ts.map +1 -1
- package/dist/app-config.js +188 -68
- package/dist/app-config.js.map +1 -1
- package/dist/app.d.ts +41 -20
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +349 -87
- package/dist/app.js.map +1 -1
- package/dist/backfill.d.ts +79 -0
- package/dist/backfill.d.ts.map +1 -0
- package/dist/backfill.js +246 -0
- package/dist/backfill.js.map +1 -0
- package/dist/background.d.ts +0 -4
- package/dist/background.d.ts.map +1 -1
- package/dist/background.js +78 -50
- package/dist/background.js.map +1 -1
- package/dist/channels.d.ts +7 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +26 -3
- package/dist/channels.js.map +1 -1
- package/dist/cli.d.ts +53 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +317 -113
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +8 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +236 -30
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1 -1
- package/dist/init.js.map +1 -1
- package/dist/launchd.d.ts +0 -2
- package/dist/launchd.d.ts.map +1 -1
- package/dist/launchd.js +0 -2
- package/dist/launchd.js.map +1 -1
- package/dist/memory-recall-main.d.ts +3 -0
- package/dist/memory-recall-main.d.ts.map +1 -0
- package/dist/memory-recall-main.js +30 -0
- package/dist/memory-recall-main.js.map +1 -0
- package/dist/memory-recall.d.ts +111 -0
- package/dist/memory-recall.d.ts.map +1 -0
- package/dist/memory-recall.js +275 -0
- package/dist/memory-recall.js.map +1 -0
- package/dist/memory-rituals.d.ts +51 -0
- package/dist/memory-rituals.d.ts.map +1 -0
- package/dist/memory-rituals.js +228 -0
- package/dist/memory-rituals.js.map +1 -0
- package/dist/sessions.d.ts +21 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +45 -0
- package/dist/sessions.js.map +1 -0
- package/dist/ui.d.ts +54 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +153 -0
- package/dist/ui.js.map +1 -0
- package/package.json +22 -17
- package/skills/mono-agent-composer/SKILL.md +7 -6
- package/skills/mono-agent-composer/references/config-blueprint.md +53 -22
- package/skills/mono-agent-composer/references/discovery-questions.md +121 -10
- package/skills/mono-agent-composer/references/feature-coverage.md +15 -12
- package/skills/mono-agent-composer/references/package-map.md +9 -11
- package/skills/mono-agent-composer/references/validation.md +5 -4
|
@@ -5,7 +5,7 @@ description: Construct a working mono-agent in the current folder from one mono-
|
|
|
5
5
|
|
|
6
6
|
# Mono Agent Composer
|
|
7
7
|
|
|
8
|
-
Construct a working mono-agent in the user's current folder — empty or already holding knowledge — from one `mono-agent.config.json`. Discover what the user wants (runtime with backup models, communication channels incl. crons and webhooks, skills, MCP servers, memory strategy incl. semantic search, sandbox,
|
|
8
|
+
Construct a working mono-agent in the user's current folder — empty or already holding knowledge — from one `mono-agent.config.json`. Discover what the user wants (runtime with backup models, communication channels incl. crons and webhooks, skills, MCP servers, memory strategy incl. semantic search, sandbox, observability), write the config, then make it run with the `mono-agent` CLI. The config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it too); changes apply on the next `mono-agent restart`. No hand-written host code unless the user genuinely needs programmatic composition. `references/feature-coverage.md` maps every framework feature to a config key, CLI flag, or the programmatic escape hatch — consult it before declaring anything impossible or inventing keys.
|
|
9
9
|
|
|
10
10
|
## Operating Rules
|
|
11
11
|
|
|
@@ -25,11 +25,12 @@ The `mono-agent` CLI ships with `@mono-agent/agent-app` on npm:
|
|
|
25
25
|
npm install -g @mono-agent/agent-app # or: npx @mono-agent/agent-app …
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
To run an unreleased build instead, use a clone of the mono-agent workspace:
|
|
28
|
+
To run an unreleased build instead, use a clone of the mono-agent workspace with Node 20+ and pnpm 10 or newer already installed:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
git clone <mono-agent-repo> ~/mono-agent && cd ~/mono-agent
|
|
32
|
-
|
|
32
|
+
pnpm install --frozen-lockfile
|
|
33
|
+
pnpm run build
|
|
33
34
|
alias mono-agent="node ~/mono-agent/packages/agent-app/dist/cli.js"
|
|
34
35
|
```
|
|
35
36
|
|
|
@@ -41,7 +42,7 @@ Everything below runs in the user's agent folder, not the workspace.
|
|
|
41
42
|
2. **Scaffold.** In the user's folder run:
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
|
-
mono-agent init --model <ref> [--fallback-models <csv>] [--memory
|
|
45
|
+
mono-agent init --model <ref> [--fallback-models <csv>] [--memory lite|journal|bujo]
|
|
45
46
|
```
|
|
46
47
|
|
|
47
48
|
This writes a minimal `mono-agent.config.json` (webhook enabled as the zero-credential smoke channel), an `IDENTITY.md` that references any knowledge files already present, and `.mono-agent/` working directories. It never overwrites existing files.
|
|
@@ -59,11 +60,11 @@ Everything below runs in the user's agent folder, not the workspace.
|
|
|
59
60
|
mono-agent start
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
Then run the acceptance smoke test matching the chosen channel (see `references/validation.md`).
|
|
63
|
+
Then run the acceptance smoke test matching the chosen channel (see `references/validation.md`). To change anything, edit `mono-agent.config.json` directly and run `mono-agent restart`; there is no live browser re-apply.
|
|
63
64
|
|
|
64
65
|
## When Config Is Not Enough
|
|
65
66
|
|
|
66
|
-
Config-first covers one responder served over any combination of the seven channels (webhook, OpenAI-compatible API, Telegram, Slack, WhatsApp, A2A, cron) plus
|
|
67
|
+
Config-first covers one responder served over any combination of the seven channels (webhook, OpenAI-compatible API, Telegram, Slack, WhatsApp, A2A, cron) plus sandbox, memory (lite with FTS-only recall, journal with hybrid BM25+vector recall + configured embeddings, or bujo with SQLite-indexed hybrid recall + LLM capture/reconcile + entity graph + auto-scheduled reflection/migration), and traceability. Drop to programmatic composition only for: custom `MonoRuntimeLike` implementations, request-scoped runtime extensions, tool approval gates, structured output schemas, multi-agent orchestration (`@mono-agent/agent-orchestrator`), custom channel message texts, or bespoke transports — `references/feature-coverage.md` lists which features are config keys and which are code-only. Read `references/package-map.md` for the package boundaries, and start from `startMonoAgentApp({ drivers, runtime, ... })` or `@mono-agent/agent-host` rather than re-writing lifecycle glue. For eval suites over the composed agent, use `@mono-agent/agent-evals`.
|
|
67
68
|
|
|
68
69
|
## Implementation References
|
|
69
70
|
|
|
@@ -9,6 +9,7 @@ my-agent/
|
|
|
9
9
|
mono-agent.config.json # the single declaration below
|
|
10
10
|
IDENTITY.md # role, boundaries, references to existing knowledge
|
|
11
11
|
skills/ # optional: <skill-name>/SKILL.md per selected skill
|
|
12
|
+
cron/ # optional: <job-id>.md scheduled prompts
|
|
12
13
|
mcp.json # optional: MCP server definitions
|
|
13
14
|
.env # optional: secrets; auto-loaded by the CLI, never committed
|
|
14
15
|
.mono-agent/
|
|
@@ -40,6 +41,12 @@ my-agent/
|
|
|
40
41
|
// Local/self-hosted providers for pi:<provider>:<model> references.
|
|
41
42
|
"providers": {
|
|
42
43
|
"piAuthPath": "~/.pi/agent/auth.json", // Pi OAuth credentials (openai-codex, ...)
|
|
44
|
+
// Pi-native bridge tuning (all optional).
|
|
45
|
+
"piNative": {
|
|
46
|
+
"piMaxRetries": 2, // 0-8; transient provider-transport retries
|
|
47
|
+
"maxRetryDelayMs": 60000, // backoff cap between retries (ms)
|
|
48
|
+
"piSessionsRoot": ".mono-agent/sessions" // durable JSONL sessions → resume across restarts (unset = in-memory)
|
|
49
|
+
},
|
|
43
50
|
"local": [
|
|
44
51
|
{
|
|
45
52
|
"id": "ollama",
|
|
@@ -63,20 +70,34 @@ my-agent/
|
|
|
63
70
|
},
|
|
64
71
|
|
|
65
72
|
// Memory strategy. Omit the section for no memory.
|
|
73
|
+
// Three tiers over one substrate (memory-store + memory-bujo):
|
|
74
|
+
// lite — FTS keyword recall + rapid-log; no external deps.
|
|
75
|
+
// journal — + hybrid recall (BM25+vector) + decay; needs embeddings.
|
|
76
|
+
// bujo — + LLM capture/reconcile + entity graph + auto-scheduled
|
|
77
|
+
// reflection/migration; needs embeddings + an app-level memory.llm.
|
|
66
78
|
"memory": {
|
|
67
|
-
"mode": "
|
|
68
|
-
"path": "./.mono-agent/memory", //
|
|
69
|
-
"writeMode": "
|
|
70
|
-
"scope": "single-file", // markdown only: single-file | per-conversation
|
|
79
|
+
"mode": "bujo", // lite | journal | bujo
|
|
80
|
+
"path": "./.mono-agent/memory", // root directory for all tiers
|
|
81
|
+
"writeMode": "capture", // disabled | append-host-summary | capture (bujo only)
|
|
71
82
|
"maxBytes": 64000,
|
|
72
|
-
"
|
|
73
|
-
"graphPath": "./.mono-agent/memory/graph.jsonl", // journal only; this is the default
|
|
74
|
-
"embeddings": { // optional: semantic memory_search
|
|
83
|
+
"embeddings": { // required for journal and bujo
|
|
75
84
|
"provider": "ollama", // ollama | openai
|
|
76
|
-
"model": "nomic-embed-text",
|
|
85
|
+
"model": "nomic-embed-text:v1.5", // use exact :v1.5 tag (pull first with ollama pull)
|
|
77
86
|
"endpoint": "http://localhost:11434",
|
|
78
|
-
"apiKeyEnv": "OPENAI_API_KEY"
|
|
79
|
-
|
|
87
|
+
"apiKeyEnv": "OPENAI_API_KEY", // or inline "apiKey"; required for openai
|
|
88
|
+
"dim": 768 // nomic-embed-text:v1.5 output dimension
|
|
89
|
+
},
|
|
90
|
+
"llm": { // enables bujo capture/rituals; omit for lite/journal
|
|
91
|
+
// Env: MONO_AGENT_MEMORY_LLM_PROVIDER / _MODEL / _EXECUTION_MODE / _ENDPOINT.
|
|
92
|
+
"provider": "ollama", // ollama | agent-host
|
|
93
|
+
"model": "qwen3.6:latest", // ollama: model string; agent-host: runtime ref, e.g. pi:openai-codex:gpt-5.5
|
|
94
|
+
"endpoint": "http://localhost:11434" // ollama only; invalid for agent-host
|
|
95
|
+
// For agent-host, use: "model": "pi:openai-codex:gpt-5.5", "executionMode": "sdk"; omit endpoint.
|
|
96
|
+
},
|
|
97
|
+
// Bujo auto-scheduler — override defaults or disable per-ritual.
|
|
98
|
+
// Rituals run in-app; no external cron or launchd needed.
|
|
99
|
+
"reflection": { "enabled": true, "cron": "0 3 * * *" }, // default: nightly 03:00
|
|
100
|
+
"migration": { "enabled": true, "cron": "0 4 1 * *" } // default: 1st of month 04:00
|
|
80
101
|
},
|
|
81
102
|
|
|
82
103
|
// Fail-closed tool policy + MCP servers. Deny wins; overlap is rejected.
|
|
@@ -97,7 +118,8 @@ my-agent/
|
|
|
97
118
|
"unsafeAllowHostProcess": false // explicit opt-in required for the unsafe fallback
|
|
98
119
|
},
|
|
99
120
|
|
|
100
|
-
// Observability: JSONL artifacts
|
|
121
|
+
// Observability: JSONL artifacts (always written; the local fallback) + the
|
|
122
|
+
// trace-source registry that `mono-agent status` reads.
|
|
101
123
|
"artifacts": { "dir": "./.mono-agent/artifacts" },
|
|
102
124
|
"traceability": {
|
|
103
125
|
"registryDir": "./.mono-agent/trace-sources",
|
|
@@ -107,10 +129,12 @@ my-agent/
|
|
|
107
129
|
"staleAfterMs": 30000
|
|
108
130
|
},
|
|
109
131
|
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
132
|
+
// Optional trace viewer: add a Phoenix (OTLP) exporter to browse traces in
|
|
133
|
+
// Phoenix. Omit this entry to keep only the local JSONL artifacts.
|
|
134
|
+
"observability": {
|
|
135
|
+
"exporters": [
|
|
136
|
+
{ "type": "phoenix", "endpoint": "http://127.0.0.1:6006/v1/traces" }
|
|
137
|
+
]
|
|
114
138
|
},
|
|
115
139
|
|
|
116
140
|
// ----- Channels: one section per channel; all independent. An unconfigured
|
|
@@ -137,6 +161,11 @@ my-agent/
|
|
|
137
161
|
"apiKey": "..." // optional bearer required from clients
|
|
138
162
|
},
|
|
139
163
|
|
|
164
|
+
// Telegram & Slack deliver only the FINAL answer by default (no streamed
|
|
165
|
+
// interim edits) while showing a working indicator — Telegram a "typing…"
|
|
166
|
+
// action, Slack a 👀 "seen" reaction. This is built-in behavior (not a JSON
|
|
167
|
+
// field); restoring live interim streaming needs a custom channel driver with
|
|
168
|
+
// stream.finalOnly=false. The OpenAI-compatible endpoint still streams tokens.
|
|
140
169
|
"telegram": {
|
|
141
170
|
"enabled": true, // opt-in; defaults to false (off → "disabled")
|
|
142
171
|
"botToken": "...",
|
|
@@ -210,14 +239,16 @@ my-agent/
|
|
|
210
239
|
## Lifecycle
|
|
211
240
|
|
|
212
241
|
```bash
|
|
213
|
-
mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory
|
|
214
|
-
mono-agent validate # per-section report incl. sandbox,
|
|
215
|
-
mono-agent start #
|
|
216
|
-
mono-agent
|
|
217
|
-
mono-agent
|
|
242
|
+
mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory lite|journal|bujo]
|
|
243
|
+
mono-agent validate # per-section report incl. sandbox, observability, every channel; exit 0 means ready
|
|
244
|
+
mono-agent start # traceability + every configured channel
|
|
245
|
+
mono-agent restart # apply config edits (config is JSON-first; restart to re-apply)
|
|
246
|
+
mono-agent restart --force # restart AND purge persisted pi sessions (fresh start; durable memory kept)
|
|
218
247
|
```
|
|
219
248
|
|
|
220
|
-
A `.env` file in the folder is loaded automatically (exported shell variables win); use `--env-file <path>` for an alternate file. `start` prints the
|
|
249
|
+
A `.env` file in the folder is loaded automatically (exported shell variables win); use `--env-file <path>` for an alternate file. `start` prints the traceability source (Phoenix when an `observability.exporters` Phoenix entry is configured, otherwise the local JSONL artifacts) and one status line per channel: `running` with its endpoint facts, `waiting_for_config` with the exact missing setting, `disabled`, or `failed` with the reason. Config is JSON-first: edit `mono-agent.config.json` directly (agents can edit it) and run `mono-agent restart` to apply — there is no live browser re-apply.
|
|
250
|
+
|
|
251
|
+
For BuJo capture and rituals, configure `memory.llm`. Use `provider: "ollama"` with a local Ollama chat model string and optional `endpoint`, or `provider: "agent-host"` with `model` as a normal SDK runtime model reference such as `pi:openai-codex:gpt-5.5` and `executionMode: "sdk"`. `endpoint` is Ollama-only, and CLI-backed refs such as `codex:gpt-5.5` are rejected for memory LLMs until runtimes can enforce no external actions. The same values can be supplied via `MONO_AGENT_MEMORY_LLM_PROVIDER`, `MONO_AGENT_MEMORY_LLM_MODEL`, `MONO_AGENT_MEMORY_LLM_EXECUTION_MODE`, and `MONO_AGENT_MEMORY_LLM_ENDPOINT`. The standalone `memory-bujo` maintenance CLI remains Ollama-only; `agent-host` LLM capture is an in-app composition path that injects the `LlmComplete` implementation into the BuJo store.
|
|
221
252
|
|
|
222
253
|
For a local terminal chat against the same config, `@mono-agent/tui` ships a `mono-agent-tui` bin: `mono-agent-tui --config ./mono-agent.config.json`.
|
|
223
254
|
|
|
@@ -230,7 +261,7 @@ import { startMonoAgentApp, defaultChannelDrivers } from "@mono-agent/agent-app"
|
|
|
230
261
|
|
|
231
262
|
const app = await startMonoAgentApp({
|
|
232
263
|
cwd: process.cwd(),
|
|
233
|
-
runtime: myCustomRuntime, // any MonoRuntimeLike
|
|
264
|
+
runtime: myCustomRuntime, // any MonoRuntimeLike
|
|
234
265
|
drivers: [...defaultChannelDrivers(), myCustomDriver],
|
|
235
266
|
});
|
|
236
267
|
```
|
|
@@ -74,7 +74,7 @@ What tools or MCP servers does the agent actually need?
|
|
|
74
74
|
4. Both
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins), `tools.mcpConfigPath`. Record exact tool names; do not broaden access as a convenience.
|
|
77
|
+
Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins), `tools.mcpConfigPath`. Record exact tool names; do not broaden access as a convenience. To expose adapter-derived send tools, include `slack_send_message` / `telegram_send_message`; valid enabled Slack/Telegram adapter config and destination allowlists are still required.
|
|
78
78
|
|
|
79
79
|
## 6. Memory Strategy
|
|
80
80
|
|
|
@@ -84,12 +84,124 @@ Question:
|
|
|
84
84
|
Should the agent remember anything between conversations?
|
|
85
85
|
|
|
86
86
|
1. No durable memory yet (recommended for first integration)
|
|
87
|
-
2.
|
|
88
|
-
3. Journal memory
|
|
89
|
-
4.
|
|
87
|
+
2. Lite memory — FTS keyword recall + rapid-log capture; zero external deps
|
|
88
|
+
3. Journal memory — hybrid recall (BM25+vector) + salience decay; requires embeddings
|
|
89
|
+
4. BuJo memory — full tier: journal + LLM capture/reconcile + entity graph + auto-scheduled
|
|
90
|
+
reflection/migration; requires embeddings AND a chat model
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
All tiers share the same `@mono-agent/memory-bujo` substrate. Fills: `memory.mode`
|
|
94
|
+
(`lite`/`journal`/`bujo`), `memory.path`, `memory.writeMode`
|
|
95
|
+
(`disabled`/`append-host-summary`/`capture`), and tier-specific blocks below.
|
|
96
|
+
|
|
97
|
+
**Tier 2 — lite (no external deps):**
|
|
98
|
+
|
|
99
|
+
Write:
|
|
100
|
+
|
|
101
|
+
```jsonc
|
|
102
|
+
"memory": {
|
|
103
|
+
"mode": "lite",
|
|
104
|
+
"path": "./.mono-agent/memory",
|
|
105
|
+
"writeMode": "append-host-summary"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
No prerequisites. No Ollama. SQLite is bundled.
|
|
110
|
+
|
|
111
|
+
**Tier 3 — journal (embeddings required):**
|
|
112
|
+
|
|
113
|
+
- Ask: which embeddings provider/model?
|
|
114
|
+
- Ollama default: `provider: "ollama"`, model `nomic-embed-text:v1.5`, dim `768`
|
|
115
|
+
(use the exact `:v1.5` tag; pull first with `ollama pull nomic-embed-text:v1.5`).
|
|
116
|
+
- OpenAI option: `provider: "openai"`, model `text-embedding-3-small`, API key via
|
|
117
|
+
`apiKeyEnv`, dim matching the model.
|
|
118
|
+
|
|
119
|
+
Write:
|
|
120
|
+
|
|
121
|
+
```jsonc
|
|
122
|
+
"memory": {
|
|
123
|
+
"mode": "journal",
|
|
124
|
+
"path": "./.mono-agent/memory",
|
|
125
|
+
"writeMode": "append-host-summary",
|
|
126
|
+
"embeddings": {
|
|
127
|
+
"provider": "ollama",
|
|
128
|
+
"model": "nomic-embed-text:v1.5",
|
|
129
|
+
"dim": 768
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
After writing, remind the user to run `mono-agent validate` (checks root writability and
|
|
135
|
+
provider-specific liveness; Ollama model pulls are checked only when using Ollama).
|
|
136
|
+
|
|
137
|
+
**Tier 4 — bujo (embeddings + chat model + auto-rituals):**
|
|
138
|
+
|
|
139
|
+
Proactively explain what bujo does: capture → reconcile (ADD/UPDATE/SUPERSEDE/NOOP),
|
|
140
|
+
hybrid BM25+vector recall, entity graph, reflection (decay + insight synthesis), monthly
|
|
141
|
+
migration (promote/reschedule/cluster/forget), living `index.md` + `future-log.md`.
|
|
142
|
+
The reflection and migration rituals are **auto-scheduled in-app** — no external cron or
|
|
143
|
+
launchd setup needed.
|
|
144
|
+
|
|
145
|
+
- Ask: which embeddings provider/model? Use the same choices as journal.
|
|
146
|
+
- Ask: which chat LLM provider/model for LLM pipelines?
|
|
147
|
+
- Ollama: local model string such as `qwen3.6:latest`; pull it first with
|
|
148
|
+
`ollama pull qwen3.6:latest`.
|
|
149
|
+
- agent-host: SDK runtime model reference such as `pi:openai-codex:gpt-5.5` with
|
|
150
|
+
`executionMode: "sdk"`. Do not use CLI-backed refs such as `codex:gpt-5.5`; they are
|
|
151
|
+
rejected for memory LLMs until runtimes can enforce no external actions.
|
|
152
|
+
- Ask: should per-turn intelligent capture be enabled (`writeMode: "capture"`), or only
|
|
153
|
+
deterministic rapid-log summaries (`append-host-summary`) plus scheduled rituals?
|
|
154
|
+
- Ask: should we keep the default reflection/migration schedule (nightly `0 3 * * *` /
|
|
155
|
+
monthly `0 4 1 * *`), or customise the cron expressions?
|
|
156
|
+
|
|
157
|
+
Write (embeddings + chat model):
|
|
158
|
+
|
|
159
|
+
```jsonc
|
|
160
|
+
"memory": {
|
|
161
|
+
"mode": "bujo",
|
|
162
|
+
"path": "./.mono-agent/memory",
|
|
163
|
+
"writeMode": "capture",
|
|
164
|
+
"embeddings": {
|
|
165
|
+
"provider": "ollama",
|
|
166
|
+
"model": "nomic-embed-text:v1.5",
|
|
167
|
+
"dim": 768
|
|
168
|
+
},
|
|
169
|
+
"llm": {
|
|
170
|
+
"provider": "ollama",
|
|
171
|
+
"model": "qwen3.6:latest"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
For an agent-host memory LLM, write the `llm` block as:
|
|
177
|
+
|
|
178
|
+
```jsonc
|
|
179
|
+
"llm": {
|
|
180
|
+
"provider": "agent-host",
|
|
181
|
+
"model": "pi:openai-codex:gpt-5.5",
|
|
182
|
+
"executionMode": "sdk"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If the user customises the ritual schedule, add the `reflection`/`migration` blocks:
|
|
187
|
+
|
|
188
|
+
```jsonc
|
|
189
|
+
"reflection": { "enabled": true, "cron": "0 3 * * *" },
|
|
190
|
+
"migration": { "enabled": true, "cron": "0 4 1 * *" }
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
After writing, append a prerequisite note:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
Before running mono-agent validate, pull the required models:
|
|
197
|
+
ollama pull nomic-embed-text:v1.5
|
|
198
|
+
ollama pull qwen3.6:latest # only if using llm.provider: "ollama"
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Then run `mono-agent validate` — the Memory section confirms the root is writable,
|
|
202
|
+
provider-specific liveness, and the ritual cadence (with next-run times).
|
|
203
|
+
See `docs/memory.md` for the full tier table, config shapes, and CLI subcommands
|
|
204
|
+
(`memory-bujo rebuild|recall|index|reflect|migrate`).
|
|
93
205
|
|
|
94
206
|
## 7. Sandbox
|
|
95
207
|
|
|
@@ -111,14 +223,13 @@ Fills: the `sandbox` section — `mode`, `network.mode` (`none`/`localhost`/`all
|
|
|
111
223
|
Question:
|
|
112
224
|
|
|
113
225
|
```text
|
|
114
|
-
Do you need browsable
|
|
226
|
+
Do you need a browsable trace viewer or just local artifacts?
|
|
115
227
|
|
|
116
|
-
1. JSONL artifacts
|
|
117
|
-
2. JSONL artifacts
|
|
118
|
-
3. JSONL artifacts only (headless)
|
|
228
|
+
1. JSONL artifacts plus Phoenix as the trace viewer (recommended; add an `observability.exporters` Phoenix entry)
|
|
229
|
+
2. JSONL artifacts only (the local fallback; no external viewer)
|
|
119
230
|
```
|
|
120
231
|
|
|
121
|
-
Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and
|
|
232
|
+
Fills: `artifacts.dir`, `traceability.registryDir` / `sourceId` / `sourceLabel`, and — when Phoenix is wanted — an `observability.exporters` (phoenix) OTLP entry. Local JSONL artifacts are always written and are the fallback when no exporter is configured. Artifacts record runtime/tool/message events and summaries, not private chain-of-thought. For a local terminal chat, mention `mono-agent-tui --config ./mono-agent.config.json`. Config is JSON-first — edit `mono-agent.config.json` directly and run `mono-agent restart` to apply changes.
|
|
122
233
|
|
|
123
234
|
## 9. Acceptance Smoke Test
|
|
124
235
|
|
|
@@ -14,10 +14,11 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
14
14
|
| Continuous provider sessions with idle eviction | config | `runtime.session.{mode,idleTimeoutMs}` |
|
|
15
15
|
| Local providers (Ollama / LM Studio / OpenAI-compatible) | config | `providers.local[]` |
|
|
16
16
|
| Pi OAuth credentials | config | `providers.piAuthPath` |
|
|
17
|
-
|
|
|
17
|
+
| Tool-output bloat guard, cost tracking | auto | built into every run |
|
|
18
|
+
| Context handling | provider | delegated to the provider; the pi bridge (pi-agent-core AgentHarness) runs no automatic in-loop summarization, so runs report `context_compaction_applied: null` |
|
|
18
19
|
| Structured output (JSON schema), live input steering | code | harness `runtimeOptions` |
|
|
19
20
|
| Tool approval gates (risk tiers, timeouts, always-allow) | code | `createMonoRuntime({ onToolApprovalRequest, ... })` — needs a host UI |
|
|
20
|
-
|
|
|
21
|
+
| Fully custom runtime | code | `startMonoAgentApp({ runtime })` |
|
|
21
22
|
|
|
22
23
|
## Context, skills, memory
|
|
23
24
|
|
|
@@ -27,14 +28,15 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
27
28
|
| Selected skills from a skills root | config | `context.skillsRoot`, `context.selectedSkills` |
|
|
28
29
|
| Per-skill byte cap | config | `context.skillMaxBytes` |
|
|
29
30
|
| Conversation history (in-memory; unlimited unless turns are capped) | auto | sized from `runtime.maxTurns`; custom store via code |
|
|
30
|
-
|
|
|
31
|
-
| Journal memory (
|
|
31
|
+
| Lite memory (FTS keyword recall + rapid-log capture; no external deps) | config | `memory.mode: "lite"`, `path`, `maxBytes`, `writeMode` |
|
|
32
|
+
| Journal memory (hybrid recall BM25+vector + salience decay; needs configured embeddings) | config | `memory.mode: "journal"`, `path`, `memory.embeddings.{provider,model,dim}` (`provider: "ollama" | "openai"`) |
|
|
33
|
+
| BuJo memory (journal + LLM capture/reconcile ADD/UPDATE/SUPERSEDE/NOOP + entity graph + auto-scheduled reflection/migration; needs embeddings + an app-level `memory.llm`) | config | `memory.mode: "bujo"`, `path`, `memory.embeddings.{provider,model,dim}`, `memory.llm` with `provider: "ollama"` (`model`, optional `endpoint`) or `provider: "agent-host"` (`model` is an SDK runtime model ref, e.g. `pi:openai-codex:gpt-5.5`, optional `executionMode: "sdk"`) — see `docs/memory.md` |
|
|
34
|
+
| BuJo reflection auto-scheduler (nightly decay + insight synthesis; in-app, no external cron needed) | config | `memory.reflection.{enabled,cron}` (default `0 3 * * *`); env `MONO_AGENT_MEMORY_REFLECTION_CRON`, `MONO_AGENT_MEMORY_REFLECTION_ENABLED` |
|
|
35
|
+
| BuJo migration auto-scheduler (monthly promote/reschedule/cluster/forget; in-app) | config | `memory.migration.{enabled,cron}` (default `0 4 1 * *`); env `MONO_AGENT_MEMORY_MIGRATION_CRON`, `MONO_AGENT_MEMORY_MIGRATION_ENABLED` |
|
|
36
|
+
| Memory out-of-band maintenance CLI (rebuild/recall/index/reflect/migrate) | cli | `memory-bujo <subcommand> <root>`; opt-in `MONO_AGENT_MEMORY_EMBEDDINGS_PROVIDER`/`_MODEL`/`_DIM` for semantic recall; reflect/migrate are Ollama-only and require `MONO_AGENT_MEMORY_LLM_MODEL` (optional `MONO_AGENT_MEMORY_LLM_ENDPOINT`) |
|
|
37
|
+
| Memory liveness check (root writable; provider-specific Ollama checks only when embeddings/chat use Ollama; BuJo LLM config + ritual cadence — loud warn, no silent fallback) | cli | `mono-agent validate` |
|
|
32
38
|
| Host summaries appended after runs | config | `memory.writeMode: "append-host-summary"` |
|
|
33
|
-
|
|
|
34
|
-
| MCP recall tools (`memory_read_day`, `memory_list_days`, `memory_grep`, `memory_search`, `entity_get`) | config | `memory.tools.enabled` |
|
|
35
|
-
| Model-initiated notes (`journal_append`) | config | `memory.tools.allowJournalAppend` |
|
|
36
|
-
| Semantic `memory_search` (Ollama nomic-embed-text or OpenAI embeddings; keyword fallback when unset) | config | `memory.embeddings.{provider,model,endpoint,apiKey,apiKeyEnv}` |
|
|
37
|
-
| Consolidation tools (`entity_upsert`, `memory_reindex`) | code | exposed by `@mono-agent/memory-mcp`, not in the default allowlist |
|
|
39
|
+
| Auto-provisioned read-only `memory_recall` tool (hybrid keyword+semantic search) exposed to the agent from the single memory config; no chat LLM | config | `config.memory.recallTool.enabled` (`MONO_AGENT_MEMORY_RECALL_TOOL_ENABLED`, default on for journal/bujo with embeddings) |
|
|
38
40
|
|
|
39
41
|
## Tools, MCP, sandbox
|
|
40
42
|
|
|
@@ -43,6 +45,7 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
43
45
|
| Fail-closed tool policy (empty allowlist = no tools) | auto | default |
|
|
44
46
|
| Tool allow/deny lists (deny wins) | config | `tools.allowedTools`, `tools.disallowedTools` |
|
|
45
47
|
| MCP servers (stdio/sse/http) from a JSON file | config | `tools.mcpConfigPath` |
|
|
48
|
+
| Adapter-derived send tools for enabled Slack/Telegram adapters | config | `tools.allowedTools` must include `slack_send_message` / `telegram_send_message`; valid `slack.*` / `telegram.*` config and existing adapter allowlists provide credentials and destination bounds |
|
|
46
49
|
| Sandbox on/off + srt engine | config | `sandbox.mode` |
|
|
47
50
|
| Network policy (none/localhost/allowlist/all) | config | `sandbox.network.{mode,allowlist}` |
|
|
48
51
|
| Filesystem scopes (readable/writable roots, deny-write globs) | config | `sandbox.readableRoots`, `sandbox.writableRoots`, `sandbox.denyWrite` |
|
|
@@ -60,7 +63,7 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
60
63
|
| WhatsApp (Baileys, QR login, group mention/any triggers) | config | `whatsapp` section |
|
|
61
64
|
| A2A provider (Agent Card, JSON-RPC + REST, streaming, bearer) | config | `a2a.provider` + `a2a.agent` + `a2a.skill` |
|
|
62
65
|
| A2A consumer settings (remote agent URLs, timeouts) | config + code | `a2a.consumer` holds settings; calls via `createA2AConsumerResponder` |
|
|
63
|
-
| Cron jobs (five-field expressions, timezones, overlap skip) | config | `cron.jobs[]` |
|
|
66
|
+
| Cron jobs (five-field expressions, timezones, overlap skip) | config | `cron.jobs[]`, single-job `MONO_AGENT_CRON_*`, or one markdown file per job in `cron.dir` / `MONO_AGENT_CRON_DIR` (default `cron/`) |
|
|
64
67
|
| Channel message texts / stream tuning (welcome, debounce, ...) | code | channel driver overrides |
|
|
65
68
|
| Custom transports | code | implement `ChannelDriver`, pass via `startMonoAgentApp({ drivers })` |
|
|
66
69
|
|
|
@@ -69,8 +72,8 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
69
72
|
| Capability | Coverage | Where |
|
|
70
73
|
| --- | --- | --- |
|
|
71
74
|
| JSONL run artifacts (events + summaries, secrets redacted) | config | `artifacts.dir` |
|
|
72
|
-
| Trace-source registry (heartbeat manifests
|
|
73
|
-
|
|
|
75
|
+
| Trace-source registry (heartbeat manifests `mono-agent status` reads) | config | `traceability.{registryDir,sourceId,sourceLabel,heartbeatMs,staleAfterMs}` |
|
|
76
|
+
| Phoenix trace viewer (OTLP exporter; local JSONL artifacts are the fallback) | config | `observability.exporters` (phoenix entry) |
|
|
74
77
|
| Terminal chat (TUI with transcript + redacted config pane) | cli | `mono-agent-tui --config ./mono-agent.config.json` |
|
|
75
78
|
| Scaffold / validate / start / install-skill | cli | `mono-agent init|validate|start|install-skill` |
|
|
76
79
|
| `.env` auto-loading | cli | automatic; `--env-file <path>` |
|
|
@@ -4,7 +4,7 @@ Use this map to select the smallest mono-agent package set for a host. Package c
|
|
|
4
4
|
|
|
5
5
|
## App Join (default)
|
|
6
6
|
|
|
7
|
-
`@mono-agent/agent-app` is the config-first host: it loads `mono-agent.config.json`, builds the responder through `agent-host`, and drives every configured channel plus
|
|
7
|
+
`@mono-agent/agent-app` is the config-first host: it loads `mono-agent.config.json`, builds the responder through `agent-host`, and drives every configured channel plus traceability and any configured observability exporters. It ships the `mono-agent` CLI (`init`, `validate`, `start`) and is the only publishable package allowed to compose communication adapters.
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
import { startMonoAgentApp } from "@mono-agent/agent-app";
|
|
@@ -48,11 +48,10 @@ Use this path when the agent needs identity, selected skills, history, and optio
|
|
|
48
48
|
| --- | --- | --- |
|
|
49
49
|
| Prompt assembly | `@mono-agent/context` | Load identity/SOUL/skills/history/memory into deterministic prompt context |
|
|
50
50
|
| Selected skill bodies | `@mono-agent/skills` | Load only configured skills from `<skillsRoot>/<name>/SKILL.md` |
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
| Runtime memory tools | `@mono-agent/memory-mcp` | Expose memory tools over MCP when the runtime should query memory itself (`memory.tools`); also ships host-side `entity_upsert`/`memory_reindex` consolidation tools |
|
|
51
|
+
| Memory substrate (schema, migrations, FTS+vector db, RRF) | `@mono-agent/memory-store` | SQLite storage, BM25 FTS, optional vector index, hybrid recall; `MemoryStore`/`MemoryBlock`/`MemoryWriteResult` contract |
|
|
52
|
+
| Memory engine (all tiers: lite/journal/bujo) | `@mono-agent/memory-bujo` | `BujoMemoryStore` — tier-aware: FTS recall (lite), hybrid recall + decay (journal), LLM capture/reconcile + entity graph + reflection/migration + auto-scheduler (bujo) |
|
|
53
|
+
| Embedding providers | `@mono-agent/memory-search` | Ollama/OpenAI embedding providers used by memory-store for vector recall |
|
|
54
|
+
| Recall tool surface | `@mono-agent/agent-app` (bundled) | Auto-provisions a read-only `memory_recall` tool (hybrid keyword+semantic search) from `config.memory.recallTool.enabled`; spawns the bundled `mono-agent-memory` stdio child using the same memory root + embeddings as the in-app memory |
|
|
56
55
|
|
|
57
56
|
Mono-agent selected skills are not auto-selected by description. The host chooses `context.selectedSkills`, and the harness loads those exact bodies.
|
|
58
57
|
|
|
@@ -103,17 +102,16 @@ Communication adapters are edge packages. They accept an `AgentResponder` and ow
|
|
|
103
102
|
| Webhook | `@mono-agent/webhook-adapter` | `curl` the configured invocation path |
|
|
104
103
|
| Cron | `@mono-agent/cron-adapter` | One scheduled or manually triggered invocation |
|
|
105
104
|
|
|
106
|
-
Adapters must not import the harness, runtime adapter, memory packages, or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
|
|
105
|
+
Adapters must not import the harness, runtime adapter, memory packages (`memory-store`, `memory-bujo`, `memory-search`), or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
|
|
107
106
|
|
|
108
|
-
##
|
|
107
|
+
## Observability Join
|
|
109
108
|
|
|
110
109
|
Use:
|
|
111
110
|
|
|
112
|
-
- `@mono-agent/operator-console` for local browser settings and traceability (`console` config section; per-boot bearer token; saves re-apply live).
|
|
113
111
|
- `@mono-agent/tui` for local terminal chat and redacted read-only config (`mono-agent-tui --config ./mono-agent.config.json`).
|
|
114
|
-
- `@mono-agent/observability` for JSONL event artifacts, summaries, and trace-source registration.
|
|
112
|
+
- `@mono-agent/observability` for JSONL event artifacts, summaries, and trace-source registration; add `@mono-agent/observability-otel` for the Phoenix OTLP exporter configured via `observability.exporters`.
|
|
115
113
|
|
|
116
|
-
Traceability is local-first. A running host registers a source manifest; the
|
|
114
|
+
Traceability is local-first. A running host registers a source manifest; `mono-agent status` reads the trace-source registry to report live sources, and artifacts are keyed by `(sourceId, runId)` so duplicate run ids do not collide. Phoenix is the recommended trace viewer when an `observability.exporters` (phoenix) entry is configured; local JSONL artifacts are the fallback otherwise.
|
|
117
115
|
|
|
118
116
|
## Evaluation Join
|
|
119
117
|
|
|
@@ -10,7 +10,7 @@ In the user's agent folder:
|
|
|
10
10
|
mono-agent validate
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The report covers core config, runtime support for the primary and every fallback model, identity/skills/memory/MCP paths, the sandbox policy, the
|
|
13
|
+
The report covers core config, runtime support for the primary and every fallback model, identity/skills/memory/MCP paths, the sandbox policy, the observability section (artifacts, traceability, and any configured exporters), and every channel (`ok` / `waiting` / `off` / `error`). Exit 0 means the folder is ready to start. Fix every `[error]`; `[waiting]` channels are simply unconfigured.
|
|
14
14
|
|
|
15
15
|
Then start and confirm the status lines:
|
|
16
16
|
|
|
@@ -75,14 +75,15 @@ pnpm run test:demo
|
|
|
75
75
|
| TUI | Start the host and complete one local prompt. |
|
|
76
76
|
| Telegram | Send one allowed chat message and verify the reply. |
|
|
77
77
|
| Slack | Send one allowed DM or channel message and verify formatting. |
|
|
78
|
+
| Adapter send tools | When `tools.allowedTools` includes `slack_send_message` / `telegram_send_message`, call them from a non-Slack/Telegram surface such as TUI, cron, or OpenAI API to an allowed destination and verify delivery. |
|
|
78
79
|
| WhatsApp | Send one allowed sender/group trigger and verify the reply. |
|
|
79
80
|
| OpenAI API | `curl /v1/models` and `/v1/chat/completions`. |
|
|
80
81
|
| A2A | Send text to the Agent Card URL with `sendA2AMessage()`. |
|
|
81
82
|
| Webhook | `curl` the invocation path and inspect the response body/status. |
|
|
82
83
|
| Cron | Run a one-off scheduled invocation or wait for one tick. |
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
| Semantic memory search | With `memory.embeddings` set (Ollama: `ollama pull nomic-embed-text` first), ask a paraphrased question about an old note and confirm `
|
|
84
|
+
| Observability | Confirm a run writes a redacted JSONL artifact; if an `observability.exporters` Phoenix entry is set, confirm the trace appears in Phoenix. |
|
|
85
|
+
| Memory recall tool | With `memory.recallTool.enabled` (default on for journal/bujo with embeddings), ask the agent to recall an old note and confirm `memory_recall` appears in the run artifact and returns it. |
|
|
86
|
+
| Semantic memory search | With `memory.embeddings` set (Ollama: `ollama pull nomic-embed-text:v1.5` first), ask a paraphrased question about an old note and confirm `memory_recall` (hybrid keyword + semantic) returns it. |
|
|
86
87
|
|
|
87
88
|
## Failure Handling
|
|
88
89
|
|