account_tree Architecture

The system is layered around presentation, application, domain, and infrastructure modules. Gateways are lazy-loaded and configured via environment settings.

Storage is split across MongoDB (document/log storage) and Neo4j (graph relationships). This split allows fast semantic retrieval and explicit relationship traversal when building context for an LLM.

In the codebase, gateways abstract provider-specific APIs so you can switch LLMs without rewriting pipelines. See LLM Setup.