What is Context?
Context in Factory represents all the information relevant to your current development task. Unlike traditional development environments where context lives across multiple tools and tabs, Factory brings everything together in one place, allowing AI to understand and assist with your work more effectively.The Context Panel
The Context Panel is your central hub for managing all context in Factory. Access it from the chat interface to view, add, and manage different types of context.

How Context Works
Factory’s context system operates on three key principles:Smart Aggregation
Factory automatically collects and organizes context from your connected tools and repositories.
Intelligent Understanding
Our AI analyzes relationships between different pieces of information to provide relevant insights.
Selective Focus
Prioritize the most relevant information for your current task to maintain optimal performance.
Types of Context
Factory distinguishes between different types of context based on how they’re added and managed:External Integration Context
These are external resources you bring into your session:- Project Management: Jira tickets, Linear issues, GitHub/GitLab issues
- Code Reviews: Pull requests, merge requests, code discussions
- Documentation: Google Docs, Notion pages, Confluence wikis
- Incidents: PagerDuty incidents, Sentry issues, monitoring alerts
- Communication: Slack threads, team discussions
Dynamic Repository Context
Factory dynamically manages code context as you work:- Code Files: Source files, configurations, tests automatically pulled as needed
- Code Snippets: Specific functions, classes, or code blocks identified by the droid
- Repository Structure: Directory layouts, file relationships, project organization
- Search Results: Code search, pattern matching, dependency analysis
- Build & Test Output: Compilation results, test failures, logs from executed commands
Managed Memory Context
Persistent knowledge that Factory manages for you:- User Memory: Personal preferences, workflows, and patterns (private to you)
- Organization Memory: Team conventions, standards, and shared knowledge
- Session History: Recent conversations and task progress
- Learning Patterns: Frequently used commands and solutions
Context Limits and Optimization
Understanding Token Limits
Tokens are the fundamental units that Factory uses to process text. Each session has a context limit based on the underlying LLM being used.What are Tokens?
What are Tokens?
Tokens are discrete units of text that language models use to process and understand content. They represent the atomic elements of text processing, where words, subwords, or individual characters are converted into numerical values that the AI can analyze.Basic Concepts:
- Tokens can be words, parts of words, or even single characters
- Common words are usually single tokens (e.g., “the”, “is”, “Factory”)
- Longer or uncommon words might be split into multiple tokens
- Punctuation marks and spaces count as tokens
- Maximum context window: ~200,000 tokens (Claude 3.5 Sonnet)
- Optimal working range: 40,000-80,000 tokens
- Includes all context sources: code, documentation, conversation history
Best Practices for Context Management
1
Start Focused
Begin with core context essential to your task:
- Main files you’re working on
- Directly related tickets or PRs
- Immediate documentation needs
2
Add Context Gradually
Expand context as your task evolves:
- Add related PRs when reviewing code
- Include additional documentation when exploring features
- Bring in historical context for deeper understanding
3
Maintain Context Hygiene
Regularly review and update your context:
- Remove outdated or irrelevant information
- Update stale documentation
- Clear context when switching between unrelated tasks
4
Monitor Context Size
Keep an eye on your token usage:
- Use the context panel to track current usage
- Stay within the optimal range for best performance
- Remove unnecessary context when approaching limits
Quick Context Actions
Add Context with @
Use @ commands in chat to quickly add:
- @file for code files
- @ticket for Jira/Linear issues
- @pull request for PRs
- @google docs for documents
- @notion for wiki pages
Paste Links Directly
Simply paste URLs to automatically add:
- GitHub/GitLab PRs and issues
- Jira/Linear tickets
- Google Docs/Notion pages
- Sentry issues
- PagerDuty incidents