Experiment Protocol — Flux Agent (Chapter 19)
Purpose. Show the signature of Motion in a digital flow: goal → contact (tool) → transformation → bounded steps → threshold (Θ).
This page is a one-pager to let readers reproduce the experiment behind Chapter 19.
Conditions
- REAL —
mode: "real"
(use the site UI and press Run). - MOCK+ (tools enabled) —
mode: "mock"
,maxSteps = 8
, tools =["web","db","math"]
. - MOCK− (step-constrained) —
mode: "mock"
,maxSteps = 4
.
Procedure
Use the same goal in all conditions (e.g., “Summarize the text in parentheses in 3 bullet points.”) and run 3 trials per condition.
- REAL (UI): Type the goal → press Run → watch Logs / Live
Metrics and note the
runId
. - MOCK (cURL): Send a submit with
mode:"mock"
. Steps progress automatically.curl -s -X POST https://flux-agent.nowonacra.com/api/submit \ -H 'content-type: application/json' \ -d '{ "sessionId":"s-mock-1", "userMessage":"Summarize the text in parentheses in 3 bullet points.", "userId":"u1", "maxSteps":8, "tools":["web","db","math"], "mode":"mock" }'
What to Record
After each run, from runs/{runId}
and runs/{runId}/logs
record:
- S (steps), ρₜ (tool density), κ (coherence), τ (avg latency, ms), Θ (phase).
- status and the final one-line outcome. For REAL, you may also log
usage.total_tokens
if recorded.
Condition | runId | S | ρₜ | κ | τ (ms) | Θ | usage (tok) | final (1 line) |
---|---|---|---|---|---|---|---|---|
REAL | — | |||||||
MOCK+ | — | |||||||
MOCK− | — |
Expected Signatures
- With tool contact, ρₜ tends to rise and τ is more stable for a similar S.
- Under a strict step limit, Θ rises faster and a graceful stop is observed.
- As Θ approaches ~0.80, prefer early summarization (fail-soft).
Reproduce via API
REAL: POST /api/submit
(mode: real
) then call
POST /api/step
a few times.
# 1) submit (REAL)
RID=$(curl -s -X POST https://flux-agent.nowonacra.com/api/submit \
-H 'content-type: application/json' \
-d '{"sessionId":"s-real-1","userMessage":"Summarize the text in parentheses in 3 bullet points.","userId":"u1","maxSteps":8,"mode":"real"}' \
| sed -E 's/.*"runId":"([^"]+)".*/\1/')
# 2) step (bounded loop)
for i in 1 2 3 4 5 6 7 8; do
curl -s -X POST https://flux-agent.nowonacra.com/api/step \
-H 'content-type: application/json' \
-d '{"runId":"'"$RID"'"}' | jq -r '.final // empty'
sleep 0.4
done
For MOCK, send mode:"mock"
and adjust maxSteps
.
© Nowonacra — Supporting material for Chapter 19