Serena
Serena превращает LLM в агентов для работы с кодом! Семантический поиск, редактирование, интеграция с Claude и VSCode. Бесплатно, с открытым исходным кодом. Ускорьте свой рабочий процесс уже сегодня!
Serena — это мощный набор инструментов для создания кодинг-агентов, предназначенный для превращения больших языковых моделей (LLM) в полноценные кодинг-агенты, способные работать непосредственно с кодовой базой. Он предоставляет важные инструменты семантического поиска и редактирования кода, аналогичные тем, что есть в IDE, извлекая сущности кода на уровне символов и используя реляционную структуру. Serena поддерживает интеграцию с LLM через протокол Model Context Protocol (MCP), предлагая MCP-сервер, совместимый с Claude Desktop, IDE, такими как VSCode, и скоро ChatGPT. Он также интегрируется с Agno — модельно-независимым фреймворком для агентов, позволяя использовать различные LLM от провайдеров, таких как Google, OpenAI, Anthropic, Ollama, Together и Anyscale. Serena расширяет возможности LLM с помощью бесплатных инструментов с открытым исходным кодом для семантического анализа и манипуляции кодом.
Ключевые особенности
- 🚀 Serena is a powerful coding agent toolkit capable of turning an LLM into a fully-featured agent that works directly on your codebase.
- 🔧 Serena provides essential semantic code retrieval and editing tools that are akin to an IDE's capabilities, extracting code entities at the symbol level and exploiting relational structure.
- 🆓 Serena is free & open-source, enhancing the capabilities of LLMs you already have access to free of charge.
Here is a demonstration of Serena implementing a small feature for itself (a better log GUI) with Claude Desktop. Note how Serena's tools enable Claude to find and edit the right symbols.
Serena-Add-Logo_x264.mp4
Serena provides the necessary tools for coding workflows, but an LLM is required to do the actual work, orchestrating tool use.
Serena can be integrated with an LLM in several ways:
- by using the model context protocol (MCP).
Serena provides an MCP server which integrates with- Claude Desktop,
- IDEs like VSCode, Cursor or IntelliJ,
- and soon also ChatGPT
- by using Agno – the model-agnostic agent framework.
Serena's Agno-based agent allows you to turn virtually any LLM into a coding agent, whether it's provided by Google, OpenAI or Anthropic (with a paid API key) or a free model provided by Ollama, Together or Anyscale. - by incorporating Serena's tools into an agent framework of your choice.
Serena's tool implementation is decoupled from the framework-specific code and can thus easily be adapted to any agent framework.
Serena's semantic code analysis capabilities build on language servers using the widely implemented language server protocol (LSP). The LSP provides a set of versatile code querying and editing functionalities based on symbolic understanding of the code. Equipped with these capabilities, Serena discovers and edits code just like a seasoned developer making use of an IDE's capabilities would. Serena can efficiently find the right context and do the right thing even in very large and complex projects! So not only is it free and open-source, it frequently achieves better results than existing solutions that charge a premium.
Language servers provide support for a wide range of programming languages. With Serena, we provide
-
direct, out-of-the-box support for:
- Python
- Java (Note: startup is slow, initial startup especially so)
- TypeScript
-
indirect support (may require some code changes/manual installation) for:
- Ruby (untested)
- Go (untested)
- C# (untested)
- Rust (untested)
- Kotlin (untested)
- Dart (untested)
- C/C++ (untested)
These languages are supported by the language server library multilspy, which Serena uses under the hood. But we did not explicitly test whether the support for these languages actually works.
Further languages can, in principle, easily be supported by providing a shallow adapter for a new language server implementation.
- What Can I Use Serena For?
- Free Coding Agents with Serena
- Quick Start
- Serena's Tools and Configuration
- Comparison with Other Coding Agents
- Stability Issues in MCP Client-Server Interactions
- Onboarding and Memories
- Combination with Other MCP Servers
- Recommendations on Using Serena
- Acknowledgements
- Customizing Serena
- Full List of Tools
You can use Serena for any coding tasks – whether it is focussed on analysis, planning, designing new components or refactoring existing ones. Since Serena's tools allow an LLM to close the cognitive perception-action loop, agents based on Serena can autonomously carry out coding tasks from start to finish – from the initial analysis to the implementation, testing and, finally, the version control system commit.
Serena can read, write and execute code, read logs and the terminal output. While we do not necessarily encourage it, "vibe coding" is certainly possible, and if you want to almost feel like "the code no longer exists", you may find Serena even more adequate for vibing than an agent inside an IDE (since you will have a separate GUI that really lets you forget).
Even the free tier of Anthropic's Claude has support for MCP Servers, so you can use Serena with Claude for free.
Presumably, the same will soon be possible with ChatGPT Desktop once support for MCP servers is added.
Through Agno, you furthermore have the option to use Serena with a free/open-weights model.
Serena is Oraios AI's contribution to the developer community.
We use it ourselves on a regular basis.
We got tired of having to pay multiple IDE-based subscriptions (such as Windsurf or Cursor) that forced us to keep purchasing tokens on top of the chat subscription costs we already had. The substantial API costs incurred by tools like Claude Code, Cline, Aider and other API-based tools are similarly unattractive. We thus built Serena with the prospect of being able to cancel most other subscriptions.
- Install
uv(instructions here) - Clone the repository to
/path/to/serena. - Copy
serena_config.template.ymltoserena_config.ymland adjust settings. - Copy
myproject.template.ymltomyproject.ymland adjust the settings specific to your project. (Add one such file for each project you want Serena to work on.) - If you want Serena to dynamically switch between projects, add the list of all project files
created in the previous step to the
projectslist inserena_config.yml.
⚠️ Note: Serena is under active development. We are continuously adding features, improving stability and the UX. As a result, configuration may change in a breaking manner. If you have an invalid configuration, the MCP server or Serena-based Agent may fail to start (investigate the MCP logs in the former case). Check the changelog and the configuration templates when updating Serena, adapting your configurations accordingly.
After the initial setup, continue with one of the sections below, depending on how you want to use Serena.
-
Create a configuration file for your project, say
myproject.ymlbased on the template in myproject.template.yml. -
Configure the MCP server in your client.
For Claude Desktop (available for Windows and macOS), go to File / Settings / Developer / MCP Servers / Edit Config, which will let you open the JSON fileclaude_desktop_config.json. Add the following (with adjusted paths) to enable Serena:{ "mcpServers": { "serena": { "command": "/abs/path/to/uv", "args": ["run", "--directory", "/abs/path/to/serena", "serena-mcp-server", "/abs/path/to/myproject.yml"] } } }:info: The path to the project file is optional if you have set
enable_project_activationin your configuration, as this setting will allow you to simply instruct Claude to activate the project you want to work on.If you are using paths containing backslashes for paths on Windows (note that you can also just use forward slashes), be sure to escape them correctly (
\\).
That's it! Save the config and then restart Claude Desktop.
Note: on Windows and macOS there are official Claude Desktop applications by Anthropic, for Linux there is an open-source community version.
⚠️ Be sure to fully quit the Claude Desktop application, as closing Claude will just minimize it to the system tray – at least on Windows.
After restarting, you should see Serena's tools in your chat interface (notice the small hammer icon).
⚠️ Tool Names: Claude Desktop (and most MCP Clients) don't resolve the name of the server. So you shouldn't say something like "use Serena's tools". Instead, you can instruct the LLM to use symbolic tools or to use a particular tool by referring to its name. Moreover, if you use multiple MCP Servers, you might get tool name collisions which lead to undefined behavior. For example, Serena is currently incompatible with the Filesystem MCP Server due to tool name collisions.
ℹ️ Note that MCP servers which use stdio as a protocol are somewhat unusual as far as client/server architectures go, as the server necessarily has to be started by the client in order for communication to take place via the server's standard input/output stream. In other words, you do not need to start the server yourself. The client application (e.g. Claude Desktop) takes care of this and therefore needs to be configured with a launch command.
For more information on MCP servers with Claude Desktop, see the official quick start guide.
Being an MCP Server, Serena can be included in any MCP Client. The same config as above, maybe with small client-specific modifications should work. Most of the popular existing coding assistants (IDE extensions or VSCode-like IDEs) accept connecting to MCP Servers. Including Serena generally boosts their performance by providing them tools for symbolic operations.
In this case, the billing for the usage continues to be controlled by the client of your choice (unlike with the Claude Desktop client). But you may still want to use Serena through such an approach, e.g., for one of the following reasons:
- You are already using a coding assistant (say Cline or Cursor) and just want to make it more powerful.
- You are on Linux and don't want to use the community-created Claude Desktop
- You want tighter integration of Serena into your IDE and don't mind paying for that
The same considerations as in using Serena for Claude Desktop (in particular, tool name collisions) also apply here.
Agno is a model-agnostic agent framework that allows you to turn Serena into an agent (independent of the MCP technology) with a large number of underlying LLMs.
While Agno is not yet entirely stable, we chose it, because it comes with its own open-source UI, making it easy to directly use the agent using a chat interface. With Agno, Serena is turned into an agent (so no longer an MCP Server), so it can be used in programmatic ways (for example for benchmarking or within your application).
Here's how it works (see also Agno's documentation):
-
Download the agent-ui code with npx
npx create-agent-ui@latest
or, alternatively, clone it manually:
git clone https://github.com/agno-agi/agent-ui.git cd agent-ui pnpm install pnpm dev -
Install serena with the optional requirements:
# You can also only select agno,google or agno,anthropic instead of all-extras uv pip install --all-extras -r pyproject.toml -e .
-
Copy
.env.exampleto.envand fill in the API keys for the provider(s) you intend to use. -
Start the agno agent app with
uv run python scripts/agno_agent.py
By default, the script uses Claude as the model, but you can choose any model supported by Agno (which is essentially any existing model).
-
In a new terminal, start the agno UI with
cd agent-ui pnpm devConnect the UI to the agent you started above and start chatting. You will have the same tools as in the MCP server version.
Here is a short demo of Serena performing a small analysis task with the newest Gemini model:
Serena-Agno-Demo_x264.mp4
⚠️ IMPORTANT: In contrast to the MCP server approach, tool execution in the Agno UI does
not ask for the user's permission. The shell tool is particularly critical, as it can perform arbitrary code execution.
While we have never encountered any issues with
this in our testing with Claude, allowing this may not be entirely safe.
You may choose to disable certain tools for your setup in your Serena project's
configuration file (.yml).
The Agno agent is particularly nice because of the Agno UI, but it is easy to incorporate Serena into any agent framework (like pydantic-ai, langgraph or others).
You just have to write an adapter of Serena's tools to the tools in the framework of your choice, like it was done by us for agno in the SerenaAgnoToolkit.
Serena combines tools for semantic code retrieval with editing capabilities and shell execution. Find the complete list of tools below.
The use of all tools is generally recommended, as this allows Serena to provide the most value: Only by executing shell commands (in particular, tests) can Serena identify and correct mistakes autonomously.
However, it should be noted that the execute_shell_command tool allows for arbitrary code execution.
When using Serena as an MCP Server, clients will typically ask the user for permission
before executing a tool, so as long as the user inspects execution parameters beforehand,
this should not be a problem.
However, if you have concerns, you can choose to disable certain commands in your project's
.yml configuration file.
If you only want to use Serena purely for analyzing code and suggesting implementations
without modifying the codebase, you can consider disabling the editing tools in the configuration, i.e.
create_text_fileinsert_after_symbolinsert_at_lineinsert_before_symbolreplace_symbol_bodydelete_lines.
In general, be sure to back up your work and use a version control system in order to avoid losing any work.
To our knowledge, Serena is the first fully-featured coding agent where the entire functionality is available through an MCP server, thus not requiring API keys or subscriptions.
The most prominent subscription-based coding agents are parts of IDEs like Windsurf, Cursor and VSCode. Serena's functionality is similar to Cursor's Agent, Windsurf's Cascade or VSCode's upcoming agent mode.
Serena has the advantage of not requiring a subscription. A potential disadvantage is that it is not directly integrated into an IDE, so the inspection of newly written code is not as seamless.
More technical differences are:
- Serena is not bound to a specific IDE. Serena's MCP server can be used with any MCP client (including some IDEs), and the Agno-based agent provides additional ways of applying its functionality.
- Serena is not bound to a specific large language model or API.
- Serena navigates and edits code using a language server, so it has a symbolic understanding of the code. IDE-based tools often use a RAG-based or purely text-based approach, which is often less powerful, especially for large codebases.
- Serena is open-source and has a small codebase, so it can be easily extended and modified.
An alternative to subscription-based agents are API-based agents like Claude Code, Cline, Aider, Roo Code and others, where the usage costs map directly to the API costs of the underlying LLM. Some of them (like Cline) can even be included in IDEs as an extension. They are often very powerful and their main downside are the (potentially very high) API costs.
Serena itself can be used as an API-based agent (see the section on Agno above). We have not yet written a CLI tool or a dedicated IDE extension for Serena (and there is probably no need for the latter, as Serena can already be used with any IDE that supports MCP servers). If there is demand for a Serena as a CLI tool like Claude Code, we will consider writing one.
The main difference between Serena and other API-based agents is that Serena can also be used as an MCP server, thus not requiring an API key and bypassing the API costs. This is a unique feature of Serena.
There are other MCP servers designed for coding, like DesktopCommander and codemcp. However, to the best of our knowledge, none of them provide semantic code retrieval and editing tools; they rely purely on text-based analysis. It is the integration of language servers and the MCP that makes Serena unique and so powerful for challenging coding tasks, especially in the context of larger codebases.
The support for MCP Servers in Claude Desktop and the various MCP Server SDKs are relatively new developments, and we found them to be somewhat unstable. Sometimes, Claude Desktop will crash on a tool execution (with an asyncio error or something else of this kind). On the one hand, it can display show error messages that are no of consequence, and on the other, it can fail to show error messages when things fail irrecoverably. Yet we expect these stability issues to improve over time.
The working configuration of an MCP server may vary from platform to platform and from client to client. We recommend always using absolute paths, as relative paths may be sources of errors. The language server is running in a separate sub-process and is called with asyncio – sometimes Claude Desktop lets it crash. If you have Serena's log window enabled, and it disappears, you'll know what happened.
For now, you may have to restart Claude Desktop multiple times, may have to manually cleanup lingering processes, and you may experiences freezes in conversations. Just try again in the latter case. Feel free to open issues if you encounter setup problems that you cannot solve.
To help with troubleshooting, we have written a small GUI utility for logging. We recommend that you enable it
through the project configuration (myproject.yml) if you encounter problems. For Claude Desktop, there are also the MCP logs that can help
identify issues.
By default, Serena will perform an onboarding process when it is started for the first time for a project. The goal of the process is for Serena to get familiar with the project and to store memories, which it can then draw upon in future interactions.
Memories are files stored in .serena/memories/ in the project directory,
which the agent can choose to read.
Feel free to read and adjust them as needed; you can also add new ones manually.
Every file in the .serena/memories/ directory is a memory file.
We found the memories to significantly improve the user experience with Serena. By itself, Serena is instructed to create new memories whenever appropriate.
When using Serena through an MCP Client, you can use it together with other MCP servers. However, beware of tool name collisions! See info on that above.
Currently, there is a collision with the popular Filesystem MCP Server. Since Serena also provides filesystem operations, there is likely no need to ever enable these two simultaneously.
We will continue to collect best practices as the Serena community grows. Below a short overview of things that we learned when using Serena internally.
Most of these recommendations are true for any coding agent, including all agents mentioned above.
To our surprise, Serena seemed to work best with the non-thinking version of Claude 3.7 vs its thinking version (we haven't yet made extensive comparisons to Gemini). The thinking version took longer, had more difficulties in using the tools, and often would just write code without reading enough context.
In our initial experiments, Gemini seemed to work very well. Unfortunately, Gemini does not support the MCP (yet?), so the only way to use it is through an API-key. On the bright side, Gemini is comparatively cheap and can handle huge context lengths.
In the very first interaction, Serena is instructed to perform an onboarding and write the first memory files. Sometimes (depending on the LLM), the files are not written to disk. In that case, just ask Serena to write the memories.
In this phase Serena will usually read and write quite a lot of text and thereby fill up the context. We recommend that you switch to another conversation once the onboarding is performed in order to not run out of tokens. The onboarding will only be performed once, unless you explicitly trigger it.
After the onboarding, we recommend that you have a quick look at the memories and, if necessary, edit them or add additional ones.
It is best to start a code generation task from a clean git state. Not only will
this make it easier for you to inspect the changes, but also the model itself will
have a chance of seeing what it has changed by calling git diff and thereby
correct itself or continue working in a followup conversation if needed.
⚠️ Important: since Serena will write to files using the system-native line endings
and it might want to look at the git diff, it is important to
set git config core.autocrlf to true on Windows.
With git config core.autocrlf set to false on Windows, you may end up with huge diffs
only due to line endings. It is generally a good idea to enable this git setting on Windows:
git config --global core.autocrlf trueIn our experience, LLMs are really bad at counting, i.e. they have problems inserting blocks of code in the right place. Most editing operations can be performed on a symbolic level, allowing this problem is overcome. However, sometimes, line-level insertions are useful.
Serena is instructed to double-check the line numbers and any code blocks that it will edit, but you may find it useful to explicitly tell it how to edit code if you run into problems.
For long and complicated tasks, or tasks where Serena has read a lot of content, you may come close to the limits of context tokens. In that case, it is often a good idea to continue in a new conversation. Serena has a dedicated tool to create a summary of the current state of the progress and all relevant info for continuing it. You can request to create this summary and write it to a memory. Then, in a new conversation, you can just ask Serena to read the memory and continue with the task. In our experience, this worked really well. On the up-side, since in a single session there is no summarization involved, Serena does not usually get lost (unlike some other agents that summarize under the hood), and it is also instructed to occasionally check whether it's on the right track.
Moreover, Serena is instructed to be frugal with context (e.g., to not read bodies of code symbols unnecessarily), but we found that Claude is not always very good in being frugal (Gemini seemed better at it). You can explicitly instruct it to not read the bodies if you know that it's not needed.
Claude Desktop will ask you before executing a tool. For most tools you can just safely
click on "Allow for this Chat", especially if all your files are under
version control. One exception is the execute_shell_command tool - there you might want
to inspect each call individually. We recommend reviewing each call to this command and
not enabling it for the whole chat.
Serena uses the code structure for finding, reading and editing code. This means that it will work well with well-structured code but may fail with fully unstructured one (like a God-class with enormous, non-modular functions). Type annotations also help a lot here. The better your code, the better Serena will work. So we generally recommend you to write well-structured, modular and typed code - it will not only help you but also help your AI ;).
Serena cannot debug (no coding assistant can do this at the moment, to our knowledge). This means that for improving the results within an agent loop, Serena needs to acquire information by executing tests, running scripts, performing linting and so on. It is often very helpful to include many log messages with explicit information and to have meaningful tests. Especially the latter often help the agent to self-correct.
We generally recommend to start an editing task from a state where all linting checks and tests pass.
We found that it is often a good idea to spend some time conceptualizing and planning a task before actually implementing it, especially for non-trivial task. This helps both in achieving better results and in increasing the feeling of control and staying in the loop. You can make a detailed plan in one session, where Serena may read a lot of your code to build up the context, and then continue with the implementation in another (potentially after creating suitable memories).
We built Serena on top of multiple existing open-source technologies, the most important ones being:
- multilspy. A beautifully designed wrapper around language servers following the LSP. It was not easily extendable with the symbolic logic that Serena required, so instead of incorporating it as dependency, we copied the source code and adapted it to our needs.
- Python MCP SDK
- Agno and the associated agent-ui, which we use to allow Serena to work with any model, beyond the ones supporting the MCP.
- All the language servers that we use through multilspy.
Without these projects, Serena would not have been possible (or would have been significantly more difficult to build).
It is very easy to extend Serena's AI functionality with your own ideas.
Just implement a new Tool by subclassing from
serena.agent.Tool and implement the apply method (not part of the interface, see
comment in Tool). By default, the SerenaAgent will immediately have access to it.
It is also relatively straightforward to add support for a new language. We look forward to seeing what the community will come up with! For details on contributing, see here.
Here is the full list of Serena's tools with a short description (output of uv run serena-list-tools):
activate_project: Activates a project by name.check_onboarding_performed: Checks whether the onboarding was already performed.create_text_file: Creates/overwrites a file in the project directory.delete_lines: Deletes a range of lines within a file.delete_memory: Deletes a memory from Serena's project-specific memory store.execute_shell_command: Executes a shell command.find_referencing_code_snippets: Finds code snippets in which the symbol at the given location is referenced.find_referencing_symbols: Finds symbols that reference the symbol at the given location (optionally filtered by type).find_symbol: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).get_active_project: Gets the name of the currently active project (if any) and lists existing projectsget_symbols_overview: Gets an overview of the top-level symbols defined in a given file or directory.insert_after_symbol: Inserts content after the end of the definition of a given symbol.insert_at_line: Inserts content at a given line in a file.insert_before_symbol: Inserts content before the beginning of the definition of a given symbol.list_dir: Lists files and directories in the given directory (optionally with recursion).list_memories: Lists memories in Serena's project-specific memory store.onboarding: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).prepare_for_new_conversation: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).read_file: Reads a file within the project directory.read_memory: Reads the memory with the given name from Serena's project-specific memory store.replace_lines: Replaces a range of lines within a file with new content.replace_symbol_body: Replaces the full definition of a symbol.restart_language_server: Restarts the language server, may be necessary when edits not through Serena happen.search_for_pattern: Performs a search for a pattern in the project.summarize_changes: Provides instructions for summarizing the changes made to the codebase.think_about_collected_information: Thinking tool for pondering the completeness of collected information.think_about_task_adherence: Thinking tool for determining whether the agent is still on track with the current task.think_about_whether_you_are_done: Thinking tool for determining whether the task is truly completed.write_memory: Writes a named memory (for future reference) to Serena's project-specific memory store.
Serena — набор инструментов для AI-кодинга
Serena — это open-source набор утилит, который превращает любую LLM в полноценного агента, работающего напрямую с вашим кодом. Инструменты Serena предоставляют возможности семантического анализа кода (на уровне символов, с учётом связей между компонентами) и редактирования, сравнимые с возможностями IDE — но бесплатно и без привязки к конкретному облачному сервису.
Быстрый старт
- Установите uv (инструкция).
- Склонируйте репозиторий Serena:
git clone https://github.com/oraios/serena.git cd serena - Скопируйте
serena_config.template.yml→serena_config.yml,myproject.template.yml→myproject.yml. - Отредактируйте
myproject.ymlпод свой проект. Для нескольких проектов создайте отдельные файлы и перечислите их вserena_config.yml. - Выберите способ интеграции (см. ниже).
Важно: Serena активно развивается — конфигурация может ломаться при обновлении. Проверяйте CHANGELOG и шаблоны конфигов.
Поддерживаемые языки
Из коробки: Python, Java (медленный старт, особенно первый), TypeScript.
Требуют донастройки: Ruby, Go, C#, Rust, Kotlin, Dart, C/C++ (не тестировались, но заявлены через multilspy).
Другие языки можно добавить, реализовав адаптер для соответствующего LSP-сервера.
LLM-интеграция
MCP-сервер (Claude Desktop и другие)
Serena предоставляет MCP-сервер. После настройки проекта запускать сервер вручную не нужно — его поднимает клиент (например, Claude Desktop).
Настройка Claude Desktop:
- Установите Claude Desktop (скачать).
- В настройках (
File → Settings → Developer → MCP Servers → Edit Config) откройтеclaude_desktop_config.json. - Добавьте:
Если в настройках указан{ "mcpServers": { "serena": { "command": "/абсолютный/путь/к/uv", "args": [ "run", "--directory", "/абсолютный/путь/к/serena", "serena-mcp-server", "/абсолютный/путь/к/myproject.yml" ] } } }enable_project_activation, путь к файлу проекта можно опустить — тогда вы сможете попросить Клода активировать проект по имени. - Полностью перезапустите Claude Desktop (на Windows — не сворачивайте, а закрывайте через контекстное меню иконки в трее).
- В чате появятся инструменты Serena — ищите значок молоточка.
Важно:
- Из-за коллизий имён Serena несовместима с MCP-сервером Filesystem.
- Не говорите «используй инструменты Serena» — обращайтесь к инструментам по имени (например,
read_file,search_symbol).
Другие MCP-клиенты (Cline, Roo-Code, Cursor, Windsurf и т.п.) Та же конфигурация работает в любом MCP-клиенте. Вы продолжаете платить за выбранный клиент, но Serena усиливает его семантическими инструментами.
Agno-агент (модельно-независимый)
Agno — это open-source фреймворк, который позволяет использовать Serena с любой LLM (Google, OpenAI, Anthropic, локальные модели через Ollama, Together, Anyscale).
- Установите UI Agno:
npx create-agent-ui@latest # или вручную: git clone https://github.com/agno-agi/agent-ui.git cd agent-ui pnpm install pnpm dev - Установите Serena с доп. зависимостями:
uv pip install --all-extras -r pyproject.toml -e . - Скопируйте
.env.example→.env, укажите API-ключи. - Запустите агента:
По умолчанию используется Claude, можно сменить модель.uv run python scripts/agno_agent.py - В другом терминале запустите UI (из папки
agent-ui):pnpm dev - Подключите UI к агенту — инструменты те же, что и в MCP-версии.
Предупреждение: В Agno UI выполнение инструментов (особенно shell) происходит без запроса подтверждения — будьте осторожны.
Другие фреймворки
Реализация инструментов Serena отделена от кода интеграции, поэтому их можно легко адаптировать под любой агентный фреймворк.
Что можно делать с Serena
Любые задачи: анализ, рефакторинг, проектирование, реализация новых фич, тестирование и коммит — от начала до конца. Агент может читать, писать и исполнять код, читать логи и вывод терминала. «Виби-кодинг» тоже возможен — если хотите забыть, что код существует, работайте в отдельном GUI, не в IDE.
Бесплатные агенты
Даже бесплатный тариф Claude Desktop поддерживает MCP-сервера. Через Agno можно использовать бесплатные open-weight модели.
Логирование
Для отладки смотрите логи MCP-сервера в своём клиенте. В конфигурации можно задать уровень детализации.
Сочетание с другими MCP-серверами
Избегайте коллизий имён инструментов — не используйте вместе с Filesystem MCP Server.
Советы по использованию
- Выбирайте модель с длинным контекстом — Serena может исчерпать лимит при работе с большими проектами.
- При онбординге дайте агенту прочитать структуру проекта и ключевые файлы.
- Разбивайте код на логические модули — это упрощает семантический поиск.
- Активно используйте логирование, линтеры и тесты — агент может запускать их сам.
- Для критичных операций настройте подтверждение перед выполнением (если клиент это позволяет).
Кастомизация
Начните с serena_config.template.yml и myproject.template.yml. Можно добавить свои инструменты или адаптировать существующие.
Благодарности
Serena — проект компании Oraios AI (oraios-ai.de), созданный, чтобы избавиться от множества платных подписок на IDE-агенты.
Полный список инструментов Serena — в репозитории.
Какие IDE и инструменты совместимы с Serena?
Serena совместима с Claude Desktop, VSCode и другими IDE. Также поддерживается Language Server Protocol (LSP) для нескольких языков программирования.
Как Serena работает с LLM?
Serena интегрируется с LLM через сервер Model Context Protocol (MCP) или агентный фреймворк Agno, предоставляя возможности семантического поиска и редактирования кода.
Какие языки программирования поддерживает Serena?
Serena напрямую поддерживает Python, Java и TypeScript. Косвенная поддержка доступна для Ruby, Go, C#, Rust, Kotlin, Dart и C/C++.
Что такое Serena?
Serena — это бесплатный инструмент с открытым исходным кодом, который превращает большие языковые модели (LLM) в мощные агенты для работы с кодом, позволяя им напрямую взаимодействовать с вашей кодовой базой и изменять её.
Каковы преимущества использования Serena?
Serena расширяет возможности LLM по работе с кодом с помощью семантического понимания, обеспечивая эффективный анализ кода, планирование, проектирование и рефакторинг. Это бесплатный инструмент с открытым исходным кодом, который интегрируется с существующими инструментами.
Read File
Reads the given file or a chunk of it. Generally, symbolic operations like find_symbol or find_referencing_symbols should be preferred if you know which symbols you are looking for. Returns the full t...
Parameters
4Create Text File
Write a new file or overwrite an existing file. Returns a message indicating success or failure.
Parameters
2List Dir
Lists files and directories in the given directory (optionally with recursion). Returns a JSON object with the names of directories and files within the given directory.
Parameters
4Find File
Finds non-gitignored files matching the given file mask within the given relative path. Returns a JSON object with the list of matching files.
Parameters
2Replace Regex
Replaces one or more occurrences of the given regular expression. This is the preferred way to replace content in a file whenever the symbol-level tools are not appropriate. Even large sections of cod...
Parameters
4Search For Pattern
Offers a flexible search for arbitrary patterns in the codebase, including the possibility to search in non-code files. Generally, symbolic operations like find_symbol or find_referencing_symbols shou...
Parameters
8Get Symbols Overview
Use this tool to get a high-level understanding of the code symbols in a file. This should be the first tool to call when you want to understand a new file, unless you already know what you are lookin...
Parameters
2Find Symbol
Retrieves information on all symbols/code entities (classes, methods, etc.) based on the given `name_path`, which represents a pattern for the symbol's path within the symbol tree of a single file. Th...
Parameters
8Find Referencing Symbols
Finds references to the symbol at the given `name_path`. The result will contain metadata about the referencing symbols as well as a short code snippet around the reference. Returns a list of JSON obj...
Parameters
5Replace Symbol Body
Replaces the body of the symbol with the given `name_path`. The tool shall be used to replace symbol bodies that have been previously retrieved (e.g. via `find_symbol`). IMPORTANT: Do not use this to...
Parameters
3Insert After Symbol
Inserts the given body/content after the end of the definition of the given symbol (via the symbol's location). A typical use case is to insert a new class, function, method, field or variable assignm...
Parameters
3Insert Before Symbol
Inserts the given content before the beginning of the definition of the given symbol (via the symbol's location). A typical use case is to insert a new class, function, method, field or variable assig...
Parameters
3Rename Symbol
Renames the symbol with the given `name_path` to `new_name` throughout the entire codebase. Note: for languages with method overloading, like Java, name_path may have to include a method's signature t...
Parameters
3Write Memory
Write some information (utf-8-encoded) about this project that can be useful for future tasks to a memory in md format. The memory name should be meaningful.
Parameters
3contentstringmemory_namestringmax_answer_charsintegerRead Memory
Read the content of a memory file. This tool should only be used if the information is relevant to the current task. You can infer whether the information is relevant from the memory file name. You sh...
Parameters
2max_answer_charsintegermemory_file_namestringList Memories
List available memories. Any memory can be read using the `read_memory` tool.
Delete Memory
Delete a memory file. Should only happen if a user asks for it explicitly, for example by saying that the information retrieved from a memory file is no longer correct or no longer relevant for the pr...
Parameters
1memory_file_namestringExecute Shell Command
Execute a shell command and return its output. If there is a memory about suggested commands, read that first. Never execute unsafe shell commands! IMPORTANT: Do not use this tool to start * long-ru...
Parameters
4Activate Project
Activates the project with the given name or path.
Parameters
1Switch Modes
Activates the desired modes, like ["editing", "interactive"] or ["planning", "one-shot"].
Parameters
1Get Current Config
Print the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
Check Onboarding Performed
Checks whether project onboarding was already performed. You should always call this tool before beginning to actually work on the project/after activating a project, but after calling the initial ins...
Onboarding
Call this tool if onboarding was not performed yet. You will call this tool at most once per conversation. Returns instructions on how to create the onboarding information.
Think About Collected Information
Think about the collected information and whether it is sufficient and relevant. This tool should ALWAYS be called after you have completed a non-trivial sequence of searching steps like find_symbol, ...
Think About Task Adherence
Think about the task at hand and whether you are still on track. Especially important if the conversation has been going on for a while and there has been a lot of back and forth. This tool should AL...
Think About Whether You Are Done
Whenever you feel that you are done with what the user has asked for, it is important to call this tool.
Prepare For New Conversation
Instructions for preparing for a new conversation. This tool should only be called on explicit user request.
Источник: https://mcpmarket.com/server/serena
Комментарии
Комментариев пока нет. Будьте первым.