Capsules
Capsules are compressed, AI-readable artifacts that package runtime context for debugging and analysis.
What Are Capsules?
A Capsule is a self-contained snapshot of a specific moment or event in your Unity runtime. It includes:
- Timeline: Events leading up to and following the moment
- Game State: Relevant object states and component data
- Errors: Stack traces and exception context
- Analysis: AI-generated insights and suspect identification (Pro)
Think of a Capsule like a flight recorder (black box). It captures everything needed to understand what happened, without requiring you to narrate the bug.
Why Capsules Save Tokens
Traditional debugging requires the AI to:
- Ask for logs
- Parse unstructured text
- Request more context
- Repeat until understanding
Token cost: High (multiple round trips, large context windows)
Capsules provide:
- Structured, compressed context
- Pre-analyzed suspects
- Direct source links
- Complete timeline in one artifact
Token cost: Low (single artifact, targeted context)
Capsule Structure
A typical capsule contains:
1{
2 "id": "capsule_abc123",
3 "timestamp": "2024-01-15T10:30:00Z",
4 "type": "error",
5 "summary": "NullReferenceException in CardNameNormalizer",
6 "timeline": [
7 { "time": -5.2, "event": "Player clicked card" },
8 { "time": -2.1, "event": "CardNameNormalizer.Normalize() called" },
9 { "time": 0.0, "event": "Exception thrown" }
10 ],
11 "errors": [
12 {
13 "message": "NullReferenceException",
14 "stackTrace": "...",
15 "source": { "file": "CardNameNormalizer.cs", "line": 47 }
16 }
17 ],
18 "suspects": [
19 {
20 "object": "CardNameNormalizer",
21 "confidence": "High",
22 "reason": "Exception source matches suspect"
23 }
24 ]
25}When to Use Capsules
Use capsules for:
- Bug Reports: Package complete context for AI analysis
- Performance Issues: Capture frame spikes with full context
- Unexpected Behavior: Document "what happened" vs "what should happen"
- AI Decision Debugging: Understand why the AI chose a specific action
Create a capsule immediately after encountering a bug, before attempting fixes. This preserves the exact state for analysis.
Creating Capsules
Via MCP Tool
1@aether package last_errorOr for a specific mark:
1@aether package last_markProgrammatically
Capsules are automatically created when:
- An error occurs (if auto-capture enabled)
- A mark is created with
aether_mark - Manually via
aether_packagetool
Capsule Types
Error Capsules
Created automatically when errors occur. Includes:
- Exception details
- Stack trace
- Game state at error time
- Timeline of events leading to error
Mark Capsules
Created from marks. Includes:
- Context before/after the mark
- Custom label/description
- Screenshot (if enabled)
- Full game state
Session Capsules
Created for entire play sessions. Includes:
- Complete event timeline
- All errors and warnings
- Performance metrics
- Full game state history
Pro Features
Pro tier capsules include:
- Ranked Suspects: AI-analyzed likely causes
- Source Links: Direct links to suspect code
- Richer Compression: More context in smaller size
- Confidence Scores: How certain the analysis is
Viewing Capsules
Via MCP Tool
1@aether viewCapsuleVia Capsule Viewer
Capsules are saved as HTML files that can be opened in a browser:
1{DataDirectory}/Aether/Capsules/capsule_{id}.htmlBest Practices
- Create Early: Generate capsules immediately after bugs
- Use Marks: Create marks at key moments for later analysis
- Review Suspects: Check Pro tier suspect analysis
- Share Context: Capsules are perfect for sharing with AI or team
Next Steps
- Learn about GTML - the format capsules use
- See Tools Reference for capsule creation commands
- Check Recipes for common capsule workflows