Introducing a new way to review your PRs.

Read the announcement

oraios / serena

A powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent

View on GitHub

13 documents · Updated Nov 16, 2026

overview

Knowledge Base updated: 2026-11-16

Knowledge Base Index

1. Orientation

This repository is Serena, a coding-agent toolkit/server that exposes project-aware code navigation, editing, memory, and workflow tools through MCP, CLI, REPL, GUI, and backend integrations. The highest-level flow is: load Serena/project configuration, create a project/session, choose a language backend, then route client tool calls through Serena’s tool framework.

Main parts:

  • src/serena/ — core agent runtime, configuration, projects, sessions, tools, MCP server, dashboard, memories, REPL, and backend orchestration.
  • src/solidlsp/ — language-server process/protocol framework plus concrete language-server adapters.
  • src/interprompt/ — prompt templating and multilingual prompt factory support.
  • scripts/, root build files, and docs/ automation — developer utilities, generation scripts, packaging, Docker, Nix, profiling, and documentation/news helpers.

Critical state lives mostly on disk:

  • Serena user/project configuration and templates live under src/serena/config/**, src/serena/resources/**, and .serena/**.
  • Project memories are managed by src/serena/memories/** and surfaced through memory tools.
  • Language-server dependencies and hashes live under src/solidlsp/resources/** and adapter-specific resource directories.

2. Architecture diagrams

flowchart TD
  subgraph Clients
    MCP[MCP clients]
    CLI[Serena CLI]
    REPL[REPL and demos]
    GUI[Dashboard / tray / log viewer]
  end

  subgraph Serena[src/serena]
    Config[config + project loading]
    Agent[agent/session/project runtime]
    Tools[tools framework]
    Memory[memories]
    Backends[language backends]
    Dashboard[dashboard APIs]
  end

  subgraph BackingPackages
    SolidLSP[src/solidlsp]
    Interprompt[src/interprompt]
  end

  subgraph External
    LSPs[external language servers]
    JetBrains[JetBrains plugin]
    OLB[OLB JVM backend]
    Disk[(project files/config/memories)]
  end

  MCP --> Config
  CLI --> Config
  REPL --> Agent
  GUI --> Dashboard
  Config --> Agent
  Agent --> Tools
  Tools --> Memory
  Tools --> Backends
  Agent --> Interprompt
  Backends --> SolidLSP
  SolidLSP --> LSPs
  Backends --> JetBrains
  Backends --> OLB
  Config --> Disk
  Memory --> Disk
  Tools --> Disk
sequenceDiagram
  participant Client as MCP client
  participant MCP as src/serena/mcp.py
  participant Config as Serena config/project config
  participant Runtime as Project/session runtime
  participant Tools as src/serena/tools
  participant Backend as LSP/JetBrains/OLB backend
  participant FS as Project files and memories

  Client->>MCP: start server / call tool
  MCP->>Config: load user + project settings
  MCP->>Runtime: create project/session context
  Runtime->>Tools: resolve and execute tool
  Tools->>Backend: symbol/query operations when needed
  Tools->>FS: file, shell, workflow, memory operations
  Backend-->>Tools: diagnostics/symbols/results
  Tools-->>Runtime: tool result
  Runtime-->>MCP: response payload
  MCP-->>Client: MCP response
flowchart LR
  Project[Project config] --> Manager[src/serena/ls_manager.py]
  Manager --> Choice{backend type}
  Choice --> LSP[src/serena/lsp]
  Choice --> JB[src/serena/jetbrains]
  Choice --> OLB[src/serena/olb]
  LSP --> Solid[solidlsp core]
  Solid --> Adapters[solidlsp language_servers]
  Adapters --> Servers[external language servers]
  JB --> Plugin[JetBrains plugin client]
  OLB --> JVM[OLB JVM backend]
  Servers --> Symbols[diagnostics and symbols]
  Plugin --> Symbols
  JVM --> Symbols
flowchart TD
  Templates[src/interprompt templates] --> PromptFactory[generated prompt factory]
  ToolDefs[src/serena/tools]
  ToolDefs --> CapGen[scripts/gen_tool_capabilities.py]
  CapGen --> Capabilities[src/serena/generated/tool_capabilities.py]
  PromptFactory --> Agent[src/serena/agent.py]
  Capabilities --> Tools[src/serena/tools/tools_base.py]
  Tools --> MCP[src/serena/mcp.py]
  Tools --> REPL[src/serena/repl]

3. Glossary

  • Serena — the repo’s project-aware coding-agent runtime and server surface.
  • MCP — the Model Context Protocol surface implemented by Serena for external clients.
  • solidlsp — Serena’s bundled framework for managing language-server processes and LSP protocol traffic.
  • OLB — the optional JVM-backed language backend integrated under src/serena/olb/.
  • interprompt — the prompt templating package used to generate Serena prompt factories.

4. Codebase-wide invariants

5. Routing table