Skip to content

Changelog

What changed in Contexta

Every release note is a change to the engine itself — an index, a constraint, a retrieval path, or a stage of the ingestion pipeline. v1.5.1 is current. v1 is the initial public release, kept on the record so the starting point is documented too.

v1.5.1

latest

The release that made the stack honest about itself. Ollama now runs inside Compose with automatic model provisioning, extraction reads long conversations in chunks instead of truncating them, the console was rebuilt around a single-operator flow, and a new-user walkthrough run against a wiped volume found two defects the existing suite had walked past — one of them a port published to the whole network under a comment that claimed the opposite.

Warm extraction
1.23 → 11.33 tok/s
Chunked recall
13/90 → 70/90
Backend tests
392 → 409
New-user walkthrough
22/22
Docs topics
8 → 20
Mojibake files
49 → 0

Extraction that reads the whole conversation — Added

  • Chunked extraction, defaulting to 10 sentences or 1,600 characters per chunk, with merge, dedupe, truncated-JSON salvage and per-chunk failure isolation. One bad chunk no longer costs you the rest of the message.
  • Real-server recall over a 90-fact conversation went from 13/90 to 70/90, and a standalone 30-fact set from 24/30 to 30/30.

A first run you can follow — Added

  • A /dashboard/welcome page that reads actual engine, key and memory state instead of a checklist, and shows exactly which step is blocking.
  • MCP setup in two steps, with key minting inline and a real transport and key check against the running service.
  • scripts/bootstrap_key.py creates the organization, account, membership and first API key in one command, and is idempotent.
  • benchmarks/new_user_e2e.py walks the whole first-time path and asserts on behaviour rather than status codes: boot, key, first memory, retrieve, contradict, supersede, retrieve again, explain, graph, MCP, console. It found both of the defects above when run against a wiped volume.

The operator console — Changed

  • Rebuilt light-first around a Notion-style shell and a single token system, replacing the page-by-page styling.
  • The entity graph gained force-directed layout, search, relationship filters, edge labels, neighbourhood focus, pan and zoom, a table view and a deterministic fallback for large graphs.
  • Extraction telemetry is surfaced where you use it, with truthful unavailable and unverified states rather than a green tick on a model that is not loaded.

Documentation — Changed

  • The public docs grew from 8 topics to 20 and now answer the questions a self-hoster actually has: which containers run, which ports are default versus profile-gated, every environment variable worth setting, measured performance, and a troubleshooting table keyed on symptoms.
  • Diagrams are composed from a single dimetric projection so boxes tile correctly, and they respect prefers-reduced-motion.
  • Mojibake across 49 dashboard and landing-page files is gone. It was real corruption — UTF-8 read as cp1252 and written back — and it had been reintroduced twice by bulk edits before it was traced.

MCP was published to the whole network — Fixed

  • The MCP container authenticated one tenant once at startup, from CONTEXTA_MCP_API_KEY, and then served that tenant to every caller that could open the port — but the port was bound to 0.0.0.0 and the Compose comment claimed it "authenticates every caller". The port is now bound to 127.0.0.1 and the comment describes what the code actually does. Put a reverse proxy with per-client auth in front of it before exposing MCP beyond the host.
  • A stale or revoked MCP key now reports which of the two problems it is, instead of a bare "unknown or revoked".

The public API spec was missing its own request body — Fixed

  • POST /v1/observations published no requestBody at all, because the body is parsed by hand to return 422s for oversized and malformed payloads in the same shape as a schema violation. The schema is now declared explicitly while the manual parsing — and its error shape — is kept.

Ollama inside Compose, and tuned — Performance

  • Ollama is a service in the stack now, with a named model volume and a one-shot provisioner, so the extractor no longer depends on something installed on the host.
  • The image's default thread allocation fragments the pool across speculative sequences, which on a small box left a single extraction request using a fraction of the cores. Setting OLLAMA_NUM_PARALLEL=2, a 30-minute keep-alive and a single loaded model took warm throughput from 1.23 to 11.33 tokens per second — faster than the host Ollama it replaced, so running it in the stack costs nothing.
  • As a side effect, extraction stopped flapping. The old timeouts were pushing the worker onto the heuristic fallback, whose output was then discarded by the PII filter; the discard was the symptom, not the cause.

Upgrading

  1. 01No schema migration. docker compose up --build is enough.
  2. 02MCP is now on 127.0.0.1:8765 instead of 0.0.0.0:8765. If you were reaching it from another machine, put a reverse proxy with per-client authentication in front of it, or set CONTEXTA_MCP_PORT and bind deliberately.
  3. 03The stack grew by one service: Ollama, with a named volume for model weights. First boot provisions the extractor from ./models if a GGUF is present, otherwise from CONTEXTA_EXTRACTOR_MODEL_REF.
  4. 04If you were running Ollama on the host, you can stop it. Set CONTEXTA_EXTRACTOR_MODEL_REF only if you want to pull the extractor from a registry instead of the local file.
  5. 05One backend test now skips rather than fails when the Qwen3 weights are neither cached nor reachable, because it loads real model weights. Run the suite inside the compose stack to cover that path.

v1.5

The indexing and truth-maintenance release. Point-in-time reads became a real index scan, lexical search became a real GIN predicate, graph traversal became a single capped recursive CTE, and extraction stopped silently falling back to heuristics. Billing and metering code is gone.

Lexical search
550ms → 48ms
Graph traversal
38.5ms → 2.16ms
Extraction success
17% → 87.5%
Repeat retrieval
2.2s → 0.2s
Redaction corpus
0 leaks / 59
Public tables
57 → 33

Storage and indexing — Added

  • A durable ingestion outbox with PostgreSQL SKIP LOCKED claiming, so concurrent workers never process the same observation twice and a crashed claim is retried rather than dropped.
  • A composite bitemporal index on (organization_id, valid_to, valid_from), which makes point-in-time as_of reads a real index scan instead of a sequential filter.
  • Entity-name trigram indexes plus a case-insensitive uniqueness constraint on (organization_id, user_id, lower(name)). A migration merged 2,670 pre-existing duplicate entity groups down to zero.
  • A dedicated TruthSupersessionService that invalidates a contradicted memory with valid_to = now() and records lineage through memory_version.superseded_by_id, so stale facts are excluded from active retrieval instead of accumulating as contradictions. Backed by a partial unique index guaranteeing at most one current fact per slot.
  • A closed, validated set of relationship types enforced by a database CHECK constraint, with self-loop rejection at the storage layer.

Retrieval — Added

  • A cascade retrieval mode: lexical and graph evidence are gathered first, and the dense channel is only consulted when that primary evidence is judged insufficient.
  • Precision-aware freshness scoring that honours temporal_precision and temporal_basis, so an explicitly approximate timestamp is not treated as an exact one.

Extraction reliability — Added

  • Bounded retries with escalating temperature, plus robust JSON recovery for fenced code blocks, <think> reasoning traces, and leading preambles.
  • Tolerant coercion of LLM schema drift: unknown memory types, travel mapped to event, list-shaped booleans, and empty titles are normalised instead of discarded. Measured session-level extraction success improved from roughly 17% to 87.5%.

A fine-tuned local extractor — Added

  • A LoRA fine-tune of LiquidAI/LFM2.5-1.2B-Instruct, quantised to Q4_K_M and registered in Ollama as contexta-lfm-extract, replaces generic prompting as the default extraction path. It holds 100% field accuracy on the held-out validation split and runs on the same local CPU-only hardware the offline stack already required.
  • A single canonical extraction contract shared by the inference server, the worker, and the benchmark harness, so a model that emits one envelope cannot silently disagree with the parser downstream.
  • Parallel extraction throughput on the local model server, benchmarked at one, three, and five concurrent requests.

Two-tier redaction — Added

  • Direct identifiers — API keys, JWTs, bearer tokens, passwords, one-time codes, session cookies, card numbers — are replaced with a stable marker before extraction ever runs, and the stage is fail-closed: if redaction errors, the observation is rejected rather than forwarded unredacted.
  • Soft identifiers — people, organisations, and places — are replaced with stable pseudonyms rather than dropped, so a conversation stays semantically coherent across turns without ever persisting the real name. A 59-case corpus reports zero leaks, zero over-redactions, and 59 of 59 idempotent re-runs.

Hardened MCP surface — Added

  • The MCP server now refuses to start without a valid API key instead of coming up unauthenticated, and the resolved tenant is injected into the service rather than defaulting to a hard-coded organization.
  • Bulk import paths are confined: local file reads are restricted to explicitly configured roots, and remote fetches are guarded against SSRF by scheme, DNS resolution, redirect target, and response size.
  • Agent writes are redacted through the same filter as the HTTP API, and every MCP memory write now records the correct 1024-dimensional Qwen3 embedding profile instead of a column that would have silently failed.

First-run experience — Added

  • One command bootstraps a working install: scripts/bootstrap_key.py creates the organization, the account, the owner membership, and the first API key, then prints the token once. Re-running reuses the existing tenant instead of duplicating it.
  • .env.example now documents every variable a working install actually needs, including the dashboard tenant resolution order and the required MCP key, instead of leaving a new operator to discover them from crash logs.

Security and hygiene — Changed

  • Secrets redaction now runs as a fail-closed stage at the head of the ingestion pipeline, so API keys, JWTs, bearer tokens, and passwords are scrubbed before extraction ever runs.
  • Pair-clique edge generation in the knowledge graph was replaced with a bounded approach, removing the O(n²) blow-up as the graph grows.

Console — Changed

  • The operator console was rebuilt on a flat, light-first design system: hairline borders, tighter radii, and a content-first layout. The previous dark glass treatment rendered large parts of the interface invisible at small viewport widths.

Indexing — Fixed

  • HNSW retrieval was collapsing on filtered queries and silently returning zero rows. ef_search is now tuned and hnsw.iterative_scan is enabled, so a filtered vector search no longer drops the tenant constraint to get an answer.
  • Sequential lexical search was replaced with a proper GIN tsvector predicate, measured from roughly 550ms to 48ms.
  • 2,745 colliding knowledge-graph edges were deduplicated and re-normalised.

Extraction — Fixed

  • The fine-tuned extractor's context window was raised from 4,096 to 16,384 tokens. Real extraction prompts were 8,281 tokens and were being rejected outright, which silently downgraded sessions to a low-quality heuristic fallback.
  • Structured-output enforcement now works. Ollama's OpenAI-compatible endpoint silently drops the format field, so schema constraints were never actually applied. Contexta detects an Ollama endpoint and uses the native Ollama route, constraining generation to a real JSON Schema.

Isolation — Fixed

  • Tenant scoping on the graph layer was corrected so multi-hop traversal stays inside the requesting organization.

API surface — Fixed

  • A doubled router prefix made the audit log unreachable at a malformed /audit/v1/audit path, which also polluted the published OpenAPI schema. The redundant alias mounts have been removed; the canonical /v1 routes are unchanged.

Measured — Performance

  • Lexical retrieval: approximately 550ms to 48ms on the reference corpus.
  • Multi-hop graph traversal: rewritten as a single recursive CTE with hard caps, approximately 38.5ms to 2.16ms — about 16x on the reference graph.
  • Session-level extraction success: roughly 17% to 87.5%.
  • Schema surface: 18 billing tables and 6 dead schemas dropped, taking the public table count from 57 to 33.

Response latency — Performance

  • A Redis-backed response cache with request coalescing sits in front of retrieval, so a repeated identical question no longer re-runs the full three-channel pipeline. The same work measured roughly 2.2s to 0.2s on repeat.
  • Rate limiting moved into the Python API and is now metered per key tier rather than against a single hard-coded limit.

Removed — Removed

  • All billing, metering, and credit-consumption code. Contexta Core no longer has a metering path to remove or bypass.

Upgrade notes

  1. 01Run the v1.5 migrations against a snapshot. The entity uniqueness constraint is created case-insensitively on lower(name) and will refuse to apply while case-variant duplicates exist; the shipped migration merges them first, which is the step that cleared 2,670 duplicate groups.
  2. 02The new relationship-type CHECK constraint is closed. If you have written custom relationship types directly against the graph tables, map them onto the validated set before upgrading.
  3. 03The 18 billing tables and 6 dead schemas are dropped. Any dashboard query, report, or export that referenced them needs to be removed in the same change.
  4. 04The offline embedding profile is unchanged at 1024 dimensions, so no vector migration is required. If you had switched the column to the 1536-d online profile, switch it back before re-indexing.
  5. 05Ollama endpoints are now detected and routed natively for structured output. A custom OpenAI-compatible base URL that is not recognisably Ollama will no longer receive a schema constraint — point the endpoint at Ollama directly.
  6. 06The outbox uses SKIP LOCKED claiming. Scaling ingestion workers is now safe, but any worker that previously assumed single-writer ordering should tolerate interleaved claims.

v1

The first public release. Contexta shipped as a self-hosted memory engine: a Python extraction and retrieval core driven by Celery, a Go gateway on :8443 that verifies API keys and rate limits in Redis, Python and TypeScript SDKs, a Next.js operator dashboard, and a compose stack that comes up without a paid model key.

Engine
Python · FastAPI + Celery
Gateway
Go · :8443
SDKs
Python · TypeScript
Embedding keys
none required

Memory engine — Added

  • A Python memory engine on FastAPI with Celery workers over Redis, routed across three task queues: extraction, embedding, and maintenance for decay, reflection, and dream cycles. task_acks_late and task_reject_on_worker_lost mean a killed worker requeues its job instead of dropping the observation.
  • The core stages shipped as separate modules under contexta/core/: a sensitive filter for redaction, an extraction worker, near-duplicate merging, importance and confidence scoring, entity resolution, contradiction maintenance, a hybrid retrieval engine, read-age decay, and dream-cycle reflection — orchestrated by contexta/core/pipeline.py.
  • Multi-tenancy through a single base class. TenantScopedRepository in contexta/repositories/base.py appends WHERE organization_id = :tenant_id to every statement it builds, so isolation is inherited by every repository rather than remembered per call.

Edge and SDKs — Added

  • A Go gateway terminating TLS on :8443 and reverse-proxying to the Python API, with SHA-256-hashed API key verification in internal/auth/verifier.go and a Redis-backed token-bucket rate limiter with per-tier RPS and burst limits in internal/ratelimit/bucket.go. It holds no persistent state.
  • A Python client (contexta_client) with sync and async clients exposing observe(), observe_batch(), and context(), and a TypeScript client with the same surface. Adapters shipped for OpenAI, Anthropic, LangChain, and LlamaIndex in Python, and OpenAI, Anthropic, LangChain, and Vercel AI in TypeScript.
  • A CLI covering init, login, keys, memory, observations, policy, projects, schema, context, test, and usage.

Operator surface — Added

  • A Next.js operator dashboard with a memory inspector, per-memory lineage rows, an entity graph viewer, API key issuance and revocation, and a settings surface.

Running the stack — Added

  • docker compose up --build brings up PostgreSQL with pgvector, Redis, the FastAPI backend, the Go services, the Celery workers, and the dashboard behind a single entrypoint.sh, with a GitHub Actions CI workflow on the repository.
  • A deterministic local embedding provider, selected with CONTEXTA_EMBEDDING_PROVIDER=deterministic, so the default install needs no OpenAI or DeepSeek key. It is hash-derived rather than semantic, which makes it a bring-up default and not a retrieval-quality baseline.

Getting started

  1. 01This is the first public release, so there is nothing to migrate from. Clone the repository and run docker compose up --build; the dashboard is served on :3000 and the gateway terminates TLS on :8443.
  2. 02The default embedding provider is deterministic. Use it to bring the stack up and exercise the pipeline, but do not use it to judge retrieval quality — the vectors are hash-derived, not semantic.
  3. 03Model-backed extraction is configured through CONTEXTA_LLM_MODEL and CONTEXTA_LLM_API_KEY. The stack boots without them; set them when you want an LLM extraction provider rather than the offline path.
  4. 04Python 3.11 or newer, PostgreSQL with the pgvector extension, and Redis are the only hard prerequisites.