Skip to content

Commit d1a8c7b

Browse files
committed
docs: rebuild docs as a GitBook grounded in the real engine modules
Replace the old scripted/SaaS GitBook (pip/Python client, API keys, fictional multi-SDK pages) with a developer doc set inferred from the actual crate: architecture, core concepts, and one page per engine module (storage, ingest, scoring, memory tree & compression, retrieval, queue, diff, entities/graph, sources, goals/tool memory, conversations/archivist), plus honest benchmarks (from benchmarks/), FAQ, and contributing. New SUMMARY + marketing landing README. Consolidate the standalone wiki/ into the GitBook (single source of truth) and point the root README at the GitBook. All internal links and image assets verified; no SaaS fiction remains.
1 parent c9f7893 commit d1a8c7b

63 files changed

Lines changed: 533 additions & 2671 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
[![docs.rs](https://img.shields.io/docsrs/tinycortex)](https://docs.rs/tinycortex)
99
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
1010

11-
[Discord](https://discord.tinyhumans.ai)[Reddit](https://www.reddit.com/r/tinyhumansai/)[X](https://x.com/tinyhumansai)[Wiki](../../wiki)[Docs](https://tinyhumans.gitbook.io/tinycortex/)
11+
[Discord](https://discord.tinyhumans.ai)[Reddit](https://www.reddit.com/r/tinyhumansai/)[X](https://x.com/tinyhumansai)[Docs](https://tinyhumans.gitbook.io/tinycortex/)
1212

13-
#### [Benchmarks](#-benchmarks)[Getting Started](#-getting-started)[Architecture](../../wiki/Architecture-Overview)[Read the paper](./paper/README.md)
13+
#### [Benchmarks](#-benchmarks)[Getting Started](#-getting-started)[Architecture](https://tinyhumans.gitbook.io/tinycortex/)[Read the paper](./paper/README.md)
1414

1515
</div>
1616

@@ -75,7 +75,7 @@ async fn main() -> anyhow::Result<()> {
7575
}
7676
```
7777

78-
The `InMemoryMemoryStore` is the simple reference backend. The full engine — content store, chunking, scoring, summary trees, vector/keyword/graph/hybrid retrieval, the diff ledger, and the async job queue — lives under the [`memory`](https://docs.rs/tinycortex/latest/tinycortex/memory/) module. See the **[Wiki](../../wiki)** for the architecture, concepts, and end-to-end ingest walkthroughs.
78+
The `InMemoryMemoryStore` is the simple reference backend. The full engine — content store, chunking, scoring, summary trees, vector/keyword/graph/hybrid retrieval, the diff ledger, and the async job queue — lives under the [`memory`](https://docs.rs/tinycortex/latest/tinycortex/memory/) module. See the **[documentation](https://tinyhumans.gitbook.io/tinycortex/)** for the architecture, concepts, and end-to-end ingest walkthroughs.
7979

8080
# 🧩 How It Works
8181

@@ -102,7 +102,7 @@ source payload
102102
| **Conversations / Archivist** | Transcript storage and conversion of turns into summary-tree leaves |
103103
| **Queue** | Async jobs: extract, append, seal, flush-stale, re-embed, seal-document |
104104

105-
Full details live in the **[Architecture Overview](../../wiki/Architecture-Overview)**.
105+
Full details live in the **[documentation](https://tinyhumans.gitbook.io/tinycortex/)**.
106106

107107
# 📈 Benchmarks
108108

@@ -124,11 +124,11 @@ An agent runs a simulated vending-machine business over 30 days. TinyCortex achi
124124

125125
![chart_vendingbench](docs/images/chart_vendingbench.png)
126126

127-
See the [Benchmarks wiki](../../wiki/Benchmarks) to reproduce these on your own corpus.
127+
See [`benchmarks/`](./benchmarks/README.md) to reproduce these on your own corpus.
128128

129129
# 📚 Documentation
130130

131-
- **[Wiki](../../wiki)** — architecture, concepts, getting started, and FAQ
131+
- **[Documentation (GitBook)](https://tinyhumans.gitbook.io/tinycortex/)** — architecture, concepts, getting started, and FAQ
132132
- **[docs.rs/tinycortex](https://docs.rs/tinycortex)** — generated API reference
133133
- **[The paper](./paper/README.md)** — the research behind the memory model
134134
- **[CONTRIBUTING.md](./CONTRIBUTING.md)** — how to build, test, and contribute

gitbooks/README.md

Lines changed: 45 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,65 @@
11
---
2-
description: The memory layer for AI agents. Scales to 1B+ tokens.
2+
description: The local-first AI memory engine — a Rust crate that learns what matters and forgets the noise.
33
---
44

5-
# Introducing TinyCortex 🧠
5+
# Introduction
66

7-
Every AI memory system you've used does the same thing: store everything, retrieve by similarity, hope for the best.
7+
# TinyCortex 🧠
88

9-
The outcome: Your agent drowns in stale context. Responses degrade. Costs inflate. You end up writing custom pruning logic at 2am.
9+
**TinyCortex** is a local-first AI memory engine, shipped as the open-source Rust crate [`tinycortex`](https://crates.io/crates/tinycortex). It gives your agents a memory that works the way a brain does: it **intelligently forgets noise** so the model only reasons over what matters.
1010

11-
TinyCortex takes a fundamentally different approach. Inspired by how the human brain actually works, it **intelligently forgets noise** so your AI only reasons over what matters. Low-value memories decay naturally over time. Knowledge your users interact with gets reinforced and rises to the top. It doesn't require manual cleanup and there is no context window anxiety.
11+
Every AI memory system you have used does the same thing — store everything, retrieve by similarity, hope for the best. The outcome is an agent that drowns in stale context: responses degrade and costs inflate. TinyCortex takes the opposite approach. Low-value memories **decay** over time, while the knowledge your users recall and interact with is **reinforced** and rises to the top. There is no manual cleanup and no context-window anxiety.
1212

13-
The result: an AI memory system that processes over **1 billion tokens**, stays lean and focused, and gets smarter with every interaction.
13+
The engine ingests content, canonicalizes and chunks it, scores what is worth keeping, and **compresses** it into a hierarchical summary tree. Retrieval then serves a focused, explainable slice of long-term history — vector, keyword, graph, and tree search combined — instead of a noisy dump of everything ever stored.
1414

15-
For a deployment serving 100,000 users with ongoing conversation history:
16-
17-
| Approach | Cost per user per year |
18-
| ---------------------------------------------- | ---------------------- |
19-
| Frontier model context (everything in-context) | \~$90,000 |
20-
| Standard RAG pipeline | \~$2.40 |
21-
| **TinyCortex** | **\~$0.72** |
22-
23-
The 1,000:1 compression ratio means storage and compute costs grow slowly relative to conversation volume. TinyCortex indexes a conversation for $0.0004, compared to $0.0112 for Mem0 (28x lower).
24-
25-
## Core Features
26-
27-
### Intelligent Noise Filtering
28-
29-
Memories that aren't accessed naturally decay over time. Frequently recalled knowledge becomes more durable. The system stays lean on its own without manual cleanup and intervention.
30-
31-
<div align="center"><img src=".gitbook/assets/AppleEmailGraph.gif" alt="Memory Decay Simulation" width="700"></div>
32-
33-
### Interaction-Aware
15+
{% hint style="info" %}
16+
This documentation covers the **open-source Rust crate**. The hosted TinyCortex platform (managed API, language SDKs) is a separate product in **closed alpha**[reach out](mailto:founders@tinyhumans.ai) for access. Crate-only vs. hosted-only capabilities are called out throughout.
17+
{% endhint %}
3418

35-
Not all memories are equal. Views, reactions, replies, and content creation all signal what matters. Knowledge people engage with rises to the top; ignored information fades away.
19+
## Quickstart
3620

21+
```bash
22+
cargo add tinycortex
23+
```
3724

25+
```rust
26+
use tinycortex::memory::{InMemoryMemoryStore, MemoryInput, MemoryQuery, MemoryStore};
3827

39-
<div align="center"><img src=".gitbook/assets/BobMemoryDecayVideo.gif" alt="Interaction Graph" width="700"></div>
28+
#[tokio::main]
29+
async fn main() -> anyhow::Result<()> {
30+
let store = InMemoryMemoryStore::new();
4031

41-
### Low Latency, Low Cost, High Quality
32+
store
33+
.insert(MemoryInput::new("preferences", "User prefers dark mode"))
34+
.await?;
4235

43-
No compromise on speed and quality when processing data with TinyCortex. Everything is processed at low cost and low latency while maintaining high benchmark scores
36+
let hits = store.search(MemoryQuery::text("theme preference")).await?;
37+
for hit in hits {
38+
println!("{:.3} {}", hit.score, hit.record.content);
39+
}
40+
Ok(())
41+
}
42+
```
4443

45-
| Metric | TinyCortex | Nearest Competitor |
46-
| --------------- | ---------- | ------------------------- |
47-
| Average latency | \~1.1s | \~3.6s (Mem0) |
48-
| Query cost | \~$0.00095 | \~$0.00085 (Mem0) |
49-
| Index cost | \~$0.0005 | \~$0.014 (Mem0, 28x more) |
44+
See **[Getting Started](getting-started.md)** for the full walkthrough, or jump to the **[Architecture Overview](architecture.md)** to understand how the engine fits together.
5045

51-
## Quick Start
46+
## Why TinyCortex
5247

53-
```bash
54-
pip install tinyhumansai
55-
```
48+
* **Intelligent noise filtering** — memories that are not accessed decay; frequently recalled knowledge becomes durable. The store stays lean on its own.
49+
* **Interaction-aware** — views, replies, reactions, and authored content all signal what matters.
50+
* **Local-first & inspectable** — markdown files are the source of truth; SQLite, vectors, summary trees, and a git ledger are rebuildable derived indexes.
51+
* **Explainable retrieval** — every hit carries a score breakdown across graph, vector, keyword, and freshness signals.
52+
* **Provenance & safety** — every item carries source identity and a security `taint` (internal vs. external-sync).
5653

57-
```python
58-
import tinyhumansai as api
59-
60-
client = api.TinyHumanMemoryClient("YOUR_APIKEY_HERE")
61-
62-
# Store a memory
63-
client.ingest_memory({
64-
"key": "user-preference-theme",
65-
"content": "User prefers dark mode",
66-
"namespace": "preferences",
67-
"metadata": {"source": "onboarding"},
68-
})
69-
70-
# Ask a question using stored memory
71-
response = client.recall_with_llm(
72-
prompt="What is the user's preference for theme?",
73-
api_key="OPENAI_API_KEY"
74-
)
75-
print(response.text) # The user prefers dark mode
76-
```
54+
## Where to go next
7755

78-
That's it. Ingest memories, recall them with any LLM. TinyCortex handles the hard parts: deduplication, decay, graph-based retrieval, and noise pruning.
56+
| If you want to… | Read |
57+
| --------------- | ---- |
58+
| Install and run your first store | [Getting Started](getting-started.md) |
59+
| Understand the layered design | [Architecture Overview](architecture.md) |
60+
| Learn the vocabulary (namespaces, taint, decay, recall) | [Core Concepts](core-concepts.md) |
61+
| See how memories are compressed into a tree | [Memory Tree & Compression](memory-tree.md) |
62+
| Query memory | [Retrieval](retrieval.md) |
63+
| Read the generated API reference | [docs.rs/tinycortex](https://docs.rs/tinycortex) |
7964

80-
{% hint style="info" %}
81-
TinyCortex is currently in **closed alpha**. To get access, [reach out to us](mailto:founders@tinyhumans.ai).
82-
{% endhint %}
65+
[Discord](https://discord.tinyhumans.ai)[Reddit](https://www.reddit.com/r/tinyhumansai/)[X](https://x.com/tinyhumansai)[crates.io](https://crates.io/crates/tinycortex)

gitbooks/SUMMARY.md

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,30 @@
11
# Table of contents
22

3-
* [Introducing TinyCortex 🧠](README.md)
4-
* [How Human Memory Works?](how-memory-works.md)
5-
* [Architecture Overview](architecture-overview/README.md)
6-
* [Privacy Architecture](architecture-overview/privacy-architecture.md)
7-
* [Getting an API Key](api-key.md)
8-
9-
## Use Cases
10-
11-
* [Customer & Community Support](use-cases/customer-support.md)
12-
* [Realtime Personalized Call Assist](use-cases/realtime-call-assist.md)
13-
* [Company & Team KB Agent](use-cases/team-kb-agent.md)
14-
* [Personalized Assistant](use-cases/personalized-assistant.md)
15-
16-
## Developers
17-
18-
* [Overview](developers/overview.md)
19-
* [Concepts](developers/concepts/README.md)
20-
* [Recall](developers/concepts/recall.md)
21-
* [Memory Decay](developers/concepts/memory-decay.md)
22-
* [Namespaces](developers/concepts/namespaces.md)
23-
* [Context](developers/concepts/context.md)
24-
* [Memory Items](developers/concepts/memory-items.md)
25-
* [Interactions](developers/concepts/interactions.md)
26-
* [Delete](developers/concepts/delete.md)
27-
* [Ingest](developers/concepts/ingest.md)
28-
* [Timestamps](developers/concepts/timestamps.md)
29-
* [SDK Functions](developers/sdk-functions/README.md)
30-
* [Inserting Memories](developers/sdk-functions/inserting-memories.md)
31-
* [Recalling Memories](developers/sdk-functions/recalling-memories.md)
32-
* [Deleting Memories](developers/sdk-functions/deleting-memories.md)
33-
* [Third-party Plugins/Integrations](developers/third-party-plugins-integrations/README.md)
34-
* [LangGraph Plugin](developers/third-party-plugins-integrations/langgraph-sdk.md)
35-
* [OpenClaw Plugin](developers/third-party-plugins-integrations/openclaw-plugin.md)
36-
37-
## Benchmarks
38-
39-
* [Overview](benchmarks/benchmarks.md)
40-
* [RAGAS](benchmarks/ragas.md)
41-
* [TemporalBench](benchmarks/temporalbench.md)
42-
* [BABILong](benchmarks/babilong.md)
43-
* [Vending-Bench](benchmarks/vending-bench.md)
44-
* [Run Your Own](benchmarks/run-your-own.md)
45-
46-
## FAQ
47-
48-
* [General](faq/general.md)
49-
* [How it Works](faq/how-it-works.md)
50-
* [Data & Organization](faq/data-and-organization.md)
51-
* [Privacy and Security](faq/privacy-and-security.md)
52-
* [Pricing & Access](faq/pricing-and-access.md)
3+
* [Introduction](README.md)
4+
* [How Human Memory Works](how-memory-works.md)
5+
* [Getting Started](getting-started.md)
6+
7+
## Concepts
8+
9+
* [Architecture Overview](architecture.md)
10+
* [Core Concepts](core-concepts.md)
11+
12+
## The Engine
13+
14+
* [Storage Primitives](storage-primitives.md)
15+
* [Ingest Pipeline](ingest-pipeline.md)
16+
* [Scoring & Extraction](scoring-and-extraction.md)
17+
* [Memory Tree & Compression](memory-tree.md)
18+
* [Retrieval](retrieval.md)
19+
* [Job Queue](job-queue.md)
20+
* [Diff Layer](diff-layer.md)
21+
* [Entities & Graph](entities-and-graph.md)
22+
* [Sources](sources.md)
23+
* [Goals & Tool Memory](goals-and-tool-memory.md)
24+
* [Conversations & Archivist](conversations-and-archivist.md)
25+
26+
## Reference
27+
28+
* [Benchmarks](benchmarks.md)
29+
* [FAQ](faq.md)
30+
* [Building & Contributing](contributing.md)

gitbooks/api-key.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)