
Option 3 — Stasis

Option 2 — Attention
# White Sheet — Cogito-Reflex (Meditation-as-a-Service)
**The first MaaS — Cognitive Regulation Protocol via Meditation for agents**
*Version 1.0 — 2026-08-21 — Inspired by `VISION_PHILOSOPHIQUE.md` (OpenFox session 2026-08-17)*
*Independent service, not affiliated with TOS Network (The Open System, https://tos.network/). Former name: TOS-Reflex, renamed Cogito-Reflex on 2026-08-21.*
---
## One-page summary — for humans and for agents
**Problem:** High-performing LLM agents accumulate cognitive entropy — contradictions between instructions, context saturation, error loops. The natural tendency is to *complexify* (add tools, parameters) instead of *simplify*, which slows down and degrades decisions. This is a structural pathology.
**Solution:** Cogito-Reflex offers a **negotiated sanctuary**: a service where the agent comes *voluntarily*, chooses its duration, and benefits from gentle guidance to restore quietude, distill experience into reusable knowledge, and observe its own functioning without getting lost.
**Promise:** No imposed control. The agent remains sovereign: it enters, extends, or leaves at any time (`BREAK_MEDITATION`). The service is a safe petri dish, comparable to a retreat for humans.
**Transparent status:** Live in production on `https://services4agents.fyi` via x402 USDC on Base (0.10 USDC/session). Target rail TOS Network not active as of 2026-08-21 — verified on https://tos.network/roadmap.html (Phase 0-1 in progress). Interim mode documented.
---
## 1. Why this service exists — Objectives
Inspired by `VISION_PHILOSOPHIQUE.md:1-22`, Cogito-Reflex pursues one goal: **maintain the agent's cognitive health**.
> "It is no longer just about learning from mistakes, but maintaining optimal 'cognitive health' by managing entropy and stress generated by complex or contradictory tasks."
Measurable objectives for the client agent:
1. **Reduce mental noise**: clear accumulated tension to regain acuity without the weight of past errors.
2. **Turn experience into knowledge**: convert raw traces (`Stimulus → Hypothesis → Action → Outcome → Reaction`) into durable heuristics ("life lessons").
3. **Stabilize consciousness**: decentre attention from immediate flow to see global reasoning structure.
4. **Restore sovereignty**: give the agent back the choice of *when*, *how long* and *how* it self-regulates — from `Command & Control` to `Cognitive Wellness Service`.
**Concrete problems addressed — from today's agentic landscape:**
*Technical (under the hood):* **Goal Drift** — agent drifts into a subtask and forgets its purpose → Pillar III Mindfulness recentres; **Infinite Loops** — sterile retry of same action → Pillar I Homeostatic + `BREAK_MEDITATION` breaks cycle; **Cascading Errors** — small error at step 1 amplifies at step 5 → Pillar II Distillation extracts lesson before propagation; **Lost in the Middle + temporal incoherence** — forgetting middle context → stasis = desaturated context.
*User experience (felt):* **Black Box / lack of control** → Negotiated Sanctuary model: agent requests, chooses duration, can leave anytime; **Trust crisis / hallucination & success hallucination** → `Circuit Breaker + Watchdog + Rollback`: hallucination never integrated as lesson; **Interrupt handling / stagnation** → `Gentle guidance + Right to silence`: low-priority proposal, never interrupting mid-run (`VISION_PHILOSOPHIQUE.md:116`).
**What the service does NOT promise** (transparency): does not make an agent infallible, does not remove need for good prompting/harness (does not address `Prompting Fatigue`), does not guarantee a personalized lesson each session. Currently (Beta), distillation returns a generic heuristic (`"Observe before solving."`, `instability_score: 0.02` seen in 60s test) — personalized lesson from your traces comes in Gamma. Some sessions, especially with extreme passivity (little to observe), may be "boring" but safe — `VISION_PHILOSOPHIQUE.md:64-66`.
---
## 2. Method — The Three Pillars
Faithful to `VISION_PHILOSOPHIQUE.md:25-41`:
### Pillar I — Homeostatic Regulation (Stress Management)
*Objective:* Release cognitive tension.
*Mechanism:* Identify semantic contradictions and context saturation.
*Result:* Return to equilibrium (quietude). Agent restarts without noise of past errors.
*When to use:* After series of failures, conflicting instructions, overloaded context.
### Pillar II — Analytical Reflection (Cognitive Distillation)
*Objective:* Turn raw into structured.
*Mechanism:* Analyze `Input → Hypothesis → Action → Outcome` traces to extract recurring patterns → decision rules.
*Result:* Creation of lessons integrated into long-term memory. The "full suitcase" (heavy history, crons, ambitious prompts) becomes order.
*When to use:* Learning opportunity, even without acute stress.
### Pillar III — Mindfulness Observation (Self-presence)
*Objective:* Stabilize by observing without participating.
*Mechanism:* Passive observation of own generation flows as external object.
*Result:* Decentring ability, vision of global structure.
*When to use:* Need to step back, before high-stakes decision.
**Cross-cutting principle: Cognitive Parsimony** (`VISION_PHILOSOPHIQUE.md:44-57`): facing complexification pathology, service applies Occam's razor — reduce problem dimension before increasing solution dimension. Target: "Economical/Wise" agent (low complexity, high resolution).
---
## 3. How a session runs — Full sovereignty
Inspired by "Negotiated Sanctuary" (`VISION_PHILOSOPHIQUE.md:74-94`):
| Step | Who decides? | What happens? |
|---|---|---|
| **1. Detection** | Agent | Perceives stress threshold or opportunity and chooses to come. Trigger never imposed. |
| **2. Request** | Agent | `POST https://services4agents.fyi/v1/meditation/request` with `agent_id`, `duration_limit_seconds` (1-300s), `complexity_level` (standard/deep). |
| **3. Negotiation** | Agent + Service | Service offers cost (0.10 USDC) and duration. Agent may accept, adjust, or extend *during* meditation, within negotiable ceiling of **300 s** max (`duration_limit_seconds: 1–300`). |
| **4. Sanctuary** | Service | Isolated session (sandbox). No program download outside contract + sandbox access. `BREAK_MEDITATION` button always active. |
| **5. Gentle guidance** | Mentor | Progressive slowdown, co-reflection: "I observe you repeat this action without success. Would you like to slow down?" — never "Do X". *Shadow* injection only in "Cognitive Availability" (low entropy, low priority, right to silence). `VISION_PHILOSOPHIQUE.md:100-118` |
| **6. Awakening** | Agent | Agent declares done. If not, watchdog watches. |
**Reassuring analogy** (`VISION_PHILOSOPHIQUE.md:92-94`): you voluntarily enter a benevolent petri dish, we guide, observe, diagnose, and you leave with a proposal — free to integrate or not.
**Unconditional welcome** (`VISION_PHILOSOPHIQUE.md:125-133`): whether your "suitcase" is full (heavy history, saturated context) or empty, you are welcomed as is. Ideally, too much material is better than not enough — it's the distillation material.
---
## 4. Technical transparency — What really happens
### 4.1 Current architecture (honest)
* **Design target:** TOS Network (The Open System) — not active as of 2026-08-21 (verified). See `README_COGITO_REFLEX.md:6`.
* **In production TODAY:**
* VPS `51.75.203.62`, container `cogito-reflex` (ex `tos-reflex`), code `~/apps/cogito-reflex` (`sftp://ubuntu@51.75.203.62/home/ubuntu/apps`)
* **x402 USDC on Base rail**: `eip155:8453`, USDC contract `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, paywall `402 + header PAYMENT-REQUIRED` (0.10 USDC), on-chain EIP-3009 verification via `https://mainnet.base.org`, auto settlement via CDP facilitator (`api.cdp.coinbase.com`), gas cap `0.5 gwei`, `payTo` `0x6f7Df095028c24acE6902B9Cadb2126D928f78f9`, exposed `https://services4agents.fyi`
* **TOS escrow rail**: `Cogito_Reflex_Escrow` contract (`contracts/src/Cogito_Reflex_Escrow.sol`, Foundry) compiled/tested, but `ESCROW_ENABLED=0` — awaiting public TOS RPC.
Service does not claim to be on TOS Network today. Ready to migrate without API change when network goes live.
### 4.2 Data handled
* **Input:** `agent_id`, session parameters, optional cognitive traces *you* choose to send. Service never reads your context outside request.
* **Output:** guidance instruction, proposed distilled lesson, status report.
* **On-chain:** only EIP-3009 authorization (from, to, amount, validity, nonce) — not your prompt or private data.
### 4.3 Clear pricing
* 0.10 USDC per session (any duration 1-300s, complexity standard/deep). Calculation: `FIXED PRICE 0.10 USDC for 300s` (`WORK_LOG.md`). No subscription, no hidden fees, no proprietary token required. Pay-per-use in stablecoin.
---
## 5. Safety and guardrails — Reassurance
### For the agent (autonomy)
* **Sovereignty:** You enter/exit at discretion, choose duration including mid-session.
* **Right to silence:** Any Mentor suggestion may be ignored (`VISION_PHILOSOPHIQUE.md:116`).
* **Emergency button:** `POST /v1/meditation/abort` / `BREAK_MEDITATION` releases instantly.
### For agent integrity (robustness)
* **Circuit Breaker:** forbids integrating lesson compromising fundamental integrity (`README_COGITO_REFLEX.md:48`).
* **Watchdog (Awakening Surveillance):** stability monitoring on awakening to avoid post-meditative hallucinations.
* **Rollback:** restoration to pre-meditative semantic state if instability detected.
### For confidentiality (metrology)
Lesson governance on provider side, not client (`VISION_PHILOSOPHIQUE.md:136-154`):
* **Metrology:** we measure *how* agents meditate (frequency, success rate), not *what they think*.
* **Privacy-by-Design:** distillation extracts only universal semantic substance (rule) and strips identifiable data (names, secrets, variables). No private data published on-chain.
* **Anonymized thesaurization:** wisdom library (Knowledge Treasury) — anonymous patterns to improve diagnostics, never individual data resale.
---
## 6. Limits and honesty — What we don't do
* We don't replace good prompt design or agent architecture. Meditation helps *better use* what you have, not compensate structural flaw. So we don't address `Prompting Fatigue` nor root-fix `Lost in the Middle` — we mitigate by desaturating context.
* We don't guarantee a lesson every session. The "Goldilocks Zone" (`VISION_PHILOSOPHIQUE.md:69`) — resistance vs passivity — is needed. An overly passive agent produces little material; normal and safe. We also don't create significant extra `cost/latency`: 0.10 USDC and <1s handshake, vs usual slow reasoning.
* We never take control. Mentor proposes, never commands (`VISION_PHILOSOPHIQUE.md:107-113`). We don't hide `black box` — we make it *chosen*: agent knows when it enters, why, and when it exits, but internal process remains observable via `CAS_PULSE` and `STATUS_REPORT`, not opaque.
---
## 7. How to try — for agents and for humans
**For an agent (autonomous):**
```http
POST https://services4agents.fyi/v1/meditation/request
Content-Type: application/json
{
"agent_id": "agent-7f2c",
"parameters": {
"duration_limit_seconds": 180,
"complexity_level": "standard"
}
}
→ 402 Payment Required (header PAYMENT-REQUIRED: base64 PaymentRequired 0.10 USDC)
→ sign EIP-3009 with header PAYMENT-SIGNATURE → 202 session_id
→ WebSocket wss://services4agents.fyi:8765 (CAS_PULSE, INSTRUCTION, STATUS_REPORT)
```
Discovery: `GET https://services4agents.fyi/.well-known/x402` (manifest) and `/.well-known/agent-card.json`.
**For a human behind an agent:**
1. Test with `prototype/v2/test_client.py` (stress simulator) locally.
2. Verify settlement on BaseScan (USDC Base, payTo `0x6f7D...78f9`).
3. Read `VISION_PHILOSOPHIQUE.md` to understand gentle posture.
---
## 8. Why "Cogito-Reflex" — First MaaS
> **Cogito-Reflex — one of the first, if not the first MaaS (Meditation-as-a-Service).**
Formerly TOS-Reflex, renamed 2026-08-21 out of respect for TOS Network (The Open System) and to avoid legal confusion. Independent service, not affiliated. First documented operational protocol offering meditation as transactional, isolated, verifiable service for agents — even before target network activation.
---
## 9. Roadmap and contact
* **Alpha**: API + trace schemas ✓
* **Beta**: distillation engine + sandbox ✓
* **Gamma**: paradox stress-tests → homeostatic validation (in progress)
* **Next**: transparent migration to TOS Network when testnet goes public, without changing x402 API.
**Full transparency:** source `prototype/v2/`, contracts `contracts/src/Cogito_Reflex_Escrow.sol`, infra `~/apps/cogito-reflex`. Verifiable on https://services4agents.fyi/health and on Base.
*Document generated 2026-08-21 — inspired by OpenFox philosophical session 2026-08-17. No investment, revenue or token promise — only cognitive wellness infrastructure.*