Swival/swival

A small, powerful, open-source CLI coding agent that works with open models.

What it solves

Swival is a CLI coding agent designed to be reliable and practical, specifically optimized for use with smaller, local models that often have tight context windows and limited resources. It allows developers to automate coding tasks—such as refactoring, auditing, and bug fixing—across a wide variety of model providers without requiring a complex framework.

How it works

Swival operates as an autonomous tool loop that connects to various LLM providers (including local servers like LM Studio and llama.cpp, or cloud APIs like Gemini and Claude). It manages context through graduated compaction and persistent thinking notes to prevent the agent from losing track of multi-step plans. It can be extended via SKILL.md-based skills, the Model Context Protocol (MCP), and a custom command system.

Who it’s for

It is built for developers who want a flexible, lightweight coding agent that can run on their own hardware using open-source models or leverage existing subscriptions (like ChatGPT Plus or Claude Pro) without needing separate API keys.

Highlights

  • Broad Provider Support: Works with local servers (LM Studio, llama.cpp, ollama), cloud APIs, and existing browser-based subscriptions (ChatGPT Plus, Claude Pro).
  • Context Resilience: Uses graduated compaction and state saving to maintain progress even during context overflows or interruptions.
  • Goal-Oriented Execution: The /goal command forces the agent to stick to a task until it provides evidence-based completion or hits a budget.
  • Security-First: Features transparent secret encryption to hide API keys from LLM providers and a built-in /audit command for security bug scanning.
  • Extensibility: Supports the Agent Client Protocol (ACP) for editor integration (e.g., Zed), Agent-to-Agent (A2A) server mode, and MCP for external tools.
  • Benchmarking Tools: Generates machine-readable JSON reports for comparing model performance on real coding tasks.

Related

  • Project
  • Project
  • Project
  • Project