chore: complete ctx_line and auto compact doc
Browse files- README.md +31 -27
- assets/ctx_auto_compose/ctx_line.png +3 -0
README.md
CHANGED
|
@@ -18,7 +18,29 @@ cp VersperClaw ~/.local/bin
|
|
| 18 |
# then can use VersperClaw in everywhere
|
| 19 |
```
|
| 20 |
|
| 21 |
-
## 2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
<table align="center">
|
| 24 |
<tr>
|
|
@@ -30,6 +52,8 @@ cp VersperClaw ~/.local/bin
|
|
| 30 |
|
| 31 |
### Choice One - SearXNG:
|
| 32 |
|
|
|
|
|
|
|
| 33 |
#### 1. Docker Configuration
|
| 34 |
|
| 35 |
```bash
|
|
@@ -72,7 +96,6 @@ firefox http://localhost:8080
|
|
| 72 |
"ENABLE_TOOL_SEARCH": "true"
|
| 73 |
}
|
| 74 |
}
|
| 75 |
-
|
| 76 |
# or allow tool search in ~/.bashrc
|
| 77 |
export ENABLE_TOOL_SEARCH=true
|
| 78 |
```
|
|
@@ -81,9 +104,9 @@ export ENABLE_TOOL_SEARCH=true
|
|
| 81 |
|
| 82 |
> when TAVILY_API_KEY is set in env
|
| 83 |
|
| 84 |
-
##
|
| 85 |
|
| 86 |
-
###
|
| 87 |
|
| 88 |
<table align="center">
|
| 89 |
<tr>
|
|
@@ -93,7 +116,7 @@ export ENABLE_TOOL_SEARCH=true
|
|
| 93 |
</tr>
|
| 94 |
</table>
|
| 95 |
|
| 96 |
-
###
|
| 97 |
|
| 98 |
<table align="center">
|
| 99 |
<tr>
|
|
@@ -103,7 +126,7 @@ export ENABLE_TOOL_SEARCH=true
|
|
| 103 |
</tr>
|
| 104 |
</table>
|
| 105 |
|
| 106 |
-
##
|
| 107 |
|
| 108 |
<div align="center">
|
| 109 |
<img src="assets/auto_dream.png" alt="VersperAI">
|
|
@@ -123,36 +146,17 @@ nvim ~/.claude/settings.json
|
|
| 123 |
# cd ~/.claude/projects
|
| 124 |
```
|
| 125 |
|
| 126 |
-
##
|
| 127 |
|
| 128 |
```bash
|
| 129 |
# On startup, the CLI runs silently in the background, maintains a persistent Telegram connection, and listens for messages.
|
| 130 |
# start VersperClaw Cli
|
| 131 |
-
./
|
| 132 |
|
| 133 |
# enter it into the cli input field and interactive configuration parameters
|
| 134 |
/telegram
|
| 135 |
```
|
| 136 |
|
| 137 |
-
## 6. Auto Compact
|
| 138 |
-
|
| 139 |
-
```bash
|
| 140 |
-
# set env in ~/.claude/settings.json
|
| 141 |
-
{
|
| 142 |
-
"env": {
|
| 143 |
-
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "57344",
|
| 144 |
-
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "61440"
|
| 145 |
-
}
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
# or via bash set env
|
| 149 |
-
echo 'export CLAUDE_CODE_AUTO_COMPACT_WINDOW=57344' >> ~/.bashrc
|
| 150 |
-
echo 'export CLAUDE_CODE_MAX_CONTEXT_TOKENS=61440' >> ~/.bashrc
|
| 151 |
-
|
| 152 |
-
# effective = 108K - effectiveContextWindow - used for auto-compact summary
|
| 153 |
-
# threshold = 95K - autoCompactThreshold - buffer to avoid failed
|
| 154 |
-
```
|
| 155 |
-
|
| 156 |
# Legacy Python Version
|
| 157 |
|
| 158 |
> Demos dev/python
|
|
|
|
| 18 |
# then can use VersperClaw in everywhere
|
| 19 |
```
|
| 20 |
|
| 21 |
+
## 2. LLM Based - Auto Compact
|
| 22 |
+
|
| 23 |
+
<table align="center">
|
| 24 |
+
<tr>
|
| 25 |
+
<td><img src="assets/ctx_auto_compose/ctx_line.png"></td>
|
| 26 |
+
</tr>
|
| 27 |
+
</table>
|
| 28 |
+
|
| 29 |
+
> Maximum_Context_Window = min(CLAUDE_CODE_MAX_CONTEXT_TOKENS, CLAUDE_CODE_AUTO_COMPACT_WINDOW) - 20000
|
| 30 |
+
|
| 31 |
+
```bash
|
| 32 |
+
# set 200k env in ~/.claude/settings.json or terminal
|
| 33 |
+
# the 20k is used to compact as buffer band
|
| 34 |
+
{
|
| 35 |
+
"env": {
|
| 36 |
+
"USER_TYPE": "ant",
|
| 37 |
+
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "200000",
|
| 38 |
+
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000"
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## 3. WebSearch & WebFetch Tools
|
| 44 |
|
| 45 |
<table align="center">
|
| 46 |
<tr>
|
|
|
|
| 52 |
|
| 53 |
### Choice One - SearXNG:
|
| 54 |
|
| 55 |
+
> 100% local free no remote api fee
|
| 56 |
+
|
| 57 |
#### 1. Docker Configuration
|
| 58 |
|
| 59 |
```bash
|
|
|
|
| 96 |
"ENABLE_TOOL_SEARCH": "true"
|
| 97 |
}
|
| 98 |
}
|
|
|
|
| 99 |
# or allow tool search in ~/.bashrc
|
| 100 |
export ENABLE_TOOL_SEARCH=true
|
| 101 |
```
|
|
|
|
| 104 |
|
| 105 |
> when TAVILY_API_KEY is set in env
|
| 106 |
|
| 107 |
+
## 4. SubAgent - back run & tool call agent and swap file output
|
| 108 |
|
| 109 |
+
### 4.1 Auto Creat SubAgent
|
| 110 |
|
| 111 |
<table align="center">
|
| 112 |
<tr>
|
|
|
|
| 116 |
</tr>
|
| 117 |
</table>
|
| 118 |
|
| 119 |
+
### 4.2 Tool Agent Call Chains and Swap File Context
|
| 120 |
|
| 121 |
<table align="center">
|
| 122 |
<tr>
|
|
|
|
| 126 |
</tr>
|
| 127 |
</table>
|
| 128 |
|
| 129 |
+
## 5. Auto Dream
|
| 130 |
|
| 131 |
<div align="center">
|
| 132 |
<img src="assets/auto_dream.png" alt="VersperAI">
|
|
|
|
| 146 |
# cd ~/.claude/projects
|
| 147 |
```
|
| 148 |
|
| 149 |
+
## 6. Telegram - Interactive Config
|
| 150 |
|
| 151 |
```bash
|
| 152 |
# On startup, the CLI runs silently in the background, maintains a persistent Telegram connection, and listens for messages.
|
| 153 |
# start VersperClaw Cli
|
| 154 |
+
./VersperClaw
|
| 155 |
|
| 156 |
# enter it into the cli input field and interactive configuration parameters
|
| 157 |
/telegram
|
| 158 |
```
|
| 159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
# Legacy Python Version
|
| 161 |
|
| 162 |
> Demos dev/python
|
assets/ctx_auto_compose/ctx_line.png
ADDED
|
Git LFS Details
|