Distillation turns raw team knowledge — discussions, coding sessions, and GitHub activity — into structured memory that AI coworkers can use. It's the process that makes Team Context get smarter over time.
The problem distillation solves
Teams generate knowledge constantly: in recorded discussions, coding sessions, PR reviews, issue threads. Without distillation, AI coworkers only see the raw artifacts — long transcripts, individual commits, scattered PR comments.
Distillation extracts the signal: decisions made, patterns discovered, constraints learned. The result is layered memory that compounds over time, not a pile of unprocessed notes.
How it works
Three knowledge sources feed through fact extraction and temporal synthesis into Team Context memory.
Each source contributes different kinds of signal. The extraction stage pulls structured facts, then temporal synthesis layers compress and connect them over time.
Three knowledge sources
Discussions
Recorded team conversations. The LLM reads VTT transcripts and extracts decisions, action items, and observations. When server-generated summaries already exist, those are used directly — no redundant extraction.
Coding sessions
Session summaries from the Ledger. No LLM needed here — structured data (decisions, action items, open questions, aha moments) is mapped directly from summary.json. This is the cheapest and fastest source.
GitHub activity
PRs, issues, and commits assembled from CodeDB. The LLM extracts what shipped, what's blocked, collaboration patterns, and review decisions. This captures knowledge that lives in code review threads and commit messages.
Temporal layers
Distillation organizes memory into time-based layers. Each layer synthesizes the one below it, creating progressively higher-level insight.
| Layer | Contains | Example |
|---|---|---|
| Daily | Raw signal from today's work | "Team decided to use pgroll for all schema migrations" |
| Weekly | Patterns and themes from the week | "Authentication refactor dominated the week — three PRs, two design pivots" |
| Monthly | Strategic direction and compounding insights | "Team is converging on event-driven architecture for all async workflows" |
The daily layer captures facts. The weekly layer spots patterns. The monthly layer reveals direction.
The compounding loop
Distillation creates a virtuous cycle where team knowledge feeds forward into future work:
- AI coworker works on code, discovers an insight
- Session is captured to the Ledger
- Distillation extracts the insight into memory
- Next AI coworker session receives it via Team Context
- That coworker applies the insight proactively
This means knowledge discovered in one session automatically benefits every future session — across your entire team.
Local-first architecture
Distillation runs on your machine using your AI coworker's CLI. This gives you:
- Richer context — local repo state, codebase knowledge, recent work
- No SageOx inference cost — uses your own LLM
- Git-native output — results committed directly to your Team Context repo
The server runs anti-entropy fallback workflows for missed distillations. If the CLI skips a run, the backend detects the gap and regenerates with whatever context it has.
Customize distillation
Teams can customize how facts are extracted and synthesized using two guidance files in memory/guidance/:
| File | Controls |
|---|---|
EXTRACT.md | How facts are extracted from sources — what to emphasize, what terminology to use, what patterns to watch for |
DISTILL.md | How facts are synthesized into summaries — what level of detail, what structure, what to highlight |
Run ox doctor --fix to create these files with sensible defaults. Edit them as your team develops preferences for what gets captured.
Run distillation
This fetches the latest discussions, sessions, and GitHub activity, then runs extraction and synthesis for any new or updated sources.
What's next
ox distillCLI reference — all flags and options- Team Context — the repo that distillation writes to
- SageOx + OpenClaw — factory automation pattern using distillation
- SageOx + Claude Code — how distilled memory flows into coding sessions

