{{ message }}
Repository navigation
New Agent Interaction Paradigm: The Serena REPL #2068
opcode81
announced in
Announcements
Replies: 1 comment 3 replies
|
Hey! So I have a few concerns about this approach. Mostly agent behavioral and security/harness.
|
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Yesterday, we merged the first major feature for Serena v2: the Serena REPL.
Serena has, until now, provided its functionality as a set of MCP tools — one tool per operation.
We have just merged an alternative: an interface in which the agent writes Python code which Serena executes.
It is not part of a release yet, but it is available to anyone running Serena from source (via uvx), and we would very much
like to hear how it behaves in practice.
If you are running Serena
2.0.0.dev0, you can already try it out.What it looks like
There is a single tool, and the code it runs accesses Serena through the entrypoint object
s, whose attributesare facades grouping related operations (
s.lsp,s.fs,s.edit,s.mem,s.shell, ...):With the classic tool interface, this would be one call to find the class, then one call per method — and every
intermediate result would land in the conversation. Here, one call suffices, and only the list of names comes back.
The agent is initially given nothing but the facade names and their operations; it retrieves signatures,
documentation and result types on demand via
s.info("lsp.find_symbol").Why we think this is the better interface
do not support for tools. This is what allows the language backend to be switched during a session, e.g. when
a project requiring a different backend is activated.
Trying it out
Run Serena from the repository and set the interface, either in
serena_config.ymlor on the command line:
The interface is fixed for a session and can also be set per project in
project.yml.What to keep in mind
at any time.
excluded_tools,included_optional_tools) do notapply. The operations available inside the REPL are configured via
included_apis/excluded_apis.anything the Serena process can do. If you need actual constraints, run Serena sandboxed
(see the security documentation).
not the tool name.
Feedback we are looking for
s.info(...)as intended?Documentation:
All reactions