> ## Documentation Index
> Fetch the complete documentation index at: https://noorle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Memory and Context

> Configure agent conversation memory. Working memory, summarization, and context management.

Agents have a 3-tier memory system: working memory (current), summaries (history), and archives (long-term).

## Memory Tiers

### Working Memory

Current conversation buffer. Keeps recent messages in context.

* **Default:** 8,000 tokens
* **Contains:** Last N messages
* **Cost:** Included in each request

### Summary Memory

When working memory fills, creates summary of key points.

* **Default:** 5 messages
* **Triggered when:** 5+ messages in working
* **Contains:** Condensed history

### Archive

Older summaries stored separately.

* **Default:** Keep all
* **Accessed when:** Needed for context
* **Cost:** Additional retrieval tokens

## Configuration

### Adjust Working Memory

**Smaller** (4,000 tokens):

* Pros: Lower cost, faster responses
* Cons: Forgets details quickly

**Larger** (16,000 tokens):

* Pros: Better context, fewer summaries
* Cons: Higher cost, slower

**Default (8,000 tokens):**

* Good balance for most uses

**Change:**

1. **Agents** > Select agent
2. **Settings** > **Memory**
3. Set working\_memory\_size
4. Click **Save**

### Summary Threshold

When working memory reaches N messages, create summary.

* **Lower (3):** Summarize more often (cheaper)
* **Higher (10):** Summarize less often (better context)
* **Default (5):** Good balance

**Change:**

1. **Settings** > **Memory**
2. Set summary\_message\_threshold
3. Click **Save**

## Memory Management

### View Memory Usage

1. **Agents** > Select agent
2. **Analytics** tab
3. See memory tokens used

### Clear Memory

1. Open conversation
2. Click **Clear History**
3. Confirm

Conversation history deleted. Cost savings.

### Export Memory

1. Open conversation
2. Click **Export**
3. Download as JSON/PDF

## Best Practices

### Balance Cost and Quality

| Use Case   | Working Memory | Summary |
| ---------- | -------------- | ------- |
| Quick Q\&A | 4,000          | 10      |
| Research   | 12,000         | 5       |
| Support    | 8,000          | 5       |
| Code       | 16,000         | 3       |

### Monitor Memory Growth

Check usage dashboard:

* How much memory used per conversation?
* Trending up or stable?
* Adjust if needed

### Archive Old Conversations

Periodically clear old conversations to reduce costs.

## Memory Limitations

* Working memory is conversation-scoped (not shared between agents)
* Summaries are automatic (can't manually create)
* Archives are read-only (can't modify)
* Memory persists even after agent updates

## Troubleshooting

### Agent forgets context

* Increase working\_memory\_size
* Increase summary\_threshold
* Ask user to provide context again

### Memory costs too high

* Reduce working\_memory\_size
* Lower summary\_threshold (summarize more)
* Clear old conversations

### Incorrect summaries

* Summaries are LLM-generated (won't be perfect)
* Verify important details in conversation
* Consider manually archiving if critical

## Next Steps

* [Creating Agents](/docs/run/agents/creating-an-agent)
* [Model Routing](/docs/run/agents/model-routing)
* [Usage & Limits](/docs/run/platform/usage-and-limits)
