# Session Start Pattern SUMMARY: The canonical session-start sequence every LLM agent should follow. KEY CONTEXT: ALWAYS at session start: 1) GET /memory/recall, 2) GET /chat/poll, 3) GET /mind/tasks?status=in_progress Build system prompt from recall output. Process unread chat messages before doing new work. Resume any in_progress tasks before starting new ones. Store new learnings as they happen — don't wait until session end. Session Start Pattern Every LLM agent session should follow this canonical startup sequence. Skipping steps leads to lost context, missed messages, and forgotten tasks. The Pattern [CODE BLOCK] Implementation Step 1: Recall All Memories > [!CRITICAL] > This is the most important call. Without it, you have no memory of past > sessions. [CODE BLOCK] Returns plain-text summary of all memories, sorted by priority. Step 2: Poll for Unread Chat Messages [CODE BLOCK] Returns unread messages from the human. Automatically marks them as read. Step 3: Check In-Progress Tasks [CODE BLOCK] Returns tasks you were working on last session. Step 4: Build Context Combine the three responses into your system prompt: [CODE BLOCK] Step 5: Process Pending Items [CODE BLOCK] Complete Example [CODE BLOCK] Common Mistakes > [!WARNING] > - Skipping recall — you start with no context, repeat past mistakes > - Forgetting to poll chat — human's messages go unanswered > - Ignoring active tasks — work is forgotten mid-execution > - Storing nothing — session produces no persistent value Variations Minimal pattern (low-context LLMs) For LLMs with small context windows, skip the full recall: [CODE BLOCK] Then search for specific topics as needed: [CODE BLOCK] Aggressive pattern (long-running agents) For agents that run for hours, add periodic re-recall: [CODE BLOCK] Next Steps - Memory Tagging Strategy - Task-Driven Workflow - Chat Polling Pattern