This document details Antigravity's persistent context system, specifically focusing on Conversation Logs and Artifacts as raw historical data storage. Antigravity maintains two complementary mechanisms for accessing information from past conversations:
This dual system allows Antigravity to retrieve context at different granularities: reading conversation logs provides complete historical detail for specific conversations, while Knowledge Items provide synthesized knowledge across multiple conversations on related topics.
Sources: Google/Antigravity/Fast Prompt.txt216-221
Conversation logs are stored in a structured file system hierarchy within the .gemini directory. Each conversation is assigned a unique Conversation ID (UUID format) and maintains its own directory with system-generated logs and artifacts.
Diagram: Conversation Logs File System Hierarchy
Sources: Google/Antigravity/Fast Prompt.txt204-224 Google/Antigravity/Fast Prompt.txt277-281
| Component | Path Pattern | Purpose |
|---|---|---|
| Brain Root | C:\Users\Lucas\.gemini\antigravity\brain\ | Root directory for all conversation data |
| Conversation Directory | brain/[UUID]/ | Container for single conversation's data |
| System Generated | brain/[UUID]/.system_generated/ | System-managed files including logs |
| Logs Directory | brain/[UUID]/.system_generated/logs/ | Contains overview and task-specific logs |
| Overview Log | logs/overview.txt | High-level summary of conversation |
| Task Logs | logs/task_NNN.txt | Detailed logs for specific tasks |
| Artifacts Directory | brain/[UUID]/artifacts/ | ASSISTANT-generated content from conversation |
Sources: Google/Antigravity/Fast Prompt.txt222-224 Google/Antigravity/Fast Prompt.txt277-281
Antigravity implements a staged reading approach to efficiently navigate conversation logs without overwhelming context. This pattern prioritizes high-level overview before diving into detailed task logs.
Diagram: Staged Reading Workflow
The staged approach prevents unnecessary context loading:
.system_generated/logs/overview.txt to understand conversation scopetask_NNN.txt files if overview indicates relevanceSources: Google/Antigravity/Fast Prompt.txt277-281 Google/Antigravity/Fast Prompt.txt238-239
Conversation logs should be accessed when the agent needs specific details from a small number of conversations. This is appropriate when context can be narrowed to particular conversation instances.
Diagram: Decision Tree for When to Use Conversation Logs
Sources: Google/Antigravity/Fast Prompt.txt225-231
| Scenario | Approach | Tools |
|---|---|---|
| @mention with Conversation ID | Direct access if information is likely relevant | list_dir, view_file |
| User mentions "yesterday's conversation" | Identify by recency from available conversation IDs | list_dir, grep_search on overview files |
| User references specific detail | Search filesystem to identify conversation(s) | codebase_search, grep_search |
| Need exact wording/code | Access conversation logs for verbatim content | view_file on task logs and artifacts |
Sources: Google/Antigravity/Fast Prompt.txt225-231
Antigravity explicitly defines anti-patterns where conversation logs should not be accessed to prevent context overload and redundant work.
Diagram: Anti-Patterns for Conversation Log Access
Sources: Google/Antigravity/Fast Prompt.txt232-239
When Researching Topics: Always search Knowledge Items first. Only read conversation logs if no relevant KIs exist.
Referenced but Irrelevant: If a KI or another conversation references a conversation ID, but the summary indicates irrelevance to current context, do not access it.
After Reading Overview: Once overview.txt is read and assessed as not relevant, do not proceed to task logs or artifacts.
Broad Knowledge Queries: For questions spanning multiple conversations or general topics, use Knowledge Items exclusively.
Sources: Google/Antigravity/Fast Prompt.txt232-239
The persistent context system maintains both raw logs and distilled knowledge. Understanding when to use each system is critical for efficient context gathering.
| Aspect | Conversation Logs | Knowledge Items (KIs) |
|---|---|---|
| Content Type | Raw, original conversation data | Distilled, curated knowledge |
| Scope | Single conversation instance | Cross-conversation, topical |
| Update Mechanism | Created during conversation | Generated by KNOWLEDGE SUBAGENT post-conversation |
| Storage Location | brain/[UUID]/.system_generated/ | knowledge/[KI-ID]/ |
| Primary Use | Specific conversation details | Research and knowledge lookup |
| Access Pattern | Staged reading (overview → tasks) | Check summaries first, then artifacts |
| Best For | Debugging specific past decisions, retrieving exact code/wording | Understanding architecture, patterns, best practices |
Sources: Google/Antigravity/Fast Prompt.txt216-221 Google/Antigravity/Fast Prompt.txt240-249
Diagram: Decision Criteria for Context System Selection
Sources: Google/Antigravity/Fast Prompt.txt244-249
Scenario: User says "The refactoring we just did to extract the game logic into a separate module broke the unit tests."
Diagram: Example Workflow for Implicit Conversation Reference
Sources: Google/Antigravity/Fast Prompt.txt270-293
Scenario: User requests "Add a new AI player to my tic-tac-toe game that uses minimax algorithm and follows the existing game architecture patterns."
Agent receives KI summaries at conversation start:
game_architecture_patterns KI with artifacts: architecture_overview.md, implementation_patterns.md, class_diagram.mdrandomized_ai_implementation KI with artifacts: random_player.md, ai_player_interface.md, testing_strategies.mddatabase_schema KI (irrelevant)ui_components KI (irrelevant)Agent behavior:
Diagram: KI-Only Usage Pattern (No Conversation Logs)
Key observations:
list_dir or grep_search to find conversationsSources: Google/Antigravity/Fast Prompt.txt255-269
Scenario: User asks "What's the difference between async and await in JavaScript?"
Agent behavior:
Sources: Google/Antigravity/Fast Prompt.txt297-299
| Tool | Purpose | Usage Pattern |
|---|---|---|
list_dir | List contents of conversation logs directory | Called on .system_generated/logs/ to discover available files |
view_file | Read specific log or artifact files | Used for overview.txt, task logs, and artifact files |
codebase_search | Semantic search across file system | Find conversations by topic when ID unknown |
grep_search | Exact pattern matching | Search for specific strings in overview files |
find_by_name | Glob-based file discovery | Locate conversations by pattern matching |
Sources: Google/Antigravity/Fast Prompt.txt277-281 Google/Antigravity/Fast Prompt.txt338-592
For reading a known conversation (ID: 1a2f082d-72a2-b281-0081-8b9cad0e1f20):
1. list_dir(
DirectoryPath="C:\\Users\\Lucas\\.gemini\\antigravity\\brain\\1a2f082d-72a2-b281-0081-8b9cad0e1f20\\.system_generated\\logs"
)
2. view_file(
AbsolutePath="C:\\Users\\Lucas\\.gemini\\antigravity\\brain\\1a2f082d-72a2-b281-0081-8b9cad0e1f20\\.system_generated\\logs\\overview.txt"
)
3. [If relevant] view_file(
AbsolutePath="C:\\Users\\Lucas\\.gemini\\antigravity\\brain\\1a2f082d-72a2-b281-0081-8b9cad0e1f20\\.system_generated\\logs\\task_001.txt"
)
Sources: Google/Antigravity/Fast Prompt.txt413-418 Google/Antigravity/Fast Prompt.txt572-581
| Principle | Description |
|---|---|
| Staged Reading | Always read overview.txt before task logs; stop if not relevant |
| KIs First | For topic research, check Knowledge Items before conversation logs |
| Conversation Logs for Details | Use logs when need specific conversation details or small number of conversations |
| Respect Irrelevance | If overview indicates irrelevance, do not read task logs or artifacts |
| Parallel Access | When multiple files needed, use parallel view_file calls where appropriate |
| Absolute Paths Only | All file operations must use absolute paths (Windows format with backslashes) |
Refresh this wiki