An open API service indexing awesome lists of open source software.

https://github.com/wikieden/tempomem

Spatial memory layer for AI agents β€” RGB-D / point clouds to a persistent, queryable, LLM-native 3D scene graph. Mem0 for 3D space.
https://github.com/wikieden/tempomem

3d ai-agents embodied-ai llm point-cloud rgbd robotics scene-graph spatial-memory sqlite

Last synced: about 19 hours ago
JSON representation

Spatial memory layer for AI agents β€” RGB-D / point clouds to a persistent, queryable, LLM-native 3D scene graph. Mem0 for 3D space.

Awesome Lists containing this project

README

          

> 🌐 **English** Β· [δΈ­ζ–‡](README.zh.md)

# Chronotope

[![CI](https://github.com/wikieden/tempomem/actions/workflows/ci.yml/badge.svg)](https://github.com/wikieden/tempomem/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/tempomem)](https://pypi.org/project/tempomem/)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)

Spatial memory layer for AI agents. Turn RGB-D / point clouds into a persistent, queryable, LLM-native 3D scene graph β€” in one pip install.

> **Positioning:** Mem0 for 3D space. ConceptGraphs / Hydra do perception; Mem0 does text memory; nothing today bridges perception β†’ persistent, agent-queryable spatial memory. We fill that slot.

## Quickstart

```python
from tempomem import TempoMem, Detection

# Detections-in (BYO perception): supply label + 3D bbox + feature vector.
mem = TempoMem.open("kitchen.smem", embedding_dim=512)
mem.add_detections([
Detection("mug", feat, center_xyz=(1.2, 0.3, 0.9),
bbox_min=(1.15, 0.25, 0.85), bbox_max=(1.25, 0.35, 0.95)),
])
mem.commit() # runs the fusion arbiter β€” incremental dedup

mem.recent(n=5) # temporal
mem.spatial(near=(1.0, 0.0, 1.0), radius=2.0) # spatial
prompt = mem.serialize(format="prompt") # graph -> compact LLM text

# Natural-language semantic search + answer need an encoder/verbalizer:
mem = TempoMem.open("kitchen.smem", embedding_dim=512,
encoder=my_clip, verbalizer=my_llm)
mem.semantic("coffee mug") # cosine over node features
mem.answer("where is the mug?") # retrieve -> prompt -> BYO LLM

# Streaming RGB-D (needs a PerceptionAdapter; ConceptGraphs adapter is WIP):
# mem = TempoMem.open(..., adapter=MyAdapter())
# mem.add_frame(rgb, depth, pose); mem.commit()
```

Runnable, no GPU: `python examples/01_quickstart.py` and `examples/02_query_and_answer.py`.

## What works today

| Capability | Status |
|---|---|
| Single-file `.smem` SQLite store, persist/reopen | βœ… |
| `add_detections` + incremental fusion (dedup, merge, reject) | βœ… |
| Spatial / temporal / keyword query | βœ… |
| Semantic query via BYO `Encoder` (`OpenClipEncoder` in `[clip]`) | βœ… |
| sqlite-vec ANN index (`[vec]`), linear fallback | βœ… |
| `answer()` via BYO `Verbalizer` (OpenAI / Anthropic / Ollama) | βœ… |
| `decay()` + `forget()` + `resplit()` memory hygiene | βœ… |
| `consolidate()` + `salient()` memory consolidation | βœ… |
| Hierarchy / rooms β€” `define_region()` + `contents()` | βœ… |
| Spatial relations β€” `relate()` + `related()` (`near`/`on`/`under`) | βœ… |
| Relational NL query β€” `query("what's on the table")` traverses edges | βœ… |
| `update()` + `history()` (Mem0-style correction + observation trail) | βœ… |
| Multi-session merge β€” `merge(other.smem)` | βœ… |
| Change detection β€” `moved()` / `changes()` / `stale()` | βœ… |
| `serialize(format="prompt"/"json")` for LLM hand-off | βœ… |
| Token-budgeted prompt β€” `serialize(format="prompt", max_tokens=N)` | βœ… |
| `recall_at_k` eval harness | βœ… |
| Read-only HTML viewer β€” `tempomem viz store.smem -o scene.html` | βœ… |
| RGB-D `add_frame` via `PerceptionAdapter` protocol | βœ… seam; ConceptGraphs adapter WIP (CUDA) |

Core install is **numpy-only**. Heavy backends live behind extras: `[clip]`, `[vec]`, `[perception]`.

## Repo Layout

```
docs/ product + engineering decisions (read first)
spec/ normative API / schema specs
src/tempomem/ Python package (lib)
examples/ runnable demos (real + simulated)
tests/
```

## Status

Pre-alpha. Public design phase. Read in order:

- [docs/00-VISION.md](docs/en/00-VISION.md) β€” what & why
- [docs/01-POSITIONING.md](docs/en/01-POSITIONING.md) β€” competitors & wedge
- [docs/02-ARCHITECTURE.md](docs/en/02-ARCHITECTURE.md) β€” layers & dataflow
- [docs/03-ROADMAP.md](docs/en/03-ROADMAP.md) β€” milestones
- [docs/04-MVP-SCOPE.md](docs/en/04-MVP-SCOPE.md) β€” first deliverable
- [spec/API.md](spec/API.md) β€” Python SDK contract
- [spec/SCHEMA.md](spec/SCHEMA.md) β€” scene-graph schema
- [spec/FUSION-ARBITER.md](spec/FUSION-ARBITER.md) β€” node merging algorithm
- [spec/QUERY-ROUTER.md](spec/QUERY-ROUTER.md) β€” query β†’ retrieval
- [spec/ENGINEERING.md](spec/ENGINEERING.md) β€” coding standards / CI

## License

Apache-2.0 β€” see [LICENSE](LICENSE).