> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sense-lab.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OSS vs SaaS

> What's in SenseLab's Agent Memory File System (AMFS) open-source vs. AMFS SaaS — and when you need which.

The open-source core gives you the full memory engine with a single-branch repo model — versioning, confidence, outcomes, causal traces, knowledge graph, and a git-like timeline. Pro unlocks the full Git model: branching, merging, pull requests, access control, tags, rollback, cherry-pick, fork — plus multi-tenant SaaS, immutable traces, pattern detection, intelligence, and a dashboard.

***

## At a Glance

<Frame>
  <img src="https://mintcdn.com/senselab/Bnge8XbYhOuhmTYr/images/Screenshot-2026-05-08-at-9.37.14-PM.png?fit=max&auto=format&n=Bnge8XbYhOuhmTYr&q=85&s=49a58579e710a869ac2e74fcb8dca924" alt="Screenshot 2026 05 08 At 9 37 14 PM" width="2350" height="1265" data-path="images/Screenshot-2026-05-08-at-9.37.14-PM.png" />
</Frame>

***

## Feature Comparison

| Capability                                                        | OSS | SaaS |
| :---------------------------------------------------------------- | :-: | :--: |
| **Core Memory Primitives**                                        |     |      |
| Copy-on-Write versioning                                          | Yes |  Yes |
| Confidence scoring with outcome back-propagation                  | Yes |  Yes |
| Memory types (fact, belief, experience)                           | Yes |  Yes |
| Type-specific confidence decay                                    | Yes |  Yes |
| Provenance tiers (production-validated → manual)                  | Yes |  Yes |
| Temporal queries (`history`)                                      | Yes |  Yes |
| Session-level causal explainability (`explain`)                   | Yes |  Yes |
| Enriched decision traces (query events, error events, state diff) | Yes |  Yes |
| Session timing and per-operation latency tracking                 | Yes |  Yes |
| Per-agent memory graph and activity timeline                      | Yes |  Yes |
| Composite recall scoring                                          | Yes |  Yes |
| Multi-scope search                                                | Yes |  Yes |
| Knowledge graph (auto-materialized from writes/outcomes)          | Yes |  Yes |
| Hybrid search (full-text + semantic + composite scoring)          | Yes |  Yes |
| Frequency-modulated decay (4-signal model)                        | Yes |  Yes |
| Tiered memory (Hot / Warm / Archive)                              | Yes |  Yes |
| Progressive retrieval (`depth`)                                   | Yes |  Yes |
| Importance evaluator hook (`ImportanceEvaluator` ABC)             | Yes |  Yes |
| Cortex drift gate (skip-redundant recompilations)                 | Yes |  Yes |
| LLM importance scoring (3-dimension)                              |  —  |  Yes |
| Background tier recomputation (`TierWorker`)                      |  —  |  Yes |
| **Git-like Timeline**                                             |     |      |
| Event logging (writes, outcomes, reads, briefs) on main           | Yes |  Yes |
| Branch-aware read/write/list/search (`branch` parameter)          | Yes |  Yes |
| Timeline API endpoint per agent                                   | Yes |  Yes |
| MCP `amfs_timeline` tool                                          | Yes |  Yes |
| **Memory Branching (Pro)**                                        |     |      |
| Create / close / list branches                                    |  —  |  Yes |
| Diff branch vs. main                                              |  —  |  Yes |
| Merge branches (fast-forward, ours, theirs)                       |  —  |  Yes |
| Branch access control (grant/revoke per user/team/API key)        |  —  |  Yes |
| Access enforcement on non-main read/write                         |  —  |  Yes |
| Pull Requests with review workflow                                |  —  |  Yes |
| Tags / named snapshots                                            |  —  |  Yes |
| Rollback to tag or timestamp                                      |  —  |  Yes |
| Cherry-pick entries across branches                               |  —  |  Yes |
| Fork agent memory to a new agent                                  |  —  |  Yes |
| Sacred Timeline (3D interactive visualization)                    |  —  |  Yes |
| **Connectors**                                                    |     |      |
| Connector framework (`ConnectorABC`)                              | Yes |  Yes |
| Connector CLI (`amfs connector install/list/remove`)              | Yes |  Yes |
| Built-in connectors (PagerDuty, GitHub, Slack, Jira)              | Yes |  Yes |
| Webhook receiver (`/api/v1/webhooks/{name}`)                      | Yes |  Yes |
| **Adapters & Infrastructure**                                     |     |      |
| Filesystem adapter                                                | Yes |  Yes |
| Postgres adapter (triggers, LISTEN/NOTIFY)                        | Yes |  Yes |
| S3 adapter                                                        | Yes |  Yes |
| HTTP/REST API server                                              | Yes |  Yes |
| Docker + Docker Compose + Helm charts                             | Yes |  Yes |
| MCP server (12 tools)                                             | Yes |  Yes |
| **SDKs & Clients**                                                |     |      |
| Python SDK (full parity)                                          | Yes |  Yes |
| TypeScript SDK (full parity)                                      | Yes |  Yes |
| CLI tools                                                         | Yes |  Yes |
| Framework integrations (CrewAI, LangGraph, etc.)                  | Yes |  Yes |
| Bundled lightweight embedder                                      | Yes |  Yes |
| **Multi-Tenant SaaS (Pro)**                                       |     |      |
| Account-level tenant isolation (RLS)                              |  —  |  Yes |
| RBAC (Admin, Developer, User)                                     |  —  |  Yes |
| Scoped API keys with entity-path permissions                      |  —  |  Yes |
| Permissioned inference (scope-filtered search/explain)            |  —  |  Yes |
| OAuth 2.0 / OIDC for dashboard users                              |  —  |  Yes |
| Append-only audit logging                                         |  —  |  Yes |
| Usage quotas + sliding-window rate limiting                       |  —  |  Yes |
| **Immutable Decision Trace Store (Pro)**                          |     |      |
| Durable causal chains across sessions                             |  —  |  Yes |
| Cryptographic signing (HMAC-SHA256) and Merkle chain linking      |  —  |  Yes |
| LLM call span tracking (model, tokens, cost, latency)             |  —  |  Yes |
| Write events, tool calls, and agent interaction recording         |  —  |  Yes |
| OpenTelemetry export (GenAI semantic conventions)                 |  —  |  Yes |
| Historical `explain(outcome_ref)`                                 |  —  |  Yes |
| `search_traces` / precedent search API                            |  —  |  Yes |
| Cross-agent, cross-session trace queries                          |  —  |  Yes |
| **Cross-System Ingestion**                                        |     |      |
| Generic webhook endpoint with HMAC verification                   | Yes |  Yes |
| Payload deduplication (idempotency)                               | Yes |  Yes |
| Pluggable transform pipeline with pattern matching                | Yes |  Yes |
| PagerDuty incident connector                                      | Yes |  Yes |
| Extensible connector framework (`ConnectorABC`)                   | Yes |  Yes |
| **Automated Pattern Detection (Pro)**                             |     |      |
| Recurring failure detection across causal chains                  |  —  |  Yes |
| Hot entity detection (disproportionate activity)                  |  —  |  Yes |
| Stale cluster detection (unvalidated entries)                     |  —  |  Yes |
| Confidence drift detection (outlier entries)                      |  —  |  Yes |
| Configurable alert rules with cooldown suppression                |  —  |  Yes |
| Alert callbacks (Slack, PagerDuty, email routing)                 |  —  |  Yes |
| **Intelligence Layer (Pro)**                                      |     |      |
| LLM-driven memory extraction                                      |  —  |  Yes |
| Auto entity/relationship extraction from traces                   |  —  |  Yes |
| Automated memory critic                                           |  —  |  Yes |
| Memory distillation & bootstrap sets                              |  —  |  Yes |
| Memory safety validation                                          |  —  |  Yes |
| Multi-strategy retrieval with learned ranking (RRF + ML)          |  —  |  Yes |
| Learned retrieval ranking from outcome data                       |  —  |  Yes |
| Adaptive confidence calibration                                   |  —  |  Yes |
| Training data export (SFT, DPO, reward model)                     |  —  |  Yes |
| **Dashboard (Pro)**                                               |     |      |
| Memory explorer with interactive causal graph                     |  —  |  Yes |
| Decision trace explorer with enriched context and causal graph    |  —  |  Yes |
| Per-agent memory graph and activity timeline                      |  —  |  Yes |
| Pattern detection dashboard with severity indicators              |  —  |  Yes |
| Team & user management with roles                                 |  —  |  Yes |
| API key management console with scopes                            |  —  |  Yes |
| Audit log viewer with search/filter                               |  —  |  Yes |
| Usage analytics & quota monitoring                                |  —  |  Yes |
| Snapshot capture, compare, and export                             |  —  |  Yes |
| Memory Tiers dashboard (distribution, entry browser)              |  —  |  Yes |
| Extended MCP server (Pro tools)                                   |  —  |  Yes |

***

## SaaS Tiers

Self-serve tiers for the SaaS version are summarized below:

| Tier           | Indicative price | Included ops/month | Notes                                     |
| :------------- | :--------------- | :----------------- | :---------------------------------------- |
| **Free**       | \$0              | 1K                 | Solo; no team invites; hard cap           |
| **Starter**    | \$29             | 25K                | Entry tier; auto top-up near limit (paid) |
| **Pro**        | \$149            | 50K                | Production agent teams                    |
| **Teams**      | \$449            | 300K               | Org scale; lower overage unit / 10K ops   |
| **Enterprise** | Custom           | Custom             | SSO, committed volume, SLA                |

**Ops =** read-like calls typically **1 op**, writes **2 ops**, `commit_outcome` **0 ops**.

***

## OSS Layer — What's Included

The open-source layer ([github.com/raia-live/amfs](https://github.com/raia-live/amfs)) provides the full memory primitive: read, write, version, search, and learn from outcomes. It includes a git-like timeline engine, branch-aware operations, a connector framework, composite recall scoring, multi-scope search, a knowledge graph auto-materialized from writes and outcomes, hybrid search (full-text + semantic + composite scoring), tiered memory (Hot/Warm/Archive with progressive retrieval), frequency-modulated decay (4-signal model), and a Cortex drift gate that avoids redundant digest recompilations.

### Packages

| Package                   | Description                                                                                                                                                                                                                               |
| :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `amfs-core`               | CoW engine, models, read tracking, causal tagging, default embedder, `tiering` (PriorityScorer, TierAssigner), `importance` (ImportanceEvaluator ABC)                                                                                     |
| `amfs` (SDK)              | `AgentMemory` class — `read`, `write`, `list`, `search`, `history`, `timeline`, `explain`, `commit_outcome`, `record_context`                                                                                                             |
| `amfs-adapter-filesystem` | JSON-file-based adapter for local development                                                                                                                                                                                             |
| `amfs-adapter-postgres`   | PostgreSQL adapter with PL/pgSQL triggers for outcome propagation and `LISTEN/NOTIFY` for watch                                                                                                                                           |
| `amfs-adapter-s3`         | Amazon S3 / S3-compatible adapter for cloud-native storage                                                                                                                                                                                |
| `amfs-http-server`        | REST API server (FastAPI/Uvicorn) for remote access, branch-aware endpoints                                                                                                                                                               |
| `amfs-mcp-server`         | MCP server exposing 12 tools: `amfs_read`, `amfs_write`, `amfs_search`, `amfs_retrieve`, `amfs_list`, `amfs_stats`, `amfs_commit_outcome`, `amfs_record_context`, `amfs_history`, `amfs_explain`, `amfs_graph_neighbors`, `amfs_timeline` |
| `amfs-cli`                | Terminal tools for inspecting, diffing, snapshotting, and restoring memory                                                                                                                                                                |
| `@amfs/sdk`               | TypeScript SDK (full parity with Python: ReadTracker, search, stats, history, explain, recordContext)                                                                                                                                     |

### Key Primitives

**Memory Types** — Every entry is classified as `fact`, `belief`, or `experience`, each with its own decay rate:

```python theme={null}
from amfs import AgentMemory, MemoryType

mem = AgentMemory(agent_id="my-agent")

mem.write("svc", "config", {"pool": 10}, memory_type=MemoryType.FACT)
mem.write("svc", "hypothesis", "Likely N+1", memory_type=MemoryType.BELIEF)
mem.write("svc", "action-log", "Added index", memory_type=MemoryType.EXPERIENCE)
```

**Provenance Tiers** — Entries are automatically ranked by quality based on how they were created:

```python theme={null}
from amfs import ProvenanceTier

entry = mem.read("svc", "pattern")
if entry.provenance_tier == ProvenanceTier.PRODUCTION_VALIDATED:
    print("Validated by production outcomes")
```

**Temporal Queries** — Retrieve the full version history of any entry:

```python theme={null}
versions = mem.history("svc", "retry-pattern", since=last_week)
```

**Causal Explainability** — See which entries were read and how they connect to outcomes:

```python theme={null}
chain = mem.explain()
```

***

## SaaS Layer — What's Added

The SaaS offering wraps the OSS layer — it never replaces it. All Pro features read from and write to the same memory store using the same adapters and SDK.

### Memory Branching — Git for Agent Memory

While OSS provides the git-like timeline engine (event logging on `main`), SenseLab AMFS SaaS adds the full branching model — branches, merges, pull requests, access control, tags, rollback, cherry-pick, and fork. Agents create isolated branches to experiment, then merge changes back into main after review.

<Card title="Memory Branching Deep Dive" icon="code-branch" href="/amfs/pro/branching">
  Full documentation on branches, merge strategies, pull requests, access control, tags, rollback, cherry-pick, fork, and the Sacred Timeline visualization.
</Card>

### Multi-Tenant SaaS Foundation

Every API request is authenticated, authorized, scoped, and audited. Includes account-level Postgres RLS isolation, three-role RBAC (Admin/Developer/User), scoped API keys with entity-path permissions, and sliding-window rate limiting.

<Card title="Multi-Tenant SaaS" icon="building" href="/amfs/pro/multi-tenant">
  Account isolation, RBAC, scoped API keys, OAuth/OIDC, audit logging, rate limiting, and usage quotas.
</Card>

### Immutable Decision Trace Store

The OSS `explain()` works within the active session and captures enriched trace data (query events, error events, session timing, state diffs). SaaS builds on this with persistent, cryptographically signed, immutable traces — the full causal chain is queryable forever. Includes LLM call span tracking with token/cost analytics and OpenTelemetry export.

<Card title="Decision Trace Store" icon="fingerprint" href="/amfs/pro/traces">
  Durable causal chains, cryptographic integrity, LLM call spans, precedent search, and OpenTelemetry export.
</Card>

### Cross-System Ingestion

Automatically ingest events from external systems into AMFS memory. The connector framework transforms raw events into AMFS `write()` or `record_context()` operations, with HMAC verification, deduplication, and pluggable transforms.

<Card title="Cross-System Ingestion" icon="webhook" href="/amfs/pro/ingestion">
  Webhook ingester, connector framework, and built-in connectors for PagerDuty, Slack, GitHub, and Jira.
</Card>

### Automated Pattern Detection

Continuously analyze your memory store to surface recurring patterns, anomalies, and risks — before they become incidents. Detects recurring failures, hot entities, stale clusters, and confidence drift with configurable alert rules and cooldown-based suppression.

<Card title="Pattern Detection" icon="magnifying-glass-chart" href="/amfs/pro/patterns">
  Pattern types, severity levels, alert rules, cooldown suppression, and callback routing.
</Card>

### Intelligence Layer

LLM-powered tools for memory quality and retrieval: extraction (raw text → structured operations), memory critic (toxic/stale/contradictory detection), distiller (compact stores into bootstrap sets), safety validator (pre-write guardrails), multi-strategy retrieval with learned ranking, adaptive confidence calibration, and training data export (SFT, DPO, reward model).

<Card title="Intelligence Layer" icon="brain-circuit" href="/amfs/pro/intelligence">
  Extraction, critic, distiller, safety, retrieval, ML ranking, calibration, and training data export.
</Card>

### Dashboard

A web dashboard (Next.js 15 + React 19) for exploring memory, visualizing decisions, and managing your AMFS deployment.

| Page               | Description                                                                                                                        |
| :----------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| **Overview**       | Account-wide stats, recent activity, health indicators, live SSE status                                                            |
| **Entities**       | Browse entities, view entries with confidence badges, version history, provenance details                                          |
| **Traces**         | Enriched trace cards with causal entries, external contexts, query/error events, session timing, outcome badges, and search/filter |
| **Trace Detail**   | Full trace view with interactive causal graph (D3), timeline, entry snapshots, and state diff                                      |
| **Agents**         | Per-agent overview with memory graph, activity, and Git Repository section                                                         |
| **Incidents**      | Incident timeline with causal chain drill-down                                                                                     |
| **Patterns**       | Detected pattern dashboard with severity indicators and resolution tracking                                                        |
| **Teams**          | Team CRUD with member management (admin, developer, viewer roles)                                                                  |
| **Snapshots**      | Memory snapshot capture, comparison, and JSON export                                                                               |
| **API Keys**       | Key management console with scopes, rate limits, expiry, and usage                                                                 |
| **Audit Log**      | Searchable, filterable log of all state-changing operations                                                                        |
| **Usage & Quotas** | Quota progress bars, request metrics, top agents/entities breakdown                                                                |
| **Pro Tools**      | Retrieval playground, critic panel, distiller view, calibration dashboard, training data export                                    |

<Card title="Dashboard Guide" icon="browser" href="/amfs/pro/dashboard">
  Full walkthrough of every dashboard page, the Agent Git Repository section, and the Sacred Timeline.
</Card>

***

## Architecture

```text theme={null}
┌─────────────────────────────────────────────────────────────┐
│                        Agent / IDE                          │
└────────────────────────────┬────────────────────────────────┘
                             │
              ┌──────────────┴──────────────┐
              ▼                             ▼
   ┌─────────────────┐          ┌───────────────────────────┐
   │  MCP Server OSS │          │  MCP Server Pro            │
   │  (12 tools)     │          │  (12 + 8 tools)            │
   └────────┬────────┘          │                           │
            │                   │  Branching Layer:         │
            │                   │  Branches · Merge · PRs   │
            │                   │  Access Control · Tags    │
            │                   │  Rollback · Fork          │
            │                   │                           │
            │                   │  Multi-Tenant Layer:      │
            │                   │  Auth · RBAC · RLS        │
            │                   │  Scopes · Audit · Quotas  │
            │                   │  Rate Limiting             │
            │                   │                           │
            │                   │  Decision Traces:         │
            │                   │  Recorder · Store · Search │
            │                   │                           │
            │                   │  Ingestion Layer:         │
            │                   │  Webhooks · Connectors    │
            │                   │  PagerDuty · Slack · etc. │
            │                   │                           │
            │                   │  Pattern Detection:       │
            │                   │  Detector · AlertManager  │
            │                   │                           │
            │                   │  Intelligence Layer:       │
            │                   │  Critic · Distiller        │
            │                   │  Safety · Retrieval        │
            │                   │                           │
            │                   │  ML Layer:                │
            │                   │  Ranking · Calibration    │
            │                   │  Training Data Export     │
            │                   └─────────────┬─────────────┘
            │                                 │
            └──────────┬──────────────────────┘
                       ▼
            ┌─────────────────┐
            │   AgentMemory   │  ← Python / TypeScript SDK
            │   (CoW Engine)  │
            │   + Timeline    │  ← Git-like event log
            └────────┬────────┘
                     │
           ┌─────────┼─────────┐
           ▼         ▼         ▼
      Filesystem  Postgres    S3
       Adapter    Adapter   Adapter
```

The SaaS API layer wraps `AgentMemory` and `CoWEngine` with authentication, tenant isolation, scope enforcement, rate limiting, and audit logging — all backed by Postgres RLS for defense-in-depth.

***

## When to Use Which

| Scenario                                                            | Recommendation                              |
| :------------------------------------------------------------------ | :------------------------------------------ |
| Single developer, local memory                                      | OSS                                         |
| Small team sharing via Postgres                                     | OSS                                         |
| CI/CD outcome tracking                                              | OSS                                         |
| Remote HTTP API access                                              | OSS                                         |
| S3-based cloud storage                                              | OSS                                         |
| Git-like timeline (event logging on main branch)                    | OSS                                         |
| Branch-aware read/write (main branch only)                          | OSS                                         |
| Create branches and share memory selectively                        | **SaaS** (branching)                        |
| Branch access control per user/team/API key                         | **SaaS** (branching)                        |
| Merge branches, resolve conflicts                                   | **SaaS** (branching)                        |
| Pull request workflow for memory changes                            | **SaaS** (branching)                        |
| Rollback memory to a point in time or tag                           | **SaaS** (branching)                        |
| Fork agent memory to new agents                                     | **SaaS** (branching)                        |
| Sacred Timeline 3D visualization                                    | **SaaS** (dashboard)                        |
| Multi-tenant SaaS with account isolation                            | **SaaS**                                    |
| Scoped API keys per agent/tool                                      | **SaaS**                                    |
| Compliance audit logging                                            | **SaaS**                                    |
| Enriched decision traces with error/query events and session timing | OSS                                         |
| Per-agent memory graph and activity timeline                        | OSS                                         |
| Immutable, cryptographically signed traces                          | **SaaS**                                    |
| LLM call span tracking with token/cost analytics                    | **SaaS**                                    |
| OpenTelemetry export for existing observability stacks              | **SaaS**                                    |
| Auto entity/relationship extraction from traces                     | **SaaS**                                    |
| Precedent search ("how did we handle similar situations?")          | **SaaS**                                    |
| Auto-ingest PagerDuty/Slack/GitHub events                           | **SaaS** (connectors)                       |
| Detect recurring failure patterns automatically                     | **SaaS** (pattern detection)                |
| Alert on stale memory or confidence drift                           | **SaaS** (alert manager)                    |
| Need memory quality auditing at scale                               | **SaaS**                                    |
| Want LLM-driven extraction from conversations/logs                  | **SaaS**                                    |
| Onboarding new agents with curated knowledge                        | **SaaS** (bootstrap sets)                   |
| Compliance or safety requirements for memory writes                 | **SaaS** (safety validator)                 |
| Advanced retrieval across large stores                              | **SaaS** (multi-strategy + learned ranking) |
| Retrieval that improves as outcomes accumulate                      | **SaaS** (ML layer)                         |
| Need optimized confidence multipliers per entity                    | **SaaS** (adaptive calibration)             |
| Want to fine-tune agents on your decision history                   | **SaaS** (training data export)             |
| Team dashboard for non-technical users                              | **SaaS** (dashboard)                        |

***

## Getting Started

<CardGroup cols={2}>
  <Card title="OSS Quick Start" icon="rocket" href="/amfs/getting-started/quickstart">
    Install with `pip install amfs` and start writing memory in minutes.
  </Card>

  <Card title="Pro Access" icon="key" href="https://raia.live">
    Contact us at raia.live for Pro access and setup instructions.
  </Card>
</CardGroup>
