How agent0ai/agent-zero works
Agent Zero is a user-operated AI agent with a Linux workspace: users chat through the Web UI, configure a model, and ask the agent to research, create files, or work through browser and desktop tools. The map includes chat orchestration, extensibility and plugins, workspace/project support, and major documented capabilities. The README supports the user workflow and product branches; source-index references support only the listed internal links. Several capabilities are documented but their runtime wiring was not sampled, so those links are omitted.
Main entry points: agent.py Agent runtime · plugins.py Plugin system · extension.py Extension hooks · files.py File access
Components 27
Chat and orchestration
- Agent runtime
agent.py - Chat persistence
helpers/persist_chat.py - Message queue
helpers/message_queue.py - Subagents
helpers/subagents.py
Runtime framework
- Extension hooks
helpers/extension.py - Plugin system
helpers/plugins.py - Module loading
helpers/modules.py - Watchdogs
helpers/watchdog.py - Deferred work
helpers/defer.py - Initialization
initialize.py - Runtime config
helpers/runtime.py - Settings
helpers/settings.py - Localization
helpers/localization.py - Output formatting
helpers/print_style.py - String utilities
helpers/strings.py
Workspace and projects
- File access
helpers/files.py - Projects
helpers/projects.py - Backup and restore
helpers/backup.py
Agent capabilities
- Browser tools
plugins/_browser/tools/browser.py - Desktop tools
plugins/_desktop/helpers/desktop_routes.py - Document query
plugins/_document_query/helpers/document_query.py - Web search
plugins/_search_engine/tools/search_engine.py - Agent memory
plugins/_memory/extensions/python/monologue_end/_50_memorize_fragments.py - External integrations
helpers/integration_commands.py
Other components
- User
Connections 24
- User → Web UI: sends request
README.md - Web UI → Agent runtime: starts chat
- Agent runtime → Chat persistence: uses persistence
helpers/fasta2a_server.py - Agent runtime → Subagents: uses
agent.py - Agent runtime → Extension hooks: calls hooks
agent.py - Agent runtime → File access: uses
agent.py - Agent runtime → Output formatting: uses
agent.py - Plugin system → Extension hooks: loads hooks
helpers/plugins.py - Plugin system → File access: uses
helpers/plugins.py - Plugin system → Module loading: uses
helpers/plugins.py - Plugin system → Projects: uses
helpers/plugins.py - Plugin system → Subagents: uses
helpers/plugins.py - Extension hooks → Module loading: discovers extensions
helpers/extension.py - Extension hooks → File access: scans files
helpers/extension.py - Web search → Agent runtime: returns results
plugins/_search_engine/tools/search_engine.py - Document query → Agent runtime: indexes and queries
plugins/_document_query/helpers/document_query.py - Document query → File access: reads documents
plugins/_document_query/helpers/document_query.py - User → Browser tools: requests browsing
README.md - User → Desktop tools: requests desktop work
README.md - User → Document query: asks about documents
README.md - User → Web search: requests research
README.md - User → Projects: organizes work
README.md - User → External integrations: adds integrations
README.md - User → Backup and restore: keeps backups
README.md