feat: SubAgent Swarm Topology
Browse files- README.md +26 -7
- src/tools/AgentTool/builtInAgents.ts +16 -4
README.md
CHANGED
|
@@ -75,13 +75,15 @@ cp VersperClaw ~/.local/bin
|
|
| 75 |
# set 200k env in ~/.claude/settings.json or terminal
|
| 76 |
# the 20k is used to compact as buffer band
|
| 77 |
# set tool_search env
|
|
|
|
| 78 |
{
|
| 79 |
"env": {
|
| 80 |
"USER_TYPE": "ant",
|
| 81 |
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "200000",
|
| 82 |
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000",
|
| 83 |
"ENABLE_TOOL_SEARCH": "true",
|
| 84 |
-
|
|
|
|
| 85 |
}
|
| 86 |
|
| 87 |
# set auto-dream config
|
|
@@ -137,16 +139,26 @@ cd desktop && bun run tauri dev
|
|
| 137 |
|
| 138 |
## β¨ Features
|
| 139 |
|
| 140 |
-
###
|
|
|
|
| 141 |
|
| 142 |
-
<table align="center">
|
| 143 |
-
<tr>
|
| 144 |
-
<td><img src="assets/ai_friend.png"></td>
|
| 145 |
-
</tr>
|
| 146 |
-
</table>
|
| 147 |
|
| 148 |
### Auto Compact & Dream & SubAgent
|
| 149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
<table align="center">
|
| 151 |
<tr>
|
| 152 |
<td><img src="assets/ctx_auto_compose/compact_dream_subagent.png"></td>
|
|
@@ -163,3 +175,10 @@ cd desktop && bun run tauri dev
|
|
| 163 |
</tr>
|
| 164 |
</table>
|
| 165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
# set 200k env in ~/.claude/settings.json or terminal
|
| 76 |
# the 20k is used to compact as buffer band
|
| 77 |
# set tool_search env
|
| 78 |
+
# set agentteam in tmux
|
| 79 |
{
|
| 80 |
"env": {
|
| 81 |
"USER_TYPE": "ant",
|
| 82 |
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "200000",
|
| 83 |
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000",
|
| 84 |
"ENABLE_TOOL_SEARCH": "true",
|
| 85 |
+
"TAVILY_API_KEY": "",
|
| 86 |
+
"teammateMode": "tmux"
|
| 87 |
}
|
| 88 |
|
| 89 |
# set auto-dream config
|
|
|
|
| 139 |
|
| 140 |
## β¨ Features
|
| 141 |
|
| 142 |
+
### Agent Team and View via Tmux
|
| 143 |
+
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
### Auto Compact & Dream & SubAgent
|
| 147 |
|
| 148 |
+
#### π§ Core Mechanisms of Cycle Long Run
|
| 149 |
+
|
| 150 |
+
* **Auto Compact** β Automatically optimizes and compresses historical context to bypass sequence length bottlenecks.
|
| 151 |
+
* **Dream** β Consolidates raw operational data into structured, long-term parametric insights asynchronously.
|
| 152 |
+
|
| 153 |
+
#### ποΈ SubAgent Swarm Topology
|
| 154 |
+
|
| 155 |
+
| SubAgent Type | Core Responsibility | Operational Gate |
|
| 156 |
+
| :--- | :--- | :--- |
|
| 157 |
+
| π‘οΈ **General-Purpose** | Orchestrates routing, high-level user interaction, and dispatching. | Active |
|
| 158 |
+
| π **Explore** | Conducts deep semantic search and autonomous tool discovery. | Active |
|
| 159 |
+
| π **Plan** | Handles multi-step chain-of-thought strategy and task decomposition. | Active |
|
| 160 |
+
| π§ͺ **Verification** | Executes automated runtime validation, assertion checks, and fault tolerance. | Active |
|
| 161 |
+
|
| 162 |
<table align="center">
|
| 163 |
<tr>
|
| 164 |
<td><img src="assets/ctx_auto_compose/compact_dream_subagent.png"></td>
|
|
|
|
| 175 |
</tr>
|
| 176 |
</table>
|
| 177 |
|
| 178 |
+
### AI Friend via Omni model
|
| 179 |
+
|
| 180 |
+
<table align="center">
|
| 181 |
+
<tr>
|
| 182 |
+
<td><img src="assets/ai_friend.png"></td>
|
| 183 |
+
</tr>
|
| 184 |
+
</table>
|
src/tools/AgentTool/builtInAgents.ts
CHANGED
|
@@ -11,6 +11,10 @@ import { VERIFICATION_AGENT } from './built-in/verificationAgent.js'
|
|
| 11 |
import type { AgentDefinition } from './loadAgentsDir.js'
|
| 12 |
|
| 13 |
export function areExplorePlanAgentsEnabled(): boolean {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
if (feature('BUILTIN_EXPLORE_PLAN_AGENTS')) {
|
| 15 |
// 3P default: true β Bedrock/Vertex keep agents enabled (matches pre-experiment
|
| 16 |
// external behavior). A/B test treatment sets false to measure impact of removal.
|
|
@@ -19,6 +23,17 @@ export function areExplorePlanAgentsEnabled(): boolean {
|
|
| 19 |
return false
|
| 20 |
}
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
export function getBuiltInAgents(): AgentDefinition[] {
|
| 23 |
// Allow disabling all built-in agents via env var (useful for SDK users who want a blank slate)
|
| 24 |
// Only applies in noninteractive mode (SDK/API usage)
|
|
@@ -61,10 +76,7 @@ export function getBuiltInAgents(): AgentDefinition[] {
|
|
| 61 |
agents.push(VERSPER_CLAW_GUIDE_AGENT)
|
| 62 |
}
|
| 63 |
|
| 64 |
-
if (
|
| 65 |
-
feature('VERIFICATION_AGENT') &&
|
| 66 |
-
getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false)
|
| 67 |
-
) {
|
| 68 |
agents.push(VERIFICATION_AGENT)
|
| 69 |
}
|
| 70 |
|
|
|
|
| 11 |
import type { AgentDefinition } from './loadAgentsDir.js'
|
| 12 |
|
| 13 |
export function areExplorePlanAgentsEnabled(): boolean {
|
| 14 |
+
if (process.env.USER_TYPE !== 'ant') {
|
| 15 |
+
return true
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
if (feature('BUILTIN_EXPLORE_PLAN_AGENTS')) {
|
| 19 |
// 3P default: true β Bedrock/Vertex keep agents enabled (matches pre-experiment
|
| 20 |
// external behavior). A/B test treatment sets false to measure impact of removal.
|
|
|
|
| 23 |
return false
|
| 24 |
}
|
| 25 |
|
| 26 |
+
function isVerificationAgentEnabled(): boolean {
|
| 27 |
+
if (process.env.USER_TYPE !== 'ant') {
|
| 28 |
+
return true
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
if (feature('VERIFICATION_AGENT')) {
|
| 32 |
+
return getFeatureValue_CACHED_MAY_BE_STALE('tengu_hive_evidence', false)
|
| 33 |
+
}
|
| 34 |
+
return false
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
export function getBuiltInAgents(): AgentDefinition[] {
|
| 38 |
// Allow disabling all built-in agents via env var (useful for SDK users who want a blank slate)
|
| 39 |
// Only applies in noninteractive mode (SDK/API usage)
|
|
|
|
| 76 |
agents.push(VERSPER_CLAW_GUIDE_AGENT)
|
| 77 |
}
|
| 78 |
|
| 79 |
+
if (isVerificationAgentEnabled()) {
|
|
|
|
|
|
|
|
|
|
| 80 |
agents.push(VERIFICATION_AGENT)
|
| 81 |
}
|
| 82 |
|