architecture.mdx 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. ---
  2. sidebar_position: 4
  3. ---
  4. # 🏛️ System Architecture Overview
  5. This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents.
  6. ![system_architecture.svg](/img/system_architecture.svg)
  7. This Overview is simplified to show the main components and their interactions. For a more detailed view of the backend architecture, see the [Backend Architecture](#backend-architecture) section.
  8. # Backend Architecture
  9. _**Disclaimer**: The backend architecture is a work in progress and is subject to change. The following diagram shows the current architecture of the backend based on the commit that is shown in the footer of the diagram._
  10. ![backend_architecture.svg](/img/backend_architecture.svg)
  11. <details>
  12. <summary>Updating this Diagram</summary>
  13. <div>
  14. The generation of the backend architecture diagram is partially automated.
  15. The diagram is generated from the type hints in the code using the py2puml
  16. tool. The diagram is then manually reviewed, adjusted and exported to PNG
  17. and SVG.
  18. ## Prerequisites
  19. - Running python environment in which opendevin is executable
  20. (according to the instructions in the README.md file in the root of the repository)
  21. - [py2puml](https://github.com/lucsorel/py2puml) installed
  22. ## Steps
  23. 1. Autogenerate the diagram by running the following command from the root of the repository:
  24. `py2puml opendevin opendevin > docs/architecture/backend_architecture.puml`
  25. 2. Open the generated file in a PlantUML editor, e.g. Visual Studio Code with the PlantUML extension or [PlantText](https://www.planttext.com/)
  26. 3. Review the generated PUML and make all necessary adjustments to the diagram (add missing parts, fix mistakes, improve positioning).
  27. _py2puml creates the diagram based on the type hints in the code, so missing or incorrect type hints may result in an incomplete or incorrect diagram._
  28. 4. Review the diff between the new and the previous diagram and manually check if the changes are correct.
  29. _Make sure not to remove parts that were manually added to the diagram in the past and are still relevant._
  30. 5. Add the commit hash of the commit that was used to generate the diagram to the diagram footer.
  31. 6. Export the diagram as PNG and SVG files and replace the existing diagrams in the `docs/architecture` directory. This can be done with (e.g. [PlantText](https://www.planttext.com/))
  32. </div>
  33. </details>