You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2026. It is now read-only.
-**Multi-Provider Failover**: Seamlessly switch between Gemini, Groq, Cerebras, and OpenAI-compatible APIs. If one model hits a quota, Plexir automatically fails over to the next in your priority list.
15
-
-**Economics & Metrics**: Real-time **Token Tracking** and **Cost Estimation** in the sidebar. Set a session budget via `/config budget` to prevent runaway costs.
16
-
-**Advanced Reasoning Support**: Automatically filters model "thinking" blocks into collapsible widgets and provides a **Live Status Spinner** during reasoning.
15
+
-**Accuracy & Economics**:
16
+
-**Native Token Counting**: Integrated Gemini native token counting API for 100% accurate measurement.
17
+
-**Proactive Context Management**: Automatic pruning/summarization when context reaches 90% capacity to prevent truncation errors.
18
+
-**Cost Estimation**: Real-time tracking in the sidebar. Set a session budget via `/config budget`.
19
+
-**Deep Reasoning Support**: Native support for `reasoning_content` (DeepSeek/OpenRouter) with configurable transparency (toggle blocks with `/config reasoning`).
20
+
-**Responsive Interaction**:
21
+
-**Message Queuing**: Submit messages while the AI is busy; they appear in a "queued" state and process sequentially.
22
+
-**Interactive Queue Management**: Click a queued message to "unroll" the queue and pull messages back to the input for editing.
17
23
-**Coherent Memory**:
18
24
-**Persistent Memory Bank**: Semantic storage (`chromadb`) for long-term facts using `/memory save`.
25
+
-**Session-Scoped Scratchpad**: Isolated planning space (`scratchpad` tool) that persists within a session but doesn't pollute global history.
19
26
-**Rolling Summarization**: Automatically condenses long histories.
20
27
-**Message Pinning**: `/session pin` ensures critical context is never lost.
21
-
-**Context Window Management**: Intelligent token counting and history pruning ensures conversations never exceed model limits, preventing failover loops.
22
28
-**Persistent Docker Sandbox**: Launch with `--sandbox` to give the AI its own persistent Linux "computer." All tools (file system, git, shell) are automatically redirected inside the container.
23
-
-**Deep MCP Integration**: Fully supports **Model Context Protocol (MCP)**, including dynamic discovery of tools, **Resources**, **Resource Templates**, and **Prompts** from MCP servers.
29
+
-**Deep MCP Integration**: Fully supports **Model Context Protocol (MCP)**, including dynamic discovery of tools, **Resources**, and **Prompts**.
24
30
-**Smart Agent Capabilities**:
25
31
-**Delegation**: `delegate_to_agent` allows spawning specialized sub-agents for complex tasks.
26
-
-**RAG & Context**: `codebase_search` allows natural language queries across your codebase. `get_definitions` quickly maps file structures.
27
-
-**Planning**: Built-in `scratchpad` memory for long-term planning and note-taking.
28
-
-**Visual Safety**: Critical actions like writing files show a **Rich Visual Diff** (Red/Green) in the confirmation modal before execution.
32
+
-**RAG & Context**: `codebase_search` allows natural language queries across your codebase.
33
+
-**Visual Safety**: Critical actions like writing files show a **Rich Visual Diff** (Red/Green) in the confirmation modal.
Copy file name to clipboardExpand all lines: docs/configuration.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,22 +30,21 @@ Instead of plain text, you can use:
30
30
31
31
Plexir automatically manages the context window to prevent model errors when conversations get too long.
32
32
33
-
### Automatic Limits
34
-
Plexir comes with pre-configured token limits for popular models (e.g., 2M tokens for Gemini 1.5 Pro, 128k for GPT-4o). When the conversation history exceeds this limit, Plexir will:
35
-
1.**Preserve** the most recent messages.
36
-
2.**Preserve** system instructions.
37
-
3.**Summarize/Distill** the older parts of the conversation to save space while retaining context.
33
+
### Native Token Counting (Gemini)
34
+
For Gemini providers, Plexir uses the **native `countTokens` API** to ensure 100% accurate token measurement. For other providers, it uses a word-based heuristic (1.3 tokens per word) to estimate usage.
35
+
36
+
### Proactive Pruning
37
+
When the current conversation history reaches **90% of the provider's context limit**, Plexir will proactively:
38
+
1.**Summarize/Distill** older messages (using the active LLM) to save space while retaining critical facts.
39
+
2.**Notify** the user with a system message in the chat.
40
+
3.**Accumulate** the summary at the top of the history to ensure continuity.
38
41
39
42
### Manual Configuration (`context_limit`)
40
-
You can override the default limit for any provider. This is useful for:
41
-
-Testing how models behave with shorter context.
42
-
-Forcing stricter limits on "Preview" models to save costs.
43
+
You can override the default limit for any provider. This is useful for testing shorter windows or managing costs on preview models.
44
+
-**Example**: `/config set "Gemini Primary" context_limit 50000`
45
+
-**Example**: `/config set "Groq Backup" context_limit 8000`
43
46
44
-
To set a strict 50,000 token limit on a provider:
45
-
```bash
46
-
/config set"Gemini Primary" context_limit 50000
47
-
```
48
-
*Set to `0` or `null` to use the model's default.*
47
+
*Setting to `0` or `null` will use the model's default limit.*
Copy file name to clipboardExpand all lines: docs/memory.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,18 @@ You can prompt the agent to remember things directly:
20
20
Or ask it to recall:
21
21
> "Where did I say my keys were?"
22
22
23
-
## Rolling Summarization
23
+
## Session-Scoped Scratchpad (New in v1.9)
24
24
25
-
When a conversation history becomes too large (exceeding 40 messages), Plexir automatically triggers **Rolling Summarization**.
25
+
For tasks that require multi-step planning and temporary note-taking, Plexir provides a `scratchpad` tool.
26
+
27
+
Unlike the global Memory Bank, the scratchpad is **session-scoped**. This means:
28
+
-**Isolation**: Each session (started with a new run or loaded via `/session load`) has its own unique scratchpad file.
29
+
-**Plan Continuity**: Plans made in the scratchpad are saved alongside your session. If you load a session tomorrow, the agent will see exactly where it left off in its plan.
30
+
-**No Global Noise**: Content in one session's scratchpad won't confuse the agent in a different project or session.
31
+
32
+
The agent uses the `scratchpad` tool automatically for complex tasks, but you can also view it manually in `~/.plexir/sessions/<session_id>_scratchpad.md`.
33
+
34
+
## Rolling Summarization & Proactive Pruning
26
35
27
36
1.**How it works**: Plexir identifies older, unpinned messages and uses the primary LLM to condense them into a concise "BACKGROUND SUMMARY."
28
37
2.**Context Preservation**: This summary is injected at the start of the conversation, allowing the model to remember high-level decisions and context while clearing out detailed token-heavy noise.
0 commit comments