Guide
Serena
An agent editing code without a language server is working from text search. Serena gives it what an IDE has — where a symbol is defined, everywhere it is used, and how to change it without breaking the other places. Installs on OpenClaw and Hermes.
Grep Is Not Understanding
Ask a bot to rename a function and, with only file tools, it searches for the name and edits what matches. That finds the string in a comment, in an unrelated class with the same method name, and in a test fixture — and misses the call that was aliased on import.
A language server knows the difference, because it has parsed the project rather than scanned it. Serena exposes that to the agent over MCP: go to definition, find references, and edits expressed against symbols instead of line numbers, across more than forty languages.
Install It
- Open the dashboard and go to Tools.
- Pick a running bot — tools install per instance.
- Install Serena. It runs locally in your own container as an MCP server (MIT licensed), with no external service involved.
On Hermes, restart the bot afterwards if it does not seem to notice the tool.
It is configured with an IDE-style context that deliberately drops the basic file-reading tools it would otherwise expose, because your bot already has its own file and shell tools. That keeps the agent from being offered two ways to do the same thing and choosing badly.
What to Ask For
- “Where is this function defined, and what calls it?”
- “Rename this method everywhere, including the tests.”
- “What breaks if I change this signature?”
- “Extract this block into its own function and update the callers.”
- “Explain how this class is used across the project.”
Serena or a Coding Workspace?
Two different products, and the right one depends on where the code lives:
- Serena gives your ordinary chat bot code intelligence over files it can already reach — good when the repository is something the bot works with as part of a wider job.
- A coding workspace is a dedicated box with a coding CLI in it, built for sustained work on a codebase, and scriptable through the Developer API.
If your question is “refactor this repository”, use a workspace. If it is “my assistant also needs to understand our code”, install Serena.
Troubleshooting
- The first question on a big repository is slow. A language server indexes before it can answer. Later questions are quick.
- It falls back to searching. Some languages are better served than others. Naming the language and the file usually steers it back.
- Edits touch more than expected. Ask for the reference list first, then approve the change — a rename is exactly the kind of thing to look at before it lands.
Try It
Install it and ask your bot where a function in your project is defined and what calls it. Compare the answer with the one it gave before — the difference between a search result and a reference list is the whole point.
Related: the Tools catalog, Codebase Memory, coding workspaces, MCP on OpenClaw.