serena  by oraios

Coding agent toolkit for LLMs, enabling codebase interaction

created 4 months ago
5,973 stars

Top 8.8% on sourcepulse

GitHubView on GitHub
Project Summary

Serena is an open-source toolkit designed to empower Large Language Models (LLMs) with IDE-like code retrieval and editing capabilities. It targets developers and researchers seeking to build sophisticated coding agents that can autonomously interact with and modify codebases, offering a cost-effective alternative to subscription-based AI coding tools.

How It Works

Serena leverages the Language Server Protocol (LSP) via the multilspy library to achieve symbolic understanding of code. This allows LLMs to navigate and manipulate code at the symbol level, similar to how an IDE functions. It provides a Model Context Protocol (MCP) server for integration with various LLM clients (like Claude Desktop, VSCode, Cursor) and also integrates with the model-agnostic agent framework Agno, enabling compatibility with a wide range of LLMs, including those run locally via Ollama.

Quick Start & Requirements

  • Install uv (Python package installer).
  • Clone the repository.
  • Configure serena_config.yml and project.yml files.
  • Example MCP Server (Claude Desktop): Configure Claude Desktop's claude_desktop_config.json with the command to launch the Serena MCP server, specifying the project file.
  • Example Agno Agent: Install agent-ui, install Serena with extras (uv pip install --all-extras), configure .env with API keys, start the Agno agent script (uv run python scripts/agno_agent.py), and then run the UI (cd agent-ui && pnpm dev).
  • Dependencies: Python, uv, multilspy, Agno (for Agno integration), specific LLM API keys (for non-free models).
  • Setup Time: Configuration involves editing YAML files and potentially installing dependencies; active development means configurations may change.

Highlighted Details

  • Semantic Code Understanding: Utilizes LSP for symbol-level code analysis, offering superior context and editing precision compared to text-based or RAG approaches.
  • LLM Agnosticism: Supports integration with various LLMs through MCP servers or the Agno framework, including free, locally-run models.
  • Cost-Effective: Aims to eliminate subscription costs associated with proprietary AI coding tools.
  • Extensibility: Designed for easy customization and addition of new tools or language support.

Maintenance & Community

Serena is developed by Oraios AI and is actively maintained. Community interaction channels are not explicitly listed in the README, but contributions are welcomed.

Licensing & Compatibility

The project is free and open-source. Specific license details are not provided in the README, but it is presented as a community contribution. Compatibility for commercial use or closed-source linking would require checking the specific license.

Limitations & Caveats

  • Active Development: Configuration may change in a breaking manner.
  • Language Support: Direct support for Python, Java, TypeScript; indirect/untested support for Ruby, Go, C#, Rust, Kotlin, Dart, C/C++.
  • Tool Name Collisions: Incompatible with other MCP servers that use the same tool names (e.g., Filesystem MCP Server).
  • Tool Execution Safety: The execute_shell_command tool allows arbitrary code execution; users should exercise caution and consider disabling it or reviewing calls.
  • Java Startup: Slow initial startup for Java language server support.
  • Logging GUI: Does not work on macOS or within VSCode extensions.
Health Check
Last commit

2 days ago

Responsiveness

1 day

Pull Requests (30d)
37
Issues (30d)
61
Star History
5,837 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.