Architecture of andrewyng/openworker
andrewyng/openworker is 768 source files holding 8,036 symbols across 6 modules, written mainly in Python, TypeScript, Rust. The largest module is surfaces, with 296 files, and 17 files are entry points into the dependency graph.
How openworker fits together
Input enters through one of the surfaces, either the desktop app in surfaces/gui, the command line entry point in coworker/cli.py, or the server defined in coworker/server/app.py. The Python server runs the local agent server that the desktop app uses, and the connectors built on the base classes in coworker/connectors/base.py give the agent access to external tools. The core agent loop in coworker/engine.py plans steps and calls tools, and coworker/agents coordinates agent instances and scheduled automation runs. Before a consequential action such as sending a message or running a command, the loop pauses for approval, and every tool call is recorded with its approval record. The output is a finished file such as a document, spreadsheet, report or web page, and commands can run inside an NVIDIA OpenShell sandbox when that is enabled.
Largest modules
- surfaces: 296 files and 49,956 lines of code
- coworker: 208 files and 56,075 lines of code
- tests: 186 files and 37,344 lines of code
- packaging: 5 files and 303 lines of code
- scripts: 4 files and 1,091 lines of code
- stt: 1 file and 591 lines of code
Languages
By file count: Python 401 files, TypeScript 290 files, Rust 4 files, Shell 3 files, JavaScript 2 files.
Documentation
Repowise documents openworker in 999 pages generated from the source, 29 of them written explanations of the repository and its modules. Module guides include:
- coworker: Agent Catalog and Audit
- coworker/agents: Agent Implementations
- surfaces/gui/src/components/connectors: Connector Detail Components
More on openworker: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos