bots-garden/mini-mepublic Fork
⑂ feature/mini-me-as-a-sdk
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. dfcd2ed · on feature/mini-me-as-a-sdk · k33g · 28d ago
README.en.md · 45 lines · 2.5 KBmarkdown
Blame HistoryOpen raw

Demo: see every struggle signal without waiting for a model to fail

Version française

mm shows the user when the model struggles — a loop, a broken or runaway tool call, a stall, too many turns, a tool that does not exist… (struggle signals, ticket 153). A real model does not fail on demand, so this demo replaces it with fake-llm.py, a fake OpenAI-compatible server (Python, no dependency) that struggles on purpose, one scenario at a time.

File Role
fake-llm.py the fake model: FAKE=<scenario>, listens on 127.0.0.1:8765 (PORT= to change it); streams like a real server, and answers in one block when mm retries without streaming
agent.yaml the agent: provider: openai on the fake server, contextWindow: 1000, maxTurns: 10, a 3 s watchdog
run-all.sh runs every scenario through mm -p and prints the struggle lines

Run it

Every scenario at once (python3 and mm on the PATH, or MM_BIN=/path/to/mm):

./run-all.sh

One scenario, in the window — watch the right of the status bar:

FAKE=loop python3 fake-llm.py &
mm tui agent.yaml        # type anything, press Enter
kill %1

What you should see

Measured on 2026-10-25 with ./run-all.sh:

FAKE= The fake model… Signal
loop calls bash cat /no/such/file again and again ⚠ failing: 3 tool calls in a row, ⚠ loop: bash ×4, ⚠ loop: bash ×5, then ✖ stuck: bash ×6
failing calls bash cat /no/such/file-N with a new N every time ⚠ failing: 3 tool calls in a row, 4, 5… then ✖ max turns reached
unknown calls run_python, which does not exist ✖ unknown tool: run_python
empty answers nothing ⚠ empty answer
context answers, reporting 900 prompt tokens ⚠ context 90% full
broken writes tool-call arguments that stop mid-JSON ⚠ broken tool call (cut off) 1/2, 2/2
runaway streams abcdefgh as arguments, forever ✖ runaway tool call
silent accepts the request and never answers ✖ stalled (after 3 s)
turns calls bash echo step N with a new N every time ✖ max turns reached (after 10 calls)

In the window, a ⚠ badge is black on yellow and a ✖ badge white on red; it stays until the next question. In a terminal the lines are yellow or red; piped (as in run-all.sh) they are plain.

 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
# Demo: see every struggle signal without waiting for a model to fail

*[Version française](README.fr.md)*

mm shows the user when the model struggles — a loop, a broken or runaway tool call, a stall, too many turns, a tool that does not exist… ([struggle signals](../../docs/en/reference/cli.md#struggle-signals), ticket 153). A real model does not fail on demand, so this demo replaces it with `fake-llm.py`, a fake OpenAI-compatible server (Python, no dependency) that struggles on purpose, one scenario at a time.

| File | Role |
|------|------|
| `fake-llm.py` | the fake model: `FAKE=<scenario>`, listens on `127.0.0.1:8765` (`PORT=` to change it); streams like a real server, and answers in one block when mm retries without streaming |
| `agent.yaml` | the agent: `provider: openai` on the fake server, `contextWindow: 1000`, `maxTurns: 10`, a 3 s watchdog |
| `run-all.sh` | runs every scenario through `mm -p` and prints the struggle lines |

## Run it

Every scenario at once (python3 and mm on the PATH, or `MM_BIN=/path/to/mm`):

```bash
./run-all.sh
```

One scenario, in the window — watch the right of the status bar:

```bash
FAKE=loop python3 fake-llm.py &
mm tui agent.yaml        # type anything, press Enter
kill %1
```

## What you should see

Measured on 2026-10-25 with `./run-all.sh`:

| `FAKE=` | The fake model… | Signal |
|---------|-----------------|--------|
| `loop` | calls `bash cat /no/such/file` again and again | `⚠ failing: 3 tool calls in a row`, `⚠ loop: bash ×4`, `⚠ loop: bash ×5`, then `✖ stuck: bash ×6` |
| `failing` | calls `bash cat /no/such/file-N` with a new N every time | `⚠ failing: 3 tool calls in a row`, 4, 5… then `✖ max turns reached` |
| `unknown` | calls `run_python`, which does not exist | `✖ unknown tool: run_python` |
| `empty` | answers nothing | `⚠ empty answer` |
| `context` | answers, reporting 900 prompt tokens | `⚠ context 90% full` |
| `broken` | writes tool-call arguments that stop mid-JSON | `⚠ broken tool call (cut off) 1/2`, `2/2` |
| `runaway` | streams `abcdefgh` as arguments, forever | `✖ runaway tool call` |
| `silent` | accepts the request and never answers | `✖ stalled` (after 3 s) |
| `turns` | calls `bash echo step N` with a new N every time | `✖ max turns reached` (after 10 calls) |

In the window, a `⚠` badge is black on yellow and a `✖` badge white on red; it stays until the next question. In a terminal the lines are yellow or red; piped (as in `run-all.sh`) they are plain.