Files
hermes-agent/website/docs/developer-guide/codebase-ownership.md
alt-glitch 55866ee0fb refactor(browser): browser sessions, launcher and supervisor move from tools/ to browser/
tools/ holds model tools. These 15 files register none: they launch and
track Chromium, hold the per-task browser sessions and run the CDP
supervisor the browser tools call. They move to a new root package:

  tools/browser_session*.py          -> browser/session*.py
  tools/browser_launcher{,_holders}  -> browser/launcher{,_holders}.py
  tools/browser_lightpanda.py        -> browser/lightpanda.py
  tools/browser_supervisor*.py       -> browser/supervisor*.py
  tools/browser_real_profile_logins  -> browser/real_profile_logins.py
  tools/bot_desktop/browser.py       -> browser/desktop_profile.py

browser/__init__.py is a docstring only. tools/browser_tool.py and every
tool file stay. 38 tests and one helper move to tests/browser/; its
conftest.py imports the autouse fixtures of tests/tools/conftest.py they
ran under.

Old-path files, each a MOVES key, a REQUIRED_NAMES row and a file
written by scripts/move/generate_shims.py:
- tools.browser_supervisor and tools.browser_supervisor_capture are on
  the published plugin API (hermes_cli/data/plugin_api.json), so a
  plugin's import gives the same module object.
- tools.browser_session and tools.browser_session_cloud are imported
  inside functions on every turn by a process started on v0.22.7 to
  v0.23.5 (the per-turn browser cleanup), which keeps running its old
  code after an update swaps the checkout.

Function bodies are unchanged and every import stays where it was.
Loggers follow their modules: every moved file keeps
getLogger(__name__), and the two literal supervisor loggers name
browser.supervisor. browser joins the tools entry of
hermes_logging.COMPONENT_PREFIXES, so `hermes logs --component tools`
shows the same lines. browser also joins packages.find,
FIRST_PARTY_MODULE_ROOTS, _KNOWN_LOGGER_ROOTS, the plugin isolation
audit, six check scripts, the P33 profile-scope pattern, the gateway's
stop-path preload list and the test fixtures that list root packages.

The import and docs rewrites were made by scripts/move/rewrite_imports.py
and rewrite_docs.py; split imports, imports inside child-process code
strings, boundary-lint baseline keys, two resolution-allowlist rows and
docs globs were fixed by hand.

Pinned catalog plugins import these moved modules by the old name, so each has a key in
hermes_agent/compat/moves.py and the plugin guide lists it with the release
that may remove it (no earlier than v0.27.0):
  tools.browser_session_cdp
  tools.browser_session_lifecycle
2026-11-30 16:47:24 +05:30

3.3 KiB

title, description
title description
Codebase Ownership Map Which directories belong to which subsystem, and where the right docs entry point lives for each

Codebase Ownership Map

Hermes is a large repository, and most contributions touch exactly one subsystem. This page maps each subsystem to its source directories and the documentation entry point you should read before changing it. Use it to find the right starting doc, the right place for a change, and the right test directory (tests mirror source: code in tools/ is tested in tests/tools/, plugins in tests/plugins/<type>/, and so on).

Subsystem Source directories Docs entry point
Agent core (loop, transports, compression) agent/, run_agent.py Agent Loop, Context Compression & Caching
Prompt assembly agent/prompt_builder.py, agent/system_prompt.py Prompt Assembly
Model providers & transports agent/transports/, plugins/model-providers/, hermes_cli/models.py Adding Providers, Model Provider Plugins, Provider Runtime
Built-in tools tools/ Adding Tools, Tools Runtime
Messaging gateway gateway/, plugins/platforms/ Gateway Internals, Adding Platform Adapters
CLI hermes_cli/ Extending the CLI
Plugins system plugins/ Build a Hermes Plugin
Skills (bundled & optional) skills/, optional-skills/ Creating Skills
Cron / scheduled jobs cron/ Cron Internals
Session storage persistence/, persistence/sqlite/, persistence_assembly.py Session Storage
Browser stack tools/browser_use_cli.py (browser_exec), browser/session*.py, browser/launcher.py, browser/supervisor.py, tools/browser_cdp_tool.py Browser Supervisor
Egress firewall agent/proxy_sources/iron_proxy.py Egress Internals
ACP (IDE integration) acp_adapter/ ACP Internals
Desktop app apps/desktop/ Desktop Plugin SDK, Worktree UI Development
TUI ui-tui/, tui_gateway/ Worktree UI Development
Docs site website/ Contributing
Tests tests/, tests-js/ Contributing → Before Submitting

A few conventions that fall out of this map:

  • Changes should stay inside their subsystem. A plugin that needs to edit core files is a design smell — widen the generic plugin surface instead (see the contribution rubric in the repository's AGENTS.md).
  • Run the mirror test directory for every source directory you touch. A change to plugins/platforms/telegram/ needs tests/plugins/platforms/ green, not just the test file you happened to think of.
  • When two subsystems are involved, the narrower one owns the change. Prefer a fix in an adapter or plugin over a branch in the agent core; the core is a narrow waist, and every addition there is paid for on every API call.