Metadata-Version: 2.4
Name: cellin
Version: 0.4.0.dev2477897717701
Summary: Build long-lived multimodal memory, dream over it, and retrieve context with transparent weighting.
Project-URL: Documentation, https://github.com/ben-ranford/cellin/tree/main/docs
Project-URL: Issues, https://github.com/ben-ranford/cellin/issues
Project-URL: Releases, https://github.com/ben-ranford/cellin/releases
Project-URL: Source, https://github.com/ben-ranford/cellin
Author: Ben Ranford
License: MIT License
        
        Copyright (c) 2026 Ben Ranford
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,evals,memory,multimodal,retrieval
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.12
Provides-Extra: arangodb
Requires-Dist: python-arango; extra == 'arangodb'
Provides-Extra: document-cache-backends
Requires-Dist: pymongo; extra == 'document-cache-backends'
Requires-Dist: redis; extra == 'document-cache-backends'
Provides-Extra: duckdb
Requires-Dist: duckdb; extra == 'duckdb'
Provides-Extra: graph-backends
Requires-Dist: neo4j; extra == 'graph-backends'
Requires-Dist: python-arango; extra == 'graph-backends'
Provides-Extra: memgraph
Requires-Dist: neo4j; extra == 'memgraph'
Provides-Extra: milvus
Requires-Dist: pymilvus; extra == 'milvus'
Provides-Extra: mongodb
Requires-Dist: pymongo; extra == 'mongodb'
Provides-Extra: mysql
Requires-Dist: mysql-connector-python; extra == 'mysql'
Provides-Extra: neo4j
Requires-Dist: neo4j; extra == 'neo4j'
Provides-Extra: pgvector
Requires-Dist: psycopg; extra == 'pgvector'
Provides-Extra: pinecone
Requires-Dist: pinecone; extra == 'pinecone'
Provides-Extra: postgresql
Requires-Dist: psycopg; extra == 'postgresql'
Provides-Extra: qdrant
Requires-Dist: qdrant-client; extra == 'qdrant'
Provides-Extra: redis
Requires-Dist: redis; extra == 'redis'
Provides-Extra: redis-vector
Requires-Dist: redis; extra == 'redis-vector'
Provides-Extra: sql-backends
Requires-Dist: duckdb; extra == 'sql-backends'
Requires-Dist: mysql-connector-python; extra == 'sql-backends'
Requires-Dist: psycopg; extra == 'sql-backends'
Provides-Extra: storage-backends
Requires-Dist: duckdb; extra == 'storage-backends'
Requires-Dist: mysql-connector-python; extra == 'storage-backends'
Requires-Dist: neo4j; extra == 'storage-backends'
Requires-Dist: pinecone; extra == 'storage-backends'
Requires-Dist: psycopg; extra == 'storage-backends'
Requires-Dist: pymilvus; extra == 'storage-backends'
Requires-Dist: pymongo; extra == 'storage-backends'
Requires-Dist: python-arango; extra == 'storage-backends'
Requires-Dist: qdrant-client; extra == 'storage-backends'
Requires-Dist: redis; extra == 'storage-backends'
Requires-Dist: weaviate-client; extra == 'storage-backends'
Provides-Extra: vector-backends
Requires-Dist: pinecone; extra == 'vector-backends'
Requires-Dist: psycopg; extra == 'vector-backends'
Requires-Dist: pymilvus; extra == 'vector-backends'
Requires-Dist: qdrant-client; extra == 'vector-backends'
Requires-Dist: redis; extra == 'vector-backends'
Requires-Dist: weaviate-client; extra == 'vector-backends'
Provides-Extra: weaviate
Requires-Dist: weaviate-client; extra == 'weaviate'
Description-Content-Type: text/markdown

# cellin

[![PyPI Version](https://img.shields.io/pypi/v/cellin)](https://pypi.org/project/cellin/)
[![Release Passing](https://github.com/ben-ranford/cellin/actions/workflows/release.yml/badge.svg)](https://github.com/ben-ranford/cellin/actions/workflows/release.yml)

Cellin builds long-lived multimodal memory, dreams over it to consolidate ideas, and
retrieves context with transparent weighted ranking.

## Install

From source today:

```bash
git clone https://github.com/ben-ranford/cellin.git
cd cellin
make bootstrap
```

Install from [PyPI](https://pypi.org/project/cellin/):

```bash
python3 -m pip install cellin
```

## Quickstart

From the repository root:

```bash
WORKSPACE=.cellin-workspace
python3 -m uv run cellin init --workspace "$WORKSPACE"
python3 -m uv run cellin storage list --role memory
python3 -m uv run cellin storage init --config "$WORKSPACE/cellin.json" --dry-run
python3 -m uv run cellin ingest --config "$WORKSPACE/cellin.json" --input examples/starter/seed_envelopes.json
python3 -m uv run cellin retrieve --config "$WORKSPACE/cellin.json" --query "memory graph retrieval" --top-k 2
python3 -m uv run cellin dream --config "$WORKSPACE/cellin.json" --strategy abstraction
python3 -m uv run cellin eval run --suite smoke --config "$WORKSPACE/cellin.json" --output "$WORKSPACE/smoke.json"
python3 -m uv run cellin trace inspect --config "$WORKSPACE/cellin.json" --limit 5
```

See `examples/starter/README.md` for the same flow in a shorter checklist form.

Workspace config now supports role-specific storage backends:

```json
{
  "runtime_id": "cellin-cli",
  "trace_path": "traces.jsonl",
  "profile_name": "balanced",
  "storage": {
    "memory": { "backend": "in_memory" },
    "graph": { "backend": "in_memory" },
    "vector": { "backend": "in_memory_vector_index" },
    "representation": { "backend": "in_memory_vector_index" }
  }
}
```

`cellin init` now writes this in-memory-first preset by default.

Legacy workspaces that only define `database_path` continue to work and are migrated to this shape behind the scenes.

Use `cellin storage list` to inspect the built-in provider registry and any third-party providers
registered through the `cellin.storage` entry-point group. Run `cellin storage init --config
<workspace>/cellin.json` before first use when you want an explicit, idempotent setup step for
durable backends.

For an explicit SQLite preset, set:

```json
{
  "memory": { "backend": "sqlite", "database_path": "cellin.sqlite" },
  "graph": { "backend": "sqlite", "database_path": "cellin.sqlite" }
}
```

For additional SQL-backed presets, install optional dependencies as needed:

```bash
python3 -m pip install cellin[duckdb]
python3 -m pip install cellin[postgresql]
python3 -m pip install cellin[mysql]
python3 -m pip install cellin[sql-backends]
python3 -m pip install cellin[storage-backends]
```

Use `duckdb` to point both roles at a local DB file:

```json
{
  "memory": { "backend": "duckdb", "database_path": "cellin.duckdb" },
  "graph": { "backend": "duckdb", "database_path": "cellin.duckdb" }
}
```

Use `postgresql` and `mysql` with connection strings:

```json
{
  "memory": { "backend": "postgresql", "database_path": "postgresql://user:pass@host:5432/db" },
  "graph": { "backend": "postgresql", "database_path": "postgresql://user:pass@host:5432/db" }
}

{
  "memory": { "backend": "mysql", "database_path": "mysql://user:pass@host:3306/db" },
  "graph": { "backend": "mysql", "database_path": "mysql://user:pass@host:3306/db" }
}
```

For document and cache-oriented presets, install optional dependencies as needed:

```bash
python3 -m pip install cellin[mongodb]
python3 -m pip install cellin[redis]
python3 -m pip install cellin[document-cache-backends]
```

Use `mongodb` when you want durable document storage for both memories and edges:

```json
{
  "memory": { "backend": "mongodb", "database_path": "mongodb://user:pass@host:27017/cellin" },
  "graph": { "backend": "mongodb", "database_path": "mongodb://user:pass@host:27017/cellin" }
}
```

Use `redis` for low-latency cache-oriented deployments where operators control TTL or eviction:

```json
{
  "memory": { "backend": "redis", "database_path": "redis://host:6379/0" },
  "graph": { "backend": "redis", "database_path": "redis://host:6379/0" }
}
```

MongoDB stores whole memory and edge documents and preserves archived entries as tombstones in the
document payloads. Redis stores JSON payloads per key and also preserves archived entries as
tombstones, filtering them from neighbor and edge listing reads rather than hard-deleting them.

For graph-native backends, install the optional dependencies you need:

```bash
python3 -m pip install cellin[neo4j]
python3 -m pip install cellin[memgraph]
python3 -m pip install cellin[arangodb]
python3 -m pip install cellin[graph-backends]
```

Use `neo4j`, `memgraph`, or `arangodb` for the graph role while keeping memory storage separate if
you prefer:

```json
{
  "memory": { "backend": "sqlite", "database_path": "cellin.sqlite" },
  "graph": { "backend": "neo4j", "database_path": "bolt://user:pass@host:7687" }
}
```

Graph-native stores persist edge relationships plus graph-local memory payload snapshots. When
`GraphStore.get_memory()` is asked for a node that only exists as a placeholder created during edge
upserts, it returns `None` and retrieval falls back to the configured memory store as the source of
truth. That keeps mixed deployments working without caller changes while making the graph-local
snapshot behavior explicit.

For vector-backed retrieval stores, install the optional dependencies you need:

```bash
python3 -m pip install cellin[pgvector]
python3 -m pip install cellin[pinecone]
python3 -m pip install cellin[qdrant]
python3 -m pip install cellin[weaviate]
python3 -m pip install cellin[milvus]
python3 -m pip install cellin[redis-vector]
python3 -m pip install cellin[vector-backends]
```

Use `cellin storage init --config "$WORKSPACE/cellin.json"` after switching a workspace onto a
durable backend family so local files, schemas, or remote collection bootstrap happen explicitly
before ingest or retrieval.


## Primary surfaces

- CLI: `cellin init`, `storage list`, `storage init`, `ingest`, `retrieve`, `dream`, `plugin list`, `eval run`, `trace inspect`
- Ingestion: `cellin.ingest.ArtifactEnvelope` and `cellin.ingest.CanonicalIngestor`
- Retrieval: `cellin.retrieval.WeightedRetriever`, `cellin.retrieval.RetrievalCandidateGenerator`, and `cellin.ranking.WeightedRanker`
- Dreaming: `cellin.dreaming.DreamRunner` plus the built-in deduplication, abstraction, and contradiction-repair strategies
- Evals: `cellin.evals.run_evaluation_suite` and `cellin.evals.run_smoke_eval`
- Extensibility: `cellin.runtime.PluginRegistry` and the contracts exported from `cellin.core`
