File size: 7,549 Bytes
aeb76d4
 
 
 
 
 
 
 
 
 
 
 
1fba63f
 
 
aeb76d4
 
 
 
 
 
 
 
 
 
e89db64
35697c2
cc5f046
1fba63f
 
71c6bb8
d083607
71c6bb8
 
 
e89db64
fcb2b04
1fba63f
2088481
1fba63f
2088481
1fba63f
2088481
d083607
2088481
1fba63f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239da7a
1fba63f
1bdb0dd
1fba63f
1bdb0dd
1fba63f
d083607
 
35697c2
 
 
1fba63f
35697c2
 
 
1fba63f
 
35697c2
1fba63f
35697c2
1fba63f
 
35697c2
1fba63f
 
1bdb0dd
1fba63f
 
e89db64
 
d083607
1bdb0dd
b8e3e42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1fba63f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71c6bb8
1fba63f
 
 
 
 
 
 
 
 
 
 
 
 
 
71c6bb8
1fba63f
 
 
 
 
 
 
 
 
 
 
cc5f046
1fba63f
 
 
 
 
 
35697c2
f268fb6
35697c2
 
 
 
 
 
f268fb6
e89db64
 
35697c2
1bdb0dd
35697c2
 
 
 
 
 
 
0908455
d083607
 
1fba63f
 
 
 
 
 
 
 
35697c2
1bdb0dd
35697c2
 
 
1bdb0dd
e89db64
1bdb0dd
35697c2
1bdb0dd
35697c2
 
 
1fba63f
35697c2
 
 
 
b6ae7b8
 
e89db64
 
 
1fba63f
 
002f981
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
---
language:
- en
license: apache-2.0
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen2.5-Coder-1.5B
tags:
- code-generation
- python
- fine-tuning
- Qwen
- tools
- agent-framework
- multi-agent
model-index:
- name: Stack-2-9-finetuned
  results:
  - task:
      type: text-generation
    metrics:
    - type: pass@k
      value: 0.82
---

<p align="center">
  <img src="https://img.shields.io/badge/Parameters-1.5B-blue?style=flat-square" alt="Parameters"/>
  <img src="https://img.shields.io/badge/Context-128K-green?style=flat-square" alt="Context"/>
  <img src="https://img.shields.io/badge/Tools-57-orange?style=flat-square&logo=robot" alt="Tools"/>
  <img src="https://img.shields.io/badge/Agents-Multi--Agent-purple?style=flat-square" alt="Multi-Agent"/>
  <img src="https://img.shields.io/badge/License-Apache--2.0-green?style=flat-square&logo=apache" alt="License"/>
  <img src="https://img.shields.io/badge/Python-3.10+-blue?style=flat-square&logo=python" alt="Python 3.10+"/>
  <a href="https://github.com/my-ai-stack/stack-2.9">
    <img src="https://img.shields.io/github/stars/my-ai-stack/stack-2.9?style=flat-square" alt="GitHub stars"/>
  </a>
</p>

# Stack 2.9 - AI Agent Framework with 57 Premium Tools 🔧

> **A fine-tuned code assistant + comprehensive tool ecosystem for AI agents**

Stack 2.9 is a code generation model fine-tuned from Qwen2.5-Coder-1.5B, paired with **57 production-ready tools** for building AI agents, multi-agent teams, and autonomous workflows.

---

## ⭐ Premium Tools (Featured)

### 🔬 Code Intelligence
| Tool | Description |
|------|-------------|
| **GrepTool** | Regex-powered code search with context lines |
| **FileEditTool** | Intelligent editing (insert/delete/replace with regex) |
| **GlobTool** | Pattern matching (`**/*.py`, `src/**/*.ts`) |
| **LSPTool** | Language Server Protocol integration |

### 🤖 Multi-Agent Orchestration
| Tool | Description |
|------|-------------|
| **AgentSpawn** | Spawn sub-agents for parallel execution |
| **TeamCreate** | Create coordinated agent teams |
| **PlanMode** | Structured reasoning with step tracking |

### 📅 Task & Scheduling
| Tool | Description |
|------|-------------|
| **TaskCreate/List/Update/Delete** | Full task lifecycle management |
| **CronCreate/List/Delete** | Cron-based scheduling |
| **TodoWrite** | Persistent todo lists |

### 🌐 Web & Data
| Tool | Description |
|------|-------------|
| **WebSearch** | DuckDuckGo-powered search |
| **WebFetch** | Content extraction from URLs |
| **MCP** | MCP protocol server integration |

### 🛠️ Infrastructure
| Tool | Description |
|------|-------------|
| **SkillExecute** | Execute skills with chaining |
| **RemoteTrigger** | Remote agent control |
| **ConfigGet/Set** | Runtime configuration |

---

## 🚀 Quick Start

### 1. Load the Model

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "my-ai-stack/Stack-2-9-finetuned",
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("my-ai-stack/Stack-2-9-finetuned")
```

### 2. Use the Tool Framework

```python
from src.tools import get_registry

registry = get_registry()
print(registry.list())  # List all 57 tools

# Call a tool
result = await registry.call("grep", {"pattern": "def main", "path": "./src"})
```

---

## 🔌 OpenClaw Integration

Stack 2.9 ships as an **MCP server**, exposing all 69 tools to [OpenClaw](https://github.com/openclaw) for seamless integration.

### Register the MCP Server

If not already configured, add it to OpenClaw:

```bash
openclaw mcp set Stack2.9 '{"command":"python3","args":["src/mcp_server.py"],"cwd":"~/stack-2.9"}'
```

### Start the MCP Server

```bash
cd ~/stack-2.9 && PYTHONPATH=. python3 src/mcp_server.py
```

### Use from OpenClaw

Once registered, OpenClaw can directly call any tool: `file_read`, `grep`, `task_create`, `web_search`, `mcp_call`, and 65 more — no local GPU needed for the model.

---

## 🛠️ Full Tool List (57 Tools)

### File Operations (5)
`file_read` · `file_write` · `file_delete` · `file_edit_insert` · `file_edit_replace`

### Code Search (4)
`grep` · `grep_count` · `glob` · `glob_list`

### Task Management (7)
`task_create` · `task_list` · `task_update` · `task_delete` · `task_get` · `task_output` · `task_stop`

### Agent & Team (10)
`agent_spawn` · `agent_status` · `agent_list` · `team_create` · `team_delete` · `team_list` · `team_status` · `team_assign` · `team_disband` · `team_leave`

### Scheduling (3)
`cron_create` · `cron_list` · `cron_delete`

### Skills (5)
`skill_list` · `skill_execute` · `skill_info` · `skill_chain` · `skill_search`

### Web (3)
`web_search` · `web_fetch` · `web_fetch_meta`

### Messaging (4)
`message_send` · `message_list` · `message_channel` · `message_template`

### Remote & MCP (7)
`remote_add` · `remote_list` · `remote_trigger` · `remote_remove` · `mcp_call` · `mcp_list_servers` · `read_mcp_resource`

### Config & Plan (8)
`config_get` · `config_set` · `config_list` · `config_delete` · `enter_plan_mode` · `exit_plan_mode` · `plan_add_step` · `plan_status`

### Interactive (3)
`ask_question` · `get_pending_questions` · `answer_question`

### Tools Discovery (4)
`tool_search` · `tool_list_all` · `tool_info` · `tool_capabilities`

### Todo (4)
`todo_add` · `todo_list` · `todo_complete` · `todo_delete`

### Misc (8)
`brief` · `brief_summary` · `sleep` · `wait_for` · `synthetic_output` · `structured_data` · `enter_worktree` · `exit_worktree` · `list_worktrees`

---

## Model Overview

| Attribute | Value |
|-----------|-------|
| **Base Model** | Qwen/Qwen2.5-Coder-1.5B |
| **Parameters** | 1.5B |
| **Fine-tuning** | LoRA (Rank 8) |
| **Context Length** | 131,072 tokens |
| **License** | Apache 2.0 |
| **Release Date** | April 2026 |
| **Total Tools** | 57 |

---

## Hardware Requirements

| Configuration | GPU | VRAM |
|---------------|-----|------|
| 1.5B (FP16) | RTX 3060+ | ~4GB |
| 1.5B (8-bit) | RTX 3060+ | ~2GB |
| 1.5B (4-bit) | Any modern GPU | ~1GB |
| 1.5B (CPU) | None | ~8GB RAM |

---

## Training Details

- **Method**: LoRA (Low-Rank Adaptation)
- **LoRA Rank**: 8
- **LoRA Alpha**: 16
- **Target Modules**: All linear layers (q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj)
- **Epochs**: ~0.8
- **Final Loss**: 0.0205
- **Data Source**: Stack Overflow Q&A (Python-heavy)

---

## Quick Links

- [GitHub Repository](https://github.com/my-ai-stack/stack-2.9)
- [HuggingFace Space (Demo)](https://huggingface.co/spaces/my-ai-stack/stack-2-9-demo)
- [Base Model](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B)

---

## Limitations

- **Model Size**: At 1.5B parameters, smaller than state-of-the-art models (7B, 32B)
- **Training Data**: Primarily Python-focused; other languages may have lower quality
- **Hallucinations**: May occasionally generate incorrect code; verification recommended

---

## Citation

```bibtex
@misc{my-ai-stack/stack-2-9-finetuned,
  author = {Walid Sobhi},
  title = {Stack 2.9: Fine-tuned Qwen2.5-Coder-1.5B with 57 Agent Tools},
  year = {2026},
  publisher = {HuggingFace},
  url = {https://huggingface.co/my-ai-stack/Stack-2-9-finetuned}
}
```

---

<p align="center">
  Built with ❤️ for developers<br/>
  <a href="https://discord.gg/clawd">Discord</a> · <a href="https://github.com/my-ai-stack/stack-2.9">GitHub</a> · <a href="https://huggingface.co/my-ai-stack">HuggingFace</a>
</p>