Files
igny8/agent58k/QUICKSTART.md
IGNY8 VPS (Salman) 0b3830c891 1
2025-11-29 01:48:53 +00:00

3.1 KiB

Quick Start Guide

Installation (30 seconds)

cd ~/agent58k
chmod +x setup.sh
./setup.sh

Start Server

cd ~/agent58k
source venv/bin/activate
python server.py

Configure IDE

Continue.dev

Copy the config:

cp continue-config.json ~/.continue/config.json

Cursor

Settings → Models → Add Custom:

  • Base URL: http://localhost:8000/v1
  • Model: zdolny/qwen3-coder58k-tools:latest

Test It Works

chmod +x test_server.sh
./test_server.sh

Example Prompts

Instead of: "Can you help me read the config file?"

Use: "Read config.py and show me the database settings" "Search the codebase for all files importing requests" "Create a new file utils/parser.py with a JSON parser" "Run the tests in tests/ directory" "Find all TODO comments in Python files"

What Makes This Different

Your original code had:

  • Only 2 basic tools (calculate, python)
  • Broken tool extraction (regex parsing)
  • No streaming support
  • No file operations
  • No terminal access
  • Single-step execution only

This version has:

  • 8 comprehensive tools (file ops, terminal, search, etc.)
  • Proper Qwen Agent tool integration
  • Full streaming support
  • Multi-step agent reasoning
  • Works like native Cursor/Continue
  • Production-ready error handling

Auto-Start on Boot (Optional)

# Edit the service file and replace %YOUR_USERNAME% and %HOME%
sudo cp qwen-agent.service /etc/systemd/system/
sudo systemctl enable qwen-agent
sudo systemctl start qwen-agent

Troubleshooting

"ModuleNotFoundError: No module named 'qwen_agent'" → Activate venv: source venv/bin/activate

"Connection refused to localhost:8000" → Start server: python server.py

"Ollama API error" → Start Ollama: ollama serve → Pull model: ollama pull zdolny/qwen3-coder58k-tools:latest

Agent not using tools → Be explicit: "Use the file read tool to..." → Check server logs for errors

What Fixed

  1. Tool System: Implemented proper BaseTool classes that Qwen Agent understands
  2. Streaming: Added SSE support with proper chunk formatting
  3. Response Handling: Properly extracts content from agent responses
  4. Multi-step: Agent can now chain multiple tool calls
  5. Error Handling: Comprehensive try/catch with detailed error messages
  6. IDE Integration: OpenAI-compatible API that works with Continue/Cursor

Files Created

  • server.py - Main server (400+ lines with 8 tools)
  • requirements.txt - Python dependencies
  • setup.sh - One-command installation
  • test_server.sh - Verify everything works
  • continue-config.json - IDE configuration
  • qwen-agent.service - Systemd service
  • README.md - Full documentation
  • QUICKSTART.md - This file

Next Steps

  1. Run setup: ./setup.sh
  2. Start server: python server.py
  3. Configure your IDE (copy continue-config.json)
  4. Test with: "List files in the current directory"
  5. Try complex tasks: "Read all Python files, find bugs, fix them"

Enjoy your fully-capable AI coding assistant! 🚀