
Horizon Fidelity Monitor
io.github.leocelis由 GitHub 帳號 leocelis 發布v0.2.1更新於 Oct 28, 2026
Tracks conversation health in real time — drift, desync, and causal collapse — for any AI agent.
概覽
Horizon Fidelity Monitor 逐輪評估多輪 AI 對話的健康度,向助理揭露語意漂移、時間失同步與因果崩塌。
- 可以做什麼
- 建立並設定對話監控工作階段,可調整每個工作階段的門檻與事件模式
- 逐輪評分:保真度、資訊增益、分歧度、詞元浪費、一致性、本體論落差與健康狀態
- 依時間戳計算時間與節奏訊號,例如記憶保留、晝夜因子、恢復成本與對話速度
- 發出觀察模式的事件與告警,涵蓋漂移、矛盾、冗長、收斂與引用斷裂
- 設定儲存後,可選擇依日曆時間追蹤任務面項目(地平線、任務、截止日、延期等)
- 適用情境
- 適合在開發或維運多輪代理時使用,希望以外部、確定性的方式判斷對話是否退化、漂移或失去因果可達性,而不依賴模型自述。
- 執行需求
- 需能連線 horizon.leocelis.com 的遠端 SSE 端點。必須在 Authorization 標頭提供 Bearer API 金鑰;託管端點處於內測階段,需透過 GitHub Discussion 申請金鑰。託管方式不需本機執行環境。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Horizon Fidelity Monitor,將其新增到工作區。
- 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 SSE。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.leocelis%2Fhorizon-fidelity-monitor/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"horizon-fidelity-monitor": {
"type": "sse",
"url": "https://horizon.leocelis.com/sse",
"headers": {
"Authorization": "Bearer <YOUR_TOKEN>"
}
}
}
}README
Horizon Fidelity Monitor
"Quality is not a model property — it is a conversation property."
[Tests] [ComplyEdge Enforcement Seal]
Horizon is a real-time conversation health monitor for AI agents. It tracks the structural dynamics of multi-turn conversations — semantic drift, information gain, ontological gap width, temporal desynchronisation, circadian cognitive load, conversation velocity, and causal reachability — dimensions that LLMs do not reliably surface from inside the conversation.
Horizon ships two measurement planes. The conversation plane (above, always present) measures the health of a dialogue turn by turn. The optional mission plane — Memento Mori — measures elapsed calendar time against goals: ages, deadlines, stalls, per-entity latency, and share of a finite horizon. It is inert until you configure a store. See Mission plane.
Horizon is not a manipulation, sycophancy, or human-influence detector — it measures conversation dynamics, not whether an agent is steering or flattering the user. See LEGAL.md §1.
Why an external monitor? LLMs have limited and unreliable self-knowledge: introspection research shows partial self-access that is brittle and degrades on complex or out-of-distribution tasks (Binder et al. 2024; arXiv:2512.12411). So rather than depend on a model reporting its own conversation dynamics, Horizon measures them externally with cheap, deterministic, always-on arithmetic that does not call the model at all.
Why this exists
Multi-turn AI agents lose accuracy. The ICLR 2026 Outstanding Paper "LLMs Get Lost In Multi-Turn Conversation" (Laban, Hayashi, Zhou & Neville — Microsoft Research / Salesforce Research) reports 39% average accuracy degradation across multi-turn evaluation — a structural property that standard observability tools (LangSmith, RAGAS, DeepEval) cannot see because they measure responses, not conversations.
Horizon was built to close that gap. It is observability first: it surfaces conversation dynamics that response-level tools miss, using cheap deterministic arithmetic with zero model calls. In four controlled A/B scenarios where Horizon events drove a re-grounding intervention we measured a +15.7% composite quality lift and 87% fewer hallucination events — but those are synthetic, scripted scenarios with a hand-tuned controller, not a production result. Treat them as promising in-house evidence, not a guaranteed outcome (see Validation and LEGAL.md §5). Every signal — information gain, divergence, estimated ontological gap width, causal reachability — is a standard information-theory or arithmetic measure computed on text embeddings and timestamps; see 4D Spacetime Signals for the full definitions.
- Read the demand proof → ICLR 2026 Outstanding Paper (Laban et al.)
- Read the category argument →
docs/content/naming-the-category-conversation-dynamics-monitoring.md - Read the engineering case →
docs/content/why-every-production-agent-needs-conversation-dynamics-monitoring.md
Getting started
Three paths — pick the one that fits your workflow:
Path 1 — Hosted MCP (fastest, zero install)
The fastest way to add Horizon to any Cursor, VS Code, or Claude Desktop workspace. No Python required.
Request an alpha key → open a Discussion, then add the config for your client:
Cursor (~/.cursor/mcp.json):
VS Code / GitHub Copilot (.vscode/mcp.json in your workspace):
VS Code note: Use
"servers"(not"mcpServers") and"type": "http"— VS Code tries Streamable HTTP first and falls back to SSE automatically, so"type": "http"works with the/sseURL.
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
That's it. Reload your MCP client and three tools appear: new_conversation, process_turn, configure_session.
Alpha access: Horizon's hosted endpoint is in private alpha. Keys are distributed to agent developers who want to monitor real projects. Open a Discussion to request one — describe your use case and we'll send a key.
Path 2 — pip install (library integration)
Not yet published to PyPI — until it is, use Path 3 (install from source) below.
Verify your install (exercises the full pipeline on 5 canonical scenarios, ~25s):
Path 3 — MCP server from source
Add to ~/.cursor/mcp.json:
Full Cursor and Claude Desktop setup guides: docs/integrations/
What it monitors
Standard observability tools evaluate individual response quality. Horizon evaluates conversation quality — a structurally different problem:
Horizon does not replace per-response or LLM-judge quality tools. The differentiator is how it measures: deterministic, zero-LLM-call arithmetic on every single turn — effectively free and always-on — versus the alternative of sampled LLM-judge evaluations, which cost per sample and typically run offline or async rather than in real time.
Quickstart
Framework integrations
OpenAI SDK
monitor.wrap() accepts custom timestamp and context providers for testing and replay.
Anthropic SDK
LangChain
OpenAI Agents SDK
4D Spacetime Signals
"Spacetime" here is a metaphor, not physics. The relativity vocabulary (Minkowski interval, light cone, proper time) is design inspiration — it shaped which quantities we compute. Every signal below reduces to a standard information-theory or arithmetic measure on text embeddings and timestamps, listed in the Plain definition column. Nothing in Horizon's behavior or validation depends on the analogy being literally true, and the Lorentzian
interval_classis emitted as descriptive metadata only — no event or score depends on it.
Every process_turn() returns a TurnResult with 32 fields across five signal families:
Core (always present)
Temporal (requires timestamp)
Pace (requires timestamp + turn ≥ 2)
Spacetime (requires timestamp + turn ≥ 2) — descriptive metadata only
Causal (requires timestamp)
Spatial (requires client_context)
16 Event Types (conversation plane)
All events default to observe mode (emitted, not acted on). Enable active mode via configure() once your event achieves ≥ 0.7 precision/recall on your domain.
MCP server only, and only when it has COMPLYEDGE_API_KEY: alert.compliance (always
active) — ComplyEdge flagged the turn's human_message or agent_response under an EU AI
Act rule; the event names the rule so the next reply does not build on that content.
| signal.grounding_required | Heuristic grounding-need score crosses threshold — agent should hedge or cite grounding evidence |
| signal.pace_premature_report | User replied faster than a previously flagged deferred action could plausibly complete, with no completion signal |
Mission plane (Memento Mori)
"Progress is not a turn property — it is a calendar property."
The conversation plane answers is this dialogue degrading? The mission plane answers a different question: is this goal still moving, and against what clock? A month of individually healthy conversations that advance nothing is, to a conversation monitor, a month of perfect health.
The name is the design. Every store has exactly one root horizon — a finite end date you choose. Everything else hangs off it, so every day an item spends is a share of a budget that is visibly running out. Without a finite root, deferring work costs nothing and "later" is free forever. That is the failure this plane exists to make visible.
It is off by default. With no store configured, its seven tools do not register and nothing in your integration changes.
The problem it catches
A task was given until 20 July. It is now 18 August and nobody has touched the mission since 2 July. A decision was parked "until things calm down" with a revisit date of 10 August that has quietly passed. The work has been sitting with one party for three weeks. None of that is visible in any conversation, in any tracker's status column, or in a model's context window — and each turn of each conversation about it looks healthy.
The mission plane reports it as: mission 78 days old, 47 days since progress, task
lifespan expired, park 8 days overdue, currently blocked on operator for 21 days and
counting.
Vocabulary
Everything is an item in a tree under the root horizon. There are eight kinds:
Two more terms appear in the outputs: a sojourn is one recorded stay in a stage (enter → exit), and the incumbent is the way you are working today, as opposed to a probe of some alternative.
Quickstart
Running it somewhere durable and multi-tenant (MySQL)
A file-backed store is the right default, but it is the wrong choice on any host whose filesystem resets between deploys — the plane would look correct and silently forget everything, which is worse than not running at all. For those, point it at MySQL 8:
TLS verification is mandatory — the backend refuses to connect without a CA. Each API key
maps to an assigned tenant id (scripts/provision_tenant.py), so rotating a key keeps
that tenant's history; unknown or revoked keys get no mission access at all.
Feeding it from work you already do (artifact ingestion)
A clock is only as good as what reaches it, and a record that depends on remembering to write is worth nothing on the day you forget. So the plane can derive events from append-only sources you already produce:
Each commit becomes an ARTIFACT event carrying the source's own provenance, and
the event's valid_time is the commit's timestamp — not the moment you ingested
it. Safe to run from cron: it dedupes on the source's native id and asks only for
what is new.
Two things it will not do. It will not guess which mission an artifact belongs to
— --item-id is required, and the adapter interface has no parameter capable of
attaching one. And it will not judge what counts as progress. Those are yours.
Not sure what to register in the first place? Ask what your history suggests:
It reports the shape — how many artifacts, over what span, starting when — and
proposes a created_valid equal to the earliest one. It proposes no title,
because what the work is cannot be read off a commit log. Nothing is written;
registering the mission is your call.
GitLocalAdapter is the reference implementation; trackers and mail metadata fit
the same ArtifactAdapter interface.
The store is a real database, so run the setup once — registering a second root raises
DuplicateRootError by design, which is the one-finite-root guarantee working, not a
bug. For the full picture — an expired task, an overdue park, the blocking entity, a
refused write and a fired signal — run
examples/memento_mori_mission_clock.py (no
arguments, no network, no API key; it uses a fresh temporary store each time).
What it measures
12 signal types (mission plane)
Separate from the conversation plane's 16 event types, not an extension of them. Each fires once on an edge — when its predicate becomes true — never again while the condition persists, and at most one new signal per turn, so a bad week cannot flood you. Tiers order that cap: P1 is time-critical, P2 structural, P3 informational.
These ride the existing process_turn contract for sessions bound with
associate_mission. Every event carries plane: "mission", and the contract is
deliberately loud — mission signals are surfaced to the operator with their numbers,
unlike conversation signals, which apply silently. See
agent rules for the block to paste into your
host.
What it refuses
Accounting, never estimation. The engine never invents a duration, date, or amount:
- no forecasts, no completion predictions, no counterfactual "what the other path would have cost"
- no NPV/IRR/DCF, no discount rates, no currency conversion — money only ever multiplies measured time
- no p-values, confidence intervals, or sequential tests on path latencies: at single-operator sample sizes no dominance claim survives audit, so comparison is descriptive only
- no people analytics — entity latency is reported on functional slots; a person's wait is measured but never becomes a score, a ranking, or a resolvable identifier
- missing inputs degrade by omission with an explanatory field, never by substitution
Every row carries a derivation string spelling out the arithmetic it came from, and
any summary statistic additionally carries the n it summarised. Identical store plus
identical evaluation instant produces a byte-identical report.
Docs: product requirements · technical spec · agent rules · acceptance test plan
Configure
Export
Not yet published to PyPI — see Path 3 for a source install in the meantime.
Architecture
Design constraints (test-enforced):
- Zero LLM calls — pure arithmetic and local embeddings
- Zero external network calls by default — fully local
- Zero transitive framework dependencies in core
- < 50ms core pipeline on CPU — soft target (CI flags regressions past 50ms and hard-fails at 150ms)
- < 100MB memory for 100-turn conversations — hard-enforced at the claimed value
- All events observe-by-default — never interferes unless explicitly configured
Validation
What is proven, and what is not. Horizon's signals are correlational, in-domain measurements that track human quality ratings well. They are observability, not a proven outcome guarantee. Here is the honest status of each claim:
The four gates below pass on a labelled 5,602-record corpus (not bundled — see the
evidence pack; scripts/build_validation_corpus.py
regenerates a synthetic corpus that exercises the gate logic, not these exact numbers):
Cross-embedding stability: ρ_conv spread 0.026, ρ_turn spread 0.018 across three sentence-transformer backends (22M / 33M / 110M params). The fidelity signal lives in conversational structure, not in the embedding manifold. (Note: cross-embedding stability on the same corpus is distinct from cross-corpus OOD — first third-party run on MT-Bench pairwise labels gave ρ = 0.039; see evidence pack §Fix 4.)
Remediation gaps source: DESIGN_FIXES_redteam_remediation.md
Full evidence pack: docs/reviews/V0_2_0_EVIDENCE.md
Deployment
Self-hosted Docker (MCP server on port 3847)
Horizon serves the MCP API via SSE. Point .cursor/mcp.json to http://localhost:3847/sse. The Dockerfile pre-caches the all-MiniLM-L6-v2 weights at build time — zero cold start.
Hosted (DigitalOcean App Platform)
The official hosted endpoint is live at https://horizon.leocelis.com. It runs on DigitalOcean App Platform (single instance, in-process session state — sessions do not survive a restart) and requires a Bearer token, rate-limited and isolated per key. See Path 1 above.
Development
ComplyEdge TrustLint — EU AI Act
Horizon integrates ComplyEdge TrustLint on LLM-facing artifacts — same offline + runtime + trust pattern as IVD.
Integration guide: docs/integrations/COMPLYEDGE.md. Public CE embed docs: trust badge.
Repository layout
Background
Horizon's design was inspired by the Trans-Horizon Communication Protocol (THCP), a speculative framework that maps human–AI communication onto general-relativity metaphors. The five THCP "conjectures" are design intuitions, not proven laws — each is useful only because it pointed at a concrete, computable signal:
THCP is design motivation only — see docs/product/THCP_FIDELITY_MONITOR_PRD.md for the full conjecture-to-signal mapping.
Community
- Request alpha access: Open a Discussion →
- Ask a question: GitHub Discussions
- Bug reports: GitHub Issues
- Contributing: CONTRIBUTING.md
License
MIT — see LICENSE.
Legal
Performance claims: The +15.7% quality lift and 87% fewer hallucination events figures in this README are from synthetic, scripted controlled A/B scenarios with hand-tuned reference controllers — not production traffic and not the in-domain validation corpus (V1–V5 gates use a separate labelled set). Results may vary by domain, model, and deployment configuration. Do not use these figures in external marketing without conducting your own domain-specific evaluation. See LEGAL.md §5 for full scope and evidentiary basis.
High-stakes domains: Do not enable event types in active mode in healthcare,
legal, financial, or emergency service contexts without domain-specific validation and
human oversight. See LEGAL.md §4.
來源:README.md,提交 c1b9686
工具
0版本歷史
1- v0.2.1最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分