Advanced Workflows
Build systems and prompts.
SAM isn't limited to single conversations. With workflow mode, shared topics, and the consolidated tool system, you can orchestrate entire projects. Specialized conversations working in parallel, sharing knowledge, building on each other's work.
This guide shows you how to: - Design multi-conversation patterns for large projects - Optimize performance for enterprise-scale work
Real-world results: - Research projects spanning hundreds of sources - Full-stack development from planning to deployment - Document analysis across massive corpora - Automated pipelines that run while you sleep
Who this is for: Users who've mastered the basics and want to push SAM to its limits. Build systems that use SAM's full capabilities.
Table of Contents
Multi-Conversation Patterns
Pattern 1: Specialist Team
Concept: Multiple persistent conversations, each specialized in one area
Shared Topic: "Home Purchase 2025"
Conversations:
├── "Market Researcher" (finds listings, pricing trends)
├── "Financial Planner" (budget, mortgage scenarios)
├── "Neighborhood Scout" (schools, commute, amenities)
├── "Inspector Prep" (what to look for, checklists)
└── "Document Tracker" (paperwork, deadlines)
Workflow: 1. Start with Market Researcher to understand the market 2. Financial Planner runs mortgage and budget scenarios 3. Neighborhood Scout evaluates shortlisted areas 4. Inspector Prep reviews each property before viewings 5. Document Tracker stays on top of paperwork and deadlines
Benefits: - Deep specialization per conversation - Context maintained per domain - All access shared workspace
Pattern 2: Pipeline Processing
Setup: Sequential conversations for workflow stages
Shared Topic: "Content Pipeline"
Pipeline:
"Research" → "Drafting" → "Editing" → "Publishing"
Workflow:
Research Conversation:
- Gathers information
- Stores findings in shared memory
- Saves sources to shared workspace
Drafting Conversation:
- Retrieves research from memory
- Reads source documents
- Creates draft in shared workspace
Editing Conversation:
- Reads draft
- Refines content
- Applies style guidelines
Publishing Conversation:
- Reads final draft
- Formats for publication
- Handles deployment
Pattern 3: Review & Iterate
Setup: Primary + Review conversations
Shared Topic: "Code Project"
Conversations:
├── "Implementation" (primary development)
└── "Code Review" (analysis and feedback)
Workflow:
Implementation:
1. Writes code
2. Commits to shared workspace
3. Requests review
Code Review:
1. Reads code from workspace
2. Analyzes for issues
3. Stores feedback in memory
Implementation:
1. Retrieves feedback from memory
2. Implements improvements
3. Cycle repeats
Complex Project Templates
Personal Project Management
Shared Topic Setup:
Topic: "Home Buying 2025"
Directory Structure:
~/SAM/Home Buying 2025/
├── research/
├── finances/
├── neighborhoods/
├── viewings/
└── documents/
Conversations: 1. "Market Research" - Personality: Scientist (analytical, thorough) - Model: a strong reasoning model - Working Dir: research/
- "Budget & Finances"
- Personality: Professional (direct, business-focused)
- Model: a strong writing model
-
Working Dir: finances/
-
"Neighborhood Comparison"
- Personality: Scientist
- Model: a strong reasoning model
-
Working Dir: neighborhoods/
-
"Document Checklist"
- Personality: Professional
- Model: a small, fast model (sufficient for lists)
- Working Dir: documents/
Workflow:
Week 1:
- Market Research: Average prices, trends by area
- Budget & Finances: Pre-approval estimate, monthly payment scenarios
Week 2:
- Neighborhood Comparison: Schools, commute, amenities for shortlist
- Market Research: Dig into specific listings
Week 3:
- Viewings: Log notes from each visit
- Document Checklist: Track what's needed for offer
Week 4:
- All conversations: Final comparison, make offer
Research & Writing Project
Setup:
Topic: "Research Paper on AI Ethics"
Conversations:
1. "Literature Review"
2. "Data Collection"
3. "Analysis"
4. "Writing"
5. "Citations"
Advanced Pattern:
Literature Review:
- Imports multiple PDFs
- Uses Vector RAG for semantic search
- Stores summaries in shared memory
- Tags: "methodology", "findings", "critique"
Data Collection (workflow mode):
- Web research (latest developments)
- Expert interviews (contact info)
- Dataset analysis
Writing (uses all previous work):
- Retrieves summaries from memory
- Accesses imported papers
- References data collection results
- Synthesizes into coherent paper
Citations:
- Scans all references in paper
- Generates bibliography
- Verifies citation format
Performance Optimization
Context Management
Context Window: The effective context window comes from the active model's reported capability - there is no separate profile to pick. Manage long sessions by pruning:
Manual Context Pruning:
When context fills:
1. Clear less important messages
2. Summarize earlier parts
3. Store summaries in memory
4. Continue with clean context
Memory Optimization
Regular Cleanup:
Every few weeks:
1. Review memory statistics
2. Clear low-importance memories (< 0.4)
3. Remove duplicate entries
4. Archive completed project memories
Efficient Storage:
❌ Don't store everything
✅ Store decisions, requirements, and critical information
❌ Don't duplicate across conversations
✅ Use shared topics for related work
❌ Don't use high similarity thresholds for documents
✅ Lower threshold for document search (0.15-0.25)
Model Selection Strategy
By Task Type:
Quick Q&A → Small, fast model (fast, cheap)
Complex Logic → Frontier reasoning model (best reasoning)
Creative Writing → Claude-family model (creative)
Code Generation → Copilot or a code-optimized model
Privacy-Critical → Local MLX/GGUF models (offline)
Cost Optimization:
1. Use cheaper, smaller models for initial drafts
2. Refine with frontier models when needed
3. Use local models for sensitive or privacy-critical data
4. Enable streaming for better user experience
Advanced Tool Usage
Chaining Multiple Tools
Pattern: Research → Store → Retrieve → Create
Step 1: Web Research
Tool: web_operations (research)
Result: Stores findings in memory
Step 2: Memory Retrieval
Tool: memory_operations (search_memory)
Result: Retrieves relevant research
Step 3: Document Creation
Tool: document_operations (create)
Result: Creates final document with citations
File Operation Optimization
Bulk Operations:
Instead of:
- create_file (10 times)
Use:
- multi_replace_string (one operation)
- Apply templates efficiently
Smart Search:
Semantic: Find by meaning
"notes about our budget constraints"
Regex: Find by pattern
"Total:.*\$[0-9]+"
Glob: Find by filename
"**/budget-*.md"
Example: Complete Research Project
Setup (Day 1):
1. Create shared topic: "AI in Healthcare Report"
2. Create four conversations:
- "Literature Review" (Scientist personality, working dir: sources/)
- "Data Analysis" (Professional personality, working dir: data/)
- "Writing" (Creative personality, working dir: drafts/)
- "Fact-Checking" (Scientist personality, working dir: sources/)
3. Enable shared topic in all conversations
Day 1-2: Literature Review
You: Find and summarize 10 key papers on AI diagnostics published since 2021
SAM: [Searches web for papers]
Summarized 10 papers - saved to sources/literature-review.md
Key themes: accuracy improvements, FDA approval challenges, bias concerns
Day 3: Data Analysis
You: Read the literature review and identify the key statistics to highlight
SAM: [Reads sources/literature-review.md from shared workspace]
Found 8 compelling statistics - saved to data/key-stats.md
Strongest: "AI matched radiologist accuracy in 94% of cases (Smith et al, 2023)"
Day 4-5: Writing
You: Write the executive summary using our research and key stats
SAM: [Reads literature-review.md and key-stats.md]
Draft saved to drafts/executive-summary.md
~800 words, covers all major themes
Day 6: Fact-Checking
You: Check every statistic in the executive summary against our sources
SAM: [Reads drafts/executive-summary.md and sources/literature-review.md]
All 6 statistics verified. One citation needed a correction - fixed in draft.
Result: A well-sourced, fact-checked report built across four specialized conversations - each one staying focused, all sharing the same files and memory.
Troubleshooting Advanced Workflows
Workflows Not Finishing: - Raise the iteration budget in Preferences -> General -> Workflow Settings - Break large tasks into smaller, focused steps - Check for circular dependencies in the workflow
Memory Conflicts: - Use clear, distinct tags for different project aspects - Assign higher importance to critical information - Review and remove duplicate memories regularly
Context Overflow: - Reduce the effective context window, or start a fresh conversation from a summary - Clear less important messages from the conversation - Summarize old context and store summaries in memory
Performance Issues: - Use appropriate models for each task type - Optimize context size settings - Remove old files from the workspace
Next Steps
- Tools Reference - Master SAM's complete toolset
- Configuration - Optimize settings
- Troubleshooting - Fix common issues
Related: - Memory & RAG - Memory mastery - Shared Topics - Collaboration basics
Level up your SAM workflows and build complex projects efficiently!