DEV Community

Cover image for Collaborative_agents_V2
Mijin-VT
Mijin-VT

Posted on

Collaborative_agents_V2

๐Ÿค– Collaborative Agents v2.1
https://github.com/Mijin-VT/Collaborative_agents_V2
Python 3.10+ License: MIT Platform LM Studio

Local AI system that enables 3 models to work together as a collaborative team.

What is this?

A system that enables 3 AI models installed on your computer to work together as a team. Each AI has a specialized role and can read files, write code, execute commands, and collaborate to solve complex tasks.

โœ… 100% local โ€” Nothing is sent to the internet
โœ… No accounts or subscriptions โ€” Everything runs on your machine
โœ… Secure โ€” Agents work in an isolated folder with action confirmation
โœ… Configurable โ€” Change models, URLs, and limits without touching code

Complete system features

๐Ÿค Agent collaboration

Feature Description
Automatic planning Coordinator decomposes tasks and assigns subtasks to agents
Sequential execution Agents work 1 at a time, reading previous results
Error recovery If an agent fails, another automatically takes its place
Accumulated context Each agent receives the full history of previous work
Final integration Coordinator unifies all results into a coherent response

๐Ÿ“‚ File management

Feature Description
Read files Agents read workspace files with path validation
Create files Generate new files with confirmation and preview
Modify files Overwrites with automatic backup before each change
List workspace Explore project file and folder structure
Content cleaning Extracts code from markdown blocks and removes unwanted markers

โšก Command execution

Feature Description
Run commands Executes system commands with 2-minute timeout
Risk analysis Classifies each command: low ๐ŸŸข, medium ๐ŸŸก, high ๐Ÿ”ด
Mandatory confirmation User must approve each command before execution
Command editing Allows correcting the command before approval
Pipe detection Recursively analyzes each part of a piped command

๐Ÿ›ก๏ธ Integrated security

Feature Description
Isolated workspace Agents only access ~/agents_workspace/
Blocked paths Blocks C:\Windows, /usr/bin, /etc, etc.
Banned commands Blocks format, rm -rf /, shutdown, sudo, etc.
Automatic backups Backup copy before modifying any file
Session logs Every action recorded with timestamp
Cleanup on exit Deletes logs and backups when closing the app

๐ŸŽ›๏ธ External configuration

Parameter What it controls
lm_studio_url LM Studio server URL
workspace Agent working folder
max_tokens Maximum tokens per response
max_context_tokens Maximum context tokens
temperature Default temperature
models.*.name Name of each model in LM Studio
models.*.temperature Per-agent temperature
forbidden_paths Blocked system paths
forbidden_commands Blocked dangerous commands

๐Ÿ“Š Context management

Feature Description
Token counting Automatically estimates tokens (~1 token โ‰ˆ 3.5 characters)
Smart truncation Preserves system prompt, removes oldest messages
Context recovery If limit exceeded, reduces and retries automatically
Automatic retries Up to 2 retries with 3-second wait

๐ŸŽจ Visual interface

Element Description
Decorative panels Unicode-bordered boxes around text
Progress bars Visual indicator [โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘] 66% per phase
Animated bars Rotating spinner + estimated progress during generation
Per-agent colors Coordinator (cyan), Analyst (magenta), Developer (blue)
Loading indicators "โณ COORDINATOR thinking..."
Success indicators "โœ… COORDINATOR responded in 2.3s"
Per-flow icons ๐Ÿš€ Full, ๐Ÿ’ป Code, ๐Ÿ’ฌ Debate, ๐Ÿ’ฌ Free chat

๐Ÿ’ฌ Workflows

Workflow Phases Recovery
๐ŸŽฏ Full task Planning โ†’ Execution โ†’ Integration Alternative agent if fails
๐Ÿ’ป Development Specifications โ†’ Implementation โ†’ Review Analyst โ†’ Coordinator, Developer โ†’ Analyst
๐Ÿ’ฌ Debate Analysis โ†’ Technical perspective โ†’ Synthesis Individual agent fallback
๐Ÿ’ฌ Free chat Direct conversation with visual selector N/A

๐ŸŒ Indirect web access

Feature Description
Download with curl/wget Agent can use curl or wget to download content
Confirmation required Classified as medium risk, requires approval
Content as reference Downloaded HTML is used as source for the project

Included files

File Description
INSTALL.bat Windows Installer (run as administrator)
install_full.ps1 Windows Installer logic (PowerShell, executed by INSTALL.bat)
install.sh Linux/macOS Installer (chmod +x install.sh && ./install.sh)
RUN_AGENTS.bat Windows Launcher (double-click to use)
run_agents.sh Linux/macOS Launcher (chmod +x run_agents.sh && ./run_agents.sh)
collaborative_agents_v2.py Main script โ€” The brain of the system with 3 collaborative agents
config.json External config โ€” Models, URLs, workspace, tokens, banned commands
test_agents.py Unit tests โ€” 24 tests for security, analysis, and context management
test_cleaning.py Cleaning tests โ€” Verifies code extraction and content cleaning
test_progress_bar.py Progress bar tests โ€” Verifies animated progress bar
.gitignore Excludes logs, backups, workspace and caches from version control
DOCUMENTATION_EN.md Complete documentation in English

What's new in v2.1

  • ๐ŸŽ›๏ธ External config (config.json): Change models, URLs, workspace and limits without touching code
  • ๐Ÿ”„ Error recovery: If an agent fails, another automatically takes its place
  • ๐Ÿ“Š Context management: Token counting and automatic truncation to prevent overflows
  • ๐Ÿง Linux/macOS support: install.sh and run_agents.sh scripts
  • ๐Ÿงช Unit tests: 24 tests covering security, command analysis and context management
  • ๐ŸŽจ Improved UI: Decorative panels, animated progress bars, loading indicators, per-agent colors
  • ๐Ÿงน Session cleanup: Deletes logs and backups on exit to prevent file accumulation
  • ๐ŸชŸ Windows compatibility: UTF-8 forced + colorama for proper color and character rendering
  • ๐Ÿ“ .gitignore: Excludes logs, backups and automatically generated files

Quick start

# 1. Install (Windows: run as admin)
INSTALL.bat

# 2. Open LM Studio โ†’ Load all 3 models โ†’ Developer โ†’ Start Server

# 3. Run the system
RUN_AGENTS.bat
Enter fullscreen mode Exit fullscreen mode

Main menu

Option Function
1. Full task All 3 agents collaborate sequentially on your task
2. Code development Specifications โ†’ Implementation โ†’ Code review
3. Debate/Evaluation 3 perspectives on a topic with final synthesis
4. Free chat Direct conversation with the agent of your choice
5. View workspace Explore project files and folders
6. Exit Clean session and close the application

System requirements

Component Minimum Recommended
GPU NVIDIA 12 GB VRAM NVIDIA RTX 4080 Super (16 GB)
RAM 32 GB 48 GB
Disk ~50 GB free SSD NVMe
OS Windows 10/11, Linux, macOS Windows 11, Ubuntu 22.04+, macOS 13+

AI Models

Agent Model Size Role Temperature
๐Ÿค– Coordinator Qwen3 4B Instruct Heretic ~8 GB Organizes, integrates, decides 0.3
๐Ÿ” Analyst GPT-OSS 20B Heretic ~22 GB Reasons, plans, analyzes 0.7
๐Ÿ’ป Developer Qwen3 Coder 30B A3B ~15 GB Writes code, executes scripts 0.5

If something fails

Check the troubleshooting section in DOCUMENTATION_EN.md https://github.com/Mijin-VT/Collaborative_agents_V2/blob/master/DOCUMENTATION_EN.md#12-troubleshooting

Top comments (0)