Core Concept: Spaces
Spaces are Rephlo's knowledge bases. They let you "teach" the AI about your specific projects, documents, or style guides. When a Space is active, Rephlo reads from it to produce answers that are accurate and relevant to you.
What is a Space?
Think of a Space as a folder of reference materials with a token budget.
- Without a Space: The AI relies only on its general training (e.g., "Write a contract").
- With a Space: The AI uses your files (e.g., "Write a contract using the terms in my uploaded PDF").
Each Space can carry a small bit of visual identity:
- Emoji icon — a single emoji for quick recognition in the UI.
- Color (
#RRGGBBhex, e.g.#3B82F6) — used for theming the Space's card and badges.
Supported Data Types
You add files to a Space; Rephlo extracts and stores their text. Supported file types and their per-file size limits:
| Type | Extension | Max size |
|---|---|---|
.pdf | 50 MB | |
| Word | .docx | 50 MB |
| Plain text | .txt | 10 MB |
| Markdown | .md | 10 MB |
| CSV | .csv | 20 MB |
Each ingested file's extracted text is stored along with its raw token count, and (when compacted) a compact token count.
How It Works
- Ingestion — You add files. Rephlo extracts and stores their text content.
- Injection — When you run a Command with the Space attached, Rephlo composes the Space content into the prompt sent to the AI.
- Generation — The AI reads that context and answers based on your documents.
Local retrieval (RAG): Rephlo can build a local index of your raw Space content so it retrieves the most relevant sections instead of sending everything. The local index works with raw text only — which is why the Raw data mode is the default for new Spaces (see below).
Token Budget
LLMs have a limit on how much text they can read at once (the context window). Each Space tracks its size against a token budget:
- Token budget — default 100,000 tokens; minimum 1,000, maximum 1,000,000.
- Raw token count — total tokens across all items using raw content.
- Compact token count — total tokens across all items using compact (summarized) content.
These two counts are tracked independently so you can see what a Space costs in each mode. Each file carries its own raw and compact (summarized) token counts, and the Space sums them.
Data modes, AI retrieval (RAG), and token cost
A Space can serve its content to the AI in a few ways. Which one you use matters more for token cost than the raw size of the Space.
Data modes
Each Space has a default data mode (Commands can override it per run):
- Use Raw (default) — keeps the full original text.
- Use Compact — sends an AI-generated summary of each file instead of its full text — the original raw text is still kept — using far fewer tokens at the cost of some detail. Smart Compaction (off by default / opt-in) can compact a Space's files automatically.
Rephlo can retrieve the most relevant passages from any Space — Raw and Compact alike. The data mode decides what gets sent only when retrieval doesn't apply (see below).
AI retrieval (RAG)
When you run a command or chat against a Space, Rephlo uses RAG (retrieval-augmented generation). Instead of sending the whole Space, it semantically searches your documents and sends only the passages that match your request. This happens for any Space, whatever its data mode — retrieval runs on your device, so your documents never leave your machine.
You tune how strict retrieval is with a RAG profile in RAG Retrieval settings:
- The profile sets a match threshold — how similar a passage must be to your request to be included — from Very Lenient (accept weaker matches) to Strictest (only high-confidence matches), with Balanced as the default.
- If too little is relevant or you ask a whole-Space question, Rephlo falls back to sending the entire Space so you never lose context. This fallback is the one place the data mode matters: a Raw Space sends each file's full text, while a Compact Space sends each file's shorter summary.
So which costs the fewest tokens?
It depends mostly on whether retrieval applies:
| What's sent to the AI | When | Relative token cost |
|---|---|---|
| Only the passages matching your request (RAG) | Retrieval applies — the common case | Lowest |
| The Compact (summarized) version of each file in the Space | Fallback, Space in Compact mode | Medium |
| The entire raw text of every file | Fallback, Space in Raw mode | Highest |
So Raw is not automatically "more expensive." When retrieval applies, any Space — Raw or Compact — sends only the matching passages, usually fewer tokens than sending every file. The data mode changes the cost only when Rephlo falls back to sending the whole Space: there, Compact (each file summarized) is cheaper than Raw (each file in full). Exact token counts still depend on your query, the passages that match, and the Space's size.
Strategies and when to switch modes are covered in Smart Compaction & Data Modes.
Spaces and Commands (Many-to-Many)
A Space relates to Commands through a many-to-many relationship:
- A single Space can be linked to many Commands.
- A single Command can use multiple Spaces, and may set one as its Default Space for quick execution.
Managing Spaces
- Active Space — Only one Space is "Active" per interaction. You can switch the active Space instantly from the Dashboard or the Command Runner (e.g., from "Project A" context to "Personal Finance").
- Archive (soft delete) — Spaces are archived rather than deleted outright. Archived Spaces are excluded from active views and command associations, and must be archived before permanent deletion.

For the full lifecycle (uploading, indexing, editing, archiving), see Managing Spaces.
Next Concept: Learn about Providers — the engines powering the AI.