Skip to content

coniti

coniti is a Python library for semantic continuity: notes you write are embedded and organised by pluggable structures, so a system can answer “what was this, from time A to time B?” or “what is around this note?” without any session object. That is what makes sessionless exploration possible.

Release candidate 0.1.0: private, not published

Everything in the first release is built and verified (see the table below and quality). coniti 0.1.0 is a release candidate: the wheel and source archive were built and inspected, but nothing is published to any index, so it cannot be installed from outside the project (installation). Two behaviours are still provisional decisions and may change: mixing embedding spaces raises an error, and the meaning of | and & on dense vectors. The quickstart runs as written.

from coniti import ContinuityEngine, Note, Query

engine = ContinuityEngine()
engine.ingest(Note(id="a", text="outlined the sync design", timestamp=1_000.0))
print(engine.ask(Query(text="sync design")).render())

Three layers and a memory backend

Layer What it is Main parts
Actor The vocabulary an actor uses (a human, an agent or any other party) Note, TimeRange, Query
System Two base models Embedder (state space of each message), Structure (glue between messages)
Broker The handshake between the two Strategy and the ContinuityEngine (see engine)
Memory (underneath) One interface for every read and write MemoryBackend, InMemoryBackend
flowchart LR
  H["Actor layer\nNote, TimeRange, Query"] <--> B["Broker layer\nEngine + Strategy"]
  B --> E["Embedder"]
  B --> S["Structure"]
  B <--> M["MemoryBackend"]

See layers for the detail.

Framework, not experiment

The base defines the framework only: abstract base classes, their input and output contracts, a metadata (spec) system and a thin engine. Every concrete behaviour (a tree, a graph, a clustering rule) is a plug-in, and tuning factors such as thresholds or decay never appear on a base class.

What is in 0.1.0

Piece Status
Install check: coniti --init, coniti.hello() Done
Top-level public API: from coniti import ContinuityEngine, Note, Query, TimeRange, ... (names load lazily) Done
Contracts, registry, specs (coniti.contracts, coniti.registry, coniti.specs) Done
Container (dependency injection, coniti.di) Done
Actor models, MemoryBackend, InMemoryBackend, memory conformance suite, entry-point plug-in discovery Done
Embedder with local_hash and random_projection Done
Optional dspy embedder Done (tested only against a fake dspy module)
Structure with flat and segment_tree Done
Strategy and the default strategy Done
Container wiring of memory, embedding, structures and strategy; structures follow the embedder’s dimension Done
Embedding algebra (+, -, @, abs, sum(), mean(), \|, &) Done; the meaning of \| and & and the rule against mixing spaces are provisional
Serialisation on every model, portable memory file (dump / load, optional gzip) Done
ContinuityEngine (ingest, ingest_many, ask) and Answer with representatives Done
Engine lifecycle: remove, rebuild, snapshot, load, dump, load_file, atomic ingest Done
Stateful testing, adversarial sweep, fault injection Done
Mutation spot-checks (143 mutants: 139 killed, 0 survived, 4 equivalent) Done
Structural rules as tests; installed-wheel session through the public API Done
Release artifacts (wheel and source archive) built and inspected Done; not published
Clustering, graphs, retrieval strategies, learning, multi-agent Not in the first release; later plug-ins

Provisional decisions

  • Across embedding spaces. Combining embeddings from different spaces raises IncompatibleSpaces. An explicit bridge may be added later.
  • Union and intersection for dense vectors. | is the normalised sum and & the sign-agreeing minimum. Set operations over active dimensions are the alternative.

Both are described in embedding.