Open Source

autoswarm turns local LLMs into self-optimizing agents, boosting performance from 30% to 90%

Your local LLM can now learn from past chats and improve autonomously via continuous reflection

Deep Dive

autoswarm is an experimental open-source project that transforms any locally hosted LLM into a continuously improving agent. Created by a Reddit user, the system works by intercepting every chat through a small proxy, logging all interactions. Then, an autonomous "reflect-and-rewrite" step—powered by the same local model—reviews those logs, extracts concrete behavioral lessons, and writes them to a `skills.yaml` file. Those lessons are automatically injected into the system prompt of future conversations, effectively letting the model learn from its own mistakes and successes without human intervention.

Initial testing on a 10-task subset of TerminalBench (a benchmark for terminal-based agents) showed dramatic improvement: performance rose from roughly 30% to 90%. The creator notes that the same loop can run continuously against everyday chats, not just curated benchmarks, making it a practical tool for anyone running local LLMs with LM Studio. Setup is straightforward: install via pip, run `autoswarm doctor` to verify the server, then `autoswarm start` to launch the proxy on port 8080. While still a hobby project, the concept of self-optimizing agents has clear implications for personal AI assistants, automated workflows, and developers who want their models to adapt without manual prompt engineering. The GitHub repo is actively maintained and open to feedback.

Key Points
  • autoswarm uses a reflect-and-rewrite loop: logs every chat, distills lessons into a skills.yaml, and injects them into future system prompts
  • On a 10-task TerminalBench subset, performance jumped from ~30% to ~90% using the same local LLM
  • Works with LM Studio on localhost; setup requires only pip install and two commands (doctor, start)

Why It Matters

Enables local LLMs to continuously self-improve from real use, reducing manual prompt tuning and unlocking adaptive personal assistants.