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
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -344,7 +344,7 @@ The tester includes automatic cleanup with shutdown handlers to properly close M
344
344
-**Autonomous Delegation** - LLM decides when to delegate via `delegate-subtask` tool
345
345
-**Manual Delegation** - Console commands for interactive control (`/delegate`, `/subtasks`, `/subtask`)
346
346
-**Depth Tracking** - Configurable nesting limits with automatic retry and deadline enforcement
347
-
-**Conversation Persistence** - Save and resume conversations across sessions (`conversation=...`; in `mini-a-con`, use `resume=true` to continue the latest thread)
347
+
-**Conversation Persistence** - Save and resume conversations across sessions (`conversation=...`; in `mini-a-con`, combine `usehistory=true`, `historykeep=true`, and `resume=true` to pick and continue prior console threads stored under `~/.openaf-mini-a/history/`; use `historykeepperiod=` and/or `historykeepcount=` for retention)
348
348
-**Rate Limiting** - Built-in rate limiting for API usage control
349
349
-**Metrics & Observability** - Comprehensive runtime metrics for monitoring and cost tracking
@@ -386,7 +386,7 @@ Mini-A ships with complementary components:
386
386
-**`mini-a-subtask.js`** - SubtaskManager for local child-agent delegation and remote worker delegation
387
387
-**`mini-a-web.sh` / `mini-a-web.yaml`** - Lightweight HTTP server for browser UI
388
388
-**`mini-a-worker.yaml`** - Headless HTTP API server for programmatic agent delegation (launch with `mini-a workermode=true`)
389
-
-**`mini-a-modes.yaml`** - Built-in configuration presets for common use cases (can be extended with `~/.openaf-mini-a_modes.yaml`)
389
+
-**`mini-a-modes.yaml`** - Built-in configuration presets for common use cases (can be extended with `~/.openaf-mini-a_modes.yaml` or `~/.openaf-mini-a/modes.yaml`)
390
390
-**`public/`** - Browser interface assets
391
391
392
392
## Common Configuration Options
@@ -422,7 +422,7 @@ Mini-A ships with complementary components:
422
422
|`usemaps`| Encourage Leaflet-based interactive map outputs for geographic data |`false`|
423
423
|`usemath`| Encourage LaTeX-style math formulas (`$...$`, `$$...$$`) for KaTeX rendering in the web UI |`false`|
424
424
|`usestream`| Enable real-time token streaming as LLM generates responses |`false`|
425
-
|`mode`| Apply preset from `mini-a-modes.yaml`or `~/.openaf-mini-a_modes.yaml`| - |
425
+
|`mode`| Apply preset from `mini-a-modes.yaml`, `~/.openaf-mini-a_modes.yaml`, or `~/.openaf-mini-a/modes.yaml`| - |
426
426
|`modelman`| Launch the interactive model definitions manager |`false`|
427
427
|`workermode`| Launch the Worker API server (`mini-a-worker.yaml`) from the console entrypoint |`false`|
428
428
|`workers`| Comma-separated list of worker URLs for remote delegation (`workers=http://host1:8080,http://host2:8080`) | - |
Mini-A ships with reusable argument bundles so you can switch behaviors without remembering every flag. Pass `mode=<name>` with `opack exec mini-a`, `mini-a`, `mini-a.sh`, `mini-a.yaml`, or `mini-a-main.yaml` and the runtime will merge the corresponding preset from [`mini-a-modes.yaml`](mini-a-modes.yaml) and optionally from `~/.openaf-mini-a_modes.yaml` (custom modes override built-in ones) before applying any explicit flags you provide on the command line.
327
+
Mini-A ships with reusable argument bundles so you can switch behaviors without remembering every flag. Pass `mode=<name>` with `opack exec mini-a`, `mini-a`, `mini-a.sh`, `mini-a.yaml`, or `mini-a-main.yaml` and the runtime will merge the corresponding preset from [`mini-a-modes.yaml`](mini-a-modes.yaml) and optionally from `~/.openaf-mini-a_modes.yaml` and `~/.openaf-mini-a/modes.yaml` (custom modes override built-in ones, and `~/.openaf-mini-a/modes.yaml` overrides the legacy file when both exist) before applying any explicit flags you provide on the command line.
328
328
329
329
Set `OAF_MINI_A_MODE=<name>` to pick a default preset when you do not supply `mode=` on the command line (helpful when using the `mini-a` alias). Explicit `mode=` arguments continue to take precedence over the environment variable.
330
330
@@ -340,12 +340,12 @@ Set `OAF_MINI_A_MODE=<name>` to pick a default preset when you do not supply `mo
340
340
341
341
### Creating Custom Presets
342
342
343
-
Create your own presets by creating a `~/.openaf-mini-a_modes.yaml` file in your home directory. Custom modes are automatically merged with the built-in presets from `mini-a-modes.yaml`, with custom definitions taking precedence. The agent loads both YAML files on each run, so custom additions and overrides are immediately available.
343
+
Create your own presets by creating either a `~/.openaf-mini-a_modes.yaml` file or a `~/.openaf-mini-a/modes.yaml` file in your home directory. Custom modes are automatically merged with the built-in presets from `mini-a-modes.yaml`, with custom definitions taking precedence. If both custom files exist, `~/.openaf-mini-a/modes.yaml` overrides the legacy file. The agent loads these YAML files on each run, so custom additions and overrides are immediately available.
344
344
345
345
**Example custom preset:**
346
346
347
347
```yaml
348
-
# In ~/.openaf-mini-a_modes.yaml
348
+
# In ~/.openaf-mini-a/modes.yaml
349
349
modes:
350
350
mypreset:
351
351
useshell: true
@@ -766,7 +766,7 @@ The `start()` method accepts various configuration options:
766
766
- **`showthinking`** (boolean, default: false): Use raw prompt calls to surface XML-tagged thinking blocks (for example `<thinking>...</thinking>`) as thought logs
767
767
- **`chatbotmode`** (boolean, default: false): Replace the agent workflow with a lightweight conversational assistant prompt
768
768
- **`useplanning`** (boolean, default: false): Load (or maintain) a persistent task plan in agent mode. When no pre-generated plan is available Mini-A falls back to the adaptive in-session planner and disables the feature for trivial goals.
769
-
- **`mode`** (string): Apply a preset from [`mini-a-modes.yaml`](mini-a-modes.yaml)or `~/.openaf-mini-a_modes.yaml` to prefill a bundle of related flags
769
+
- **`mode`** (string): Apply a preset from [`mini-a-modes.yaml`](mini-a-modes.yaml), `~/.openaf-mini-a_modes.yaml`, or `~/.openaf-mini-a/modes.yaml` to prefill a bundle of related flags
770
770
771
771
#### Dual-Model Controls
772
772
- **`modellc`** (string): Override the low-cost model configuration at runtime (same format as `OAF_LC_MODEL`). Useful for quick per-run model selection without changing environment variables.
@@ -925,11 +925,16 @@ Only when every stage returns an empty list (or errors) does Mini-A log the issu
925
925
926
926
#### Conversation Management
927
927
- **`conversation`** (string): Path to file for loading/saving conversation history
928
-
- **`resume`** (boolean, default: false, `mini-a-con`): Reuse the last conversation and restore the most recent goal/result context when running from the interactive console (`mini-a` / `opack exec mini-a`)
928
+
- **`resume`** (boolean, default: false, `mini-a-con`): Resume a previous console conversation. When `conversation` is omitted and `usehistory=true`, the console lists `~/.openaf-mini-a/history/*.json` and lets you choose which thread to continue.
929
+
- **`usehistory`** (boolean, default: false, `mini-a-con`): Enable console history discovery from `~/.openaf-mini-a/history/`.
930
+
- **`historykeep`** (boolean, default: false, `mini-a-con`): Store console conversation files in `~/.openaf-mini-a/history/` using `conversation-yyyyMMdd-HHmmss.json` style names.
931
+
- **`historykeepperiod`** (number, `mini-a-con`): Automatically delete kept conversation files older than the provided number of minutes.
932
+
- **`historykeepcount`** (number, `mini-a-con`): Automatically delete kept conversation files beyond the newest N entries.
933
+
- When both `historykeepperiod` and `historykeepcount` are set, either rule can prune a saved conversation file.
929
934
- **`state`** (object|string): Initial structured state (JSON/SLON) injected before the first step and persisted across turns
930
935
931
936
#### Mode Presets
932
-
- **`mode`** (string): Shortcut for loading a preset argument bundle from [`mini-a-modes.yaml`](mini-a-modes.yaml)or `~/.openaf-mini-a_modes.yaml` (custom modes override built-in ones). Presets are merged before explicit flags, so command-line overrides always win. Bundled configurations include:
937
+
- **`mode`** (string): Shortcut for loading a preset argument bundle from [`mini-a-modes.yaml`](mini-a-modes.yaml), `~/.openaf-mini-a_modes.yaml`, or `~/.openaf-mini-a/modes.yaml` (custom modes override built-in ones, and the new path overrides the legacy one when both exist). Presets are merged before explicit flags, so command-line overrides always win. Bundled configurations include:
933
938
- `shell`– Enables read-only shell access.
934
939
- `shellrw`– Enables shell access with write permissions (`readwrite=true`).
935
940
- `shellutils`– Adds the Mini File Tool helpers as an MCP (`useutils=true mini-a-docs=true usetools=true`) exposing `init`, `filesystemQuery`, `filesystemModify`, and `markdownFiles` actions.
@@ -2259,6 +2264,14 @@ Resume the last conversation directly from the interactive console:
2259
2264
mini-a conversation=chat-history.json resume=true
2260
2265
```
2261
2266
2267
+
Or keep console sessions in the default history folder and choose one interactively when resuming:
Console history payloads now keep both `created_at` and `updated_at` timestamps in addition to the conversation entries, which makes retention and manual inspection easier.
2274
+
2262
2275
### Context Management
2263
2276
2264
2277
```javascript
@@ -2427,6 +2440,7 @@ This will show:
2427
2440
Mini-A records extensive counters that help track behaviour and costs:
2428
2441
2429
2442
- Call `agent.getMetrics()` to obtain a snapshot grouped by LLM usage, outcomes, shell approvals/denials, context management, and summarization activity.
2443
+
- Console history flows also update `history` metrics so you can track started/resumed sessions plus kept/deleted conversation files when using `mini-a-con`, including separate counters for age-based and count-based pruning.
2430
2444
- OpenAF automatically registers these counters under the `mini-a` namespace via `ow.metrics.add('mini-a', ...)`, so collectors that understand OpenAF metrics can scrape them.
2431
2445
- Metrics are updated live as the agent progresses, making them ideal for dashboards or alerting when an agent gets stuck.
2432
2446
@@ -2447,6 +2461,7 @@ Mini-A records extensive counters that help track behaviour and costs:
2447
2461
|`tool_cache`|`hits`, `misses`, `total_requests`, `hit_rate`| Tool result caching metrics for deterministic and read-only MCP tools. Tracks cache effectiveness and provides hit rate percentage. |
2448
2462
|`mcp_resilience`|`circuit_breaker_trips`, `circuit_breaker_resets`, `lazy_init_success`, `lazy_init_failed`| MCP resilience and optimization metrics. Circuit breaker trips/resets track connection health management. Lazy initialization metrics show deferred MCP connection establishment when `mcplazy=true`. |
|`history`|`sessions_started`, `sessions_resumed`, `files_kept`, `files_deleted`, `files_deleted_by_period`, `files_deleted_by_count`| Console conversation history metrics. Tracks new vs resumed console sessions, how many history files were kept, and how many were pruned overall, by age rule, or by count rule. |
2450
2465
2451
2466
These counters mirror what is exported via `ow.metrics.add('mini-a', ...)`, so the same structure appears in Prometheus/Grafana when scraped through OpenAF.
0 commit comments