The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Horizon Fidelity Monitor listing page.
"Quality is not a model property — it is a conversation property."
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.
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.
docs/content/naming-the-category-conversation-dynamics-monitoring.mddocs/content/why-every-production-agent-needs-conversation-dynamics-monitoring.mdThree paths — pick the one that fits your workflow:
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.
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):
Add to ~/.cursor/mcp.json:
Full Cursor and Claude Desktop setup guides: docs/integrations/
Standard observability tools evaluate individual response quality. Horizon evaluates conversation quality — a structurally different problem:
| Tool | What it sees | What it misses |
|---|---|---|
| LangSmith, Braintrust | Latency, cost, per-response quality | Deterministic, every-turn structural signals |
| RAGAS, DeepEval | Faithfulness, relevance per turn (DeepEval also has sampled multi-turn LLM-judge metrics) | Zero-LLM-call, real-time scoring on every turn |
| Langfuse, Arize Phoenix | Session-level LLM-judge evaluation | Deterministic, always-on scoring at sub-50ms |
| Human raters | Subjective quality | Systematic structural decay |
| Horizon | Conversation dynamics | Intentionally nothing |
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.
monitor.wrap() accepts custom timestamp and context providers for testing and replay.
"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:
| Signal | Description |
|---|---|
fidelity_score | Composite conversation health [0, 1] |
igt_value | Information Gain per Turn — semantic novelty |
divergence_score | Jensen-Shannon proxy for intent/response gap |
twr_value | Token Waste Ratio — semantic redundancy |
consistency_score | Bipredictability — structural coherence |
epsilon_t | Estimated ontological gap width [0, 1] |
health_status | healthy / degrading / critical / converged |
conversation_mode | execute / explore / refine / learn (auto-detected) |
timestamp)| Signal | Description |
|---|---|
gap_seconds | Wall-clock gap since last turn |
estimated_retention | Human memory retention (Ebbinghaus half-life model) |
circadian_factor | Human cognitive capacity at this hour [0.3, 1.0] |
temporal_asymmetry | Penalty for temporal desync |
resumption_cost | none / low / medium / high / extreme |
temporal_references | Resolved deictic expressions ("yesterday", "last week") |
timestamp + turn ≥ 2)| Signal | Description |
|---|---|
conversation_velocity | Semantic displacement / proper time |
conversation_acceleration | Velocity delta (requires turn ≥ 3) |
timestamp + turn ≥ 2) — descriptive metadata only| Signal | Description (metaphor) | Plain definition (what it computes) |
|---|---|---|
spacetime_interval | ds² with Minkowski-like signature (−,+,+,+) | A 4-term weighted distance: ds² = −α·log(1+Δt)² + β·ΔD_JS² + γ·Δε² + δ·ΔC². The minus sign on the time term is a convention, not a physical law. |
interval_class | timelike / spacelike / lightlike | The sign bucket of ds² (< −ε, > ε, else lightlike). Emitted as metadata only — no event or fidelity score consumes it. |
timestamp)| Signal | Description (metaphor) | Plain definition (what it computes) |
|---|---|---|
reachable_turns | Turns still inside the causal light cone | Count of prior turns where in_context × retention(Δt) × cosine_similarity > θ — still in-window, not yet memory-decayed, and topically related. |
reachable_fraction | Fraction of history still causally reachable | reachable_turns / (turn − 1). |
client_context)| Signal | Description |
|---|---|
location_class | home / office / mobile_transit / unknown |
spatial_constraint | Attention budget, screen capacity, max response length |
spatial_frame_shift | Context switch magnitude |
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.
| Event | Fires when |
|---|---|
checkpoint.clarification | D_JS above clarification threshold |
checkpoint.comprehension | Consistency drops below threshold |
alert.drift | Fidelity declining for drift_window consecutive turns |
alert.contradiction | Bipredictability below consistency threshold |
alert.verbosity | Token Waste Ratio above verbosity threshold |
signal.convergence | IGT trend consistently low — natural endpoint approaching |
signal.optimal_length | T* (estimated optimal length) reached |
signal.horizon_widening | IGT trend strongly positive — conversation expanding |
signal.session_reset | Large temporal gap with low retention |
signal.temporal_desync | Gap + retention drop below desync threshold |
signal.broken_reference | Reachable fraction drops below broken-reference threshold |
signal.frame_shift | Spatial constraint shifts significantly |
signal.pace_shift | Conversation acceleration above pace threshold |
signal.light_cone_collapse | Reachable fraction below light-cone threshold |
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 |
"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 six tools do not register and nothing in your integration changes.
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.
Everything is an item in a tree under the root horizon. There are eight kinds:
| Kind | What it is |
|---|---|
horizon | the finite root — exactly one per store, and the denominator for every share |
mission | a goal with a clock; the thing that can stall |
task | a unit of work with a TTL — an agreed window whose expiry means investigate, never you estimated badly |
deadline | an external date (regulatory, contractual, market), ideally linked to the internal work it gates |
gate | a checkpoint with an age budget |
entity | something the work passes through and waits on — a queue, a vendor, a system, you |
deferral | a park. Requires a revisit date; the store refuses one without it |
probe | a small, dated trial of an alternative way of working, so routes are compared by measurement rather than opinion |
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.
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.
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).
| Output | Meaning |
|---|---|
| Age, days-remaining, TTL state | how old work is, how long is left, whether a task outlived its window |
| Days-since-progress + recording-path check | a stall — and whether it is no work or no records, never conflated |
| Slowest entity / blocking entity | the longest recorded wait, and separately what the work waits on right now |
| Horizon share | what fraction of the remaining root horizon this item has consumed |
| Cost-of-delay, break-even date | only when you declare an hourly rate and amounts |
| Path comparison | a probe's recorded sojourn beside the incumbent's accrued delay |
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.
| Signal | Fires when | Tier |
|---|---|---|
signal.deadline_window | an external deadline enters its warning window | P1 |
signal.ttl_expired | a task outlives its ratified lifespan — investigate the blocker | P1 |
signal.deferral_expired | a deferral passes its revisit date | P2 |
signal.gate_aging | a gate exceeds its age budget with no progress | P2 |
signal.mission_stalled | no progress events for the mission's threshold (paired with the recording-path check) | P2 |
signal.slowest_entity | the identity of a mission's slowest recorded entity changes | P2 |
signal.clock_unpaired | a deadline exists with no linked internal state | P2 |
signal.horizon_share | an item's elapsed time crosses a threshold share of the remaining root horizon | P3 |
signal.cost_of_delay | accrued cost-of-delay crosses an operator threshold (rate + amount + threshold all declared) | P3 |
signal.probe_ready | a probe sojourn completes — enough to compare numbers, never a powered test | P3 |
signal.path_ahead | a probe's recorded sojourn is shorter than the incumbent's accrued delay (descriptive only) | P3 |
signal.breakeven_passed | a ratified break-even date passes without the measured improvement | P3 |
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.
Accounting, never estimation. The engine never invents a duration, date, or amount:
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
Not yet published to PyPI — see Path 3 for a source install in the meantime.
Design constraints (test-enforced):
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:
| Claim | Status | Where |
|---|---|---|
| Fidelity correlates with human ratings (in-domain) | ✅ measured (ρ ≈ 0.6–0.7) | gates below |
| Signal beats naive heuristics | ✅ measured | V3 |
| Holds on a third-party corpus (out-of-domain) | ❌ tested — ρ = 0.039 on MT-Bench expert judgments (n=80; below 0.3 floor); needs direct quality labels | V0_2_0_EVIDENCE.md §Fix 4, adapt_external_corpus.py |
| Events predict degradation (leading, not lagging) | ⚠️ tested on MT-Bench — insufficient-data (2-turn chats; events rarely fire); tool works | leading_indicator.json, measure_leading_indicator.py |
| Acting on events improves outcomes (+15.7%) | ⚠️ synthetic A/B only; needs an independent corpus | run_interventional_ab.py, LEGAL.md §5 |
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):
| Gate | Constraint | v0.2.0 |
|---|---|---|
| V1 — proxy correlation | per-conv ρ ≥ 0.6, per-turn ρ ≥ 0.5 | 0.685 / 0.659 |
| V2 — per-event P/R | every event P ≥ 0.7 AND R ≥ 0.7 | all 16 events ≥ 0.70 / 0.70 |
| V3 — beats heuristics | rho lift > 25%, structural P ≥ 0.6 | +202.4% lift, P=R=1.00 |
| V5 — cross-domain | per-turn ρ ≥ 0.4 AND per-conv ρ ≥ 0.48 | min 0.517 / 0.718 |
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
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.
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.
Horizon integrates ComplyEdge TrustLint on LLM-facing artifacts — same offline + runtime + trust pattern as IVD.
| Layer | What |
|---|---|
| Offline (required) | ./scripts/compliance/check.sh — scans horizon_intent.yaml + horizon-monitor.mdc |
| Runtime (BYOK) | ./scripts/compliance/runtime_check.sh — feeds live seal + trust page |
| CI gate | .github/workflows/ci.yml jobs compliance + optional compliance-runtime |
| Agent rule | <BEGIN-COMPLYEDGE v1.0> in docs/cursor-rules/horizon-monitor.mdc |
Integration guide: docs/integrations/COMPLYEDGE.md. Public CE embed docs: trust badge.
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 conjecture (metaphor) | Computable signal it inspired |
|---|---|
| THCP-1 — irreducible ontological loss ε > 0 | epsilon_t — estimated intent/response gap width [0, 1] |
| THCP-2 — an optimal length T* exists beyond which fidelity decays | IGT-trend convergence detection (signal.convergence, estimated_t_star) |
| THCP-3 — communication requires encode/decode adjunction | consistency_score — bidirectional embedding predictability |
| THCP-4 — global coherence requires "sheaf gluing" across turns | cross-turn contradiction / claim-consistency checks |
| THCP-5 — optimal trajectories lie near the "light cone" | reachable_fraction — retention × similarity over prior turns |
THCP is design motivation only — see docs/product/THCP_FIDELITY_MONITOR_PRD.md for the full conjecture-to-signal mapping.
MIT — see LICENSE.
| Document | Purpose |
|---|---|
| LEGAL.md | Full legal notices: what Horizon is/is not, high-stakes domain warnings, performance claim scope, EU AI Act classification, grounding hook privacy, limitation of liability |
| TERMS_OF_SERVICE.md | Binding terms governing hosted server access and commercial use |
| PRIVACY_POLICY.md | GDPR Art. 13 compliant privacy notice — what data is collected and your rights |
| DATA_PROCESSING_AGREEMENT.md | GDPR Art. 28 DPA template for EU enterprise users (request via email) |
| SECURITY.md | Responsible disclosure policy; known self-hosted security considerations |
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.