Architecture of agentscope-ai/agentscope
agentscope-ai/agentscope is 1,304 source files holding 13,438 symbols across 5 modules, written mainly in Python, TypeScript, JavaScript. The largest module is src, with 532 files, and 10 files are entry points into the dependency graph.
How agentscope fits together
The agentscope package sits under src and holds the core agent, model, toolkit and service code. Agent building blocks such as the ReAct loop, tools, models and middleware are composed into an agent, and src/agentscope/agent/_realtime/_agent.py is a central file for realtime interruption and resume. For the hosted setup, examples/agent_service/main.py is the entry point that starts the FastAPI agent service backend. The service's chat handling lives in src/agentscope/app/_service/_chat.py, which manages sessions for the frontend. The pre-built Web UI in examples/web_ui pairs a backend with a TypeScript frontend that connects to that service. examples/console/main.py and examples/tui/main.py are alternative entry points for running agents from a terminal.
Largest modules
- src: 532 files and 115,884 lines of code
- tests: 246 files and 156,481 lines of code
- examples: 238 files and 31,422 lines of code
- scripts: 45 files and 5,648 lines of code
- .github: 1 file and 112 lines of code
Languages
By file count: Python 837 files, TypeScript 223 files, JavaScript 2 files.
Documentation
Repowise documents agentscope in 1,130 pages generated from the source, 57 of them written explanations of the repository and its modules.
More on agentscope: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos