swival  by Swival

CLI coding agent for autonomous task execution

Created 6 months ago
334 stars

Top 83.0% on SourcePulse

GitHubView on GitHub
Project Summary

Swival is a practical, reliable CLI coding agent designed for both frontier and smaller, local open-source LLMs. It excels with tight context windows and limited resources, automating tasks via an autonomous tool loop, making advanced AI coding assistance accessible even on modest hardware.

How It Works

Swival connects to diverse LLM providers, including local setups (LM Studio, llama.cpp), cloud services, and OpenAI-compatible servers. Its core strength is robust context management using graduated compaction and persistent notes, enabling multi-step plans under resource constraints. It features an autonomous tool loop for task completion and an optional review loop with LLM-as-judge for automated QA.

Quick Start & Requirements

  • Primary Install: uv tool install swival (requires Python 3.13+). macOS users can also use brew trust swival/tap && brew install swival/tap/swival.
  • Prerequisites: Local model execution requires LM Studio (with tool-calling support) or llama.cpp setup. Cloud providers may necessitate API keys or specific authentication methods.
  • Setup: Initial configuration can be handled via an interactive setup wizard by running swival without arguments, or by specifying providers and models via command-line flags.
  • Documentation: Comprehensive documentation is available at swival.dev.

Highlighted Details

  • Broad Provider Support: Integrates with LM Studio, llama.cpp, HuggingFace Inference API, OpenRouter, Google Gemini, Gemini Enterprise Agent Platform (Vertex AI), ChatGPT Plus/Pro, AWS Bedrock, OpenAI-compatible servers (Ollama, vLLM), and custom commands.
  • Small Model Reliability: Engineered to effectively handle tight context windows and limited computational resources.
  • Autonomous Goal Execution: Features persistent goal-setting and an autonomous tool loop that continues until a task is explicitly completed, blocked, or a token budget is hit.
  • Benchmarking & Evaluation: Generates detailed JSON reports (--report) capturing LLM timing, tool usage, and context events for systematic model and setting comparison.
  • Secret Encryption: Transparently encrypts API keys and credentials before they are sent to the LLM provider (--encrypt-secrets).
  • Cross-Session Memory: Utilizes BM25 ranking to retrieve and incorporate relevant past conversation notes, carrying context across independent sessions.
  • Security Audit: Includes a built-in /audit command for codebase security scanning, featuring a multi-phase review and patch generation pipeline.
  • Extensibility: Supports custom commands, SKILL.md-based skills, MetaSKILLs, Model Context Protocol (MCP), Agent Client Protocol (ACP) for editor integration, and Agent-to-Agent (A2A) for remote agent communication.

Maintenance & Community

The provided README does not detail specific maintainers, sponsorships, or community channels such as Discord or Slack.

Licensing & Compatibility

The README does not specify a software license. Users are advised to verify licensing terms before integrating Swival into commercial or closed-source projects.

Limitations & Caveats

The applefm provider is explicitly marked as experimental. Effective use with local models like those from LM Studio and llama.cpp requires models with tool-calling capabilities and careful context size configuration based on available hardware. The absence of explicit licensing information may present an adoption barrier for some organizations.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
5
Star History
0 stars in the last 30 days

Explore Similar Projects

Starred by Edward Z. Yang Edward Z. Yang(Research Engineer at Meta; Maintainer of PyTorch), Anton Osika Anton Osika(Cofounder of Lovable), and
3 more.

gptme by gptme

0%
4k
CLI tool for terminal agent workflows
Created 3 years ago
Updated 21 hours ago
Feedback? Help us improve.