Capsule Architecture
A capsule is Rohrpost’s fundamental unit of compressed context. It captures the essential information from a conversation or workflow session in a structured, queryable format optimized for LLM consumption.
Capsule structure
Each capsule contains:
| Component | Purpose |
|---|---|
| Summary | High-level overview of what was discussed or decided |
| Entities | Key names, identifiers, and references extracted from context |
| Decisions | Explicit decisions made during the session |
| Code refs | File paths, function names, and architectural patterns mentioned |
| Embeddings | Vector representations for semantic retrieval |
Compression pipeline
The distillation pipeline transforms raw conversation context into a capsule through several stages:
- Chunking — Split the input into semantically coherent segments
- Extraction — Identify entities, decisions, and code references using heuristic and LLM-based extractors
- Summarization — Generate a concise summary preserving critical information
- Embedding — Compute vector embeddings for similarity-based recall
- Archival — Store the capsule with full provenance metadata
Token economics
A typical 8,000-token conversation compresses to a capsule of 1,500–2,500 tokens — a 65–80% reduction. When multiple capsules are recalled for a query, Rohrpost further ranks and truncates to fit within your configured token budget.
Multi-tenant isolation
Capsules are scoped to a tenant and project. The storage layer enforces strict isolation — a query in one tenant’s scope will never surface capsules from another tenant, even when sharing the same underlying database.