Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
514 commits
Select commit Hold shift + click to select a range
8318b6c
Merge branch 'pr/842' into development
frdel Jan 30, 2026
2b0c083
cleanup after /usr merge, terminal output scroll view fix
frdel Jan 30, 2026
d20d9e7
scroller polishing, icon tooltips
frdel Jan 30, 2026
95de41a
Merge upstream/development into feat-agent-zero-skills-upgrade
TerminallyLazy Jan 31, 2026
34e0997
Adjust message queue behavior
keyboardstaff Jan 31, 2026
3830c64
Enhance skills management by integrating project-scoped skills and up…
TerminallyLazy Jan 31, 2026
d42ea6b
fix: update upload path from tmp/uploads to usr/uploads
keyboardstaff Jan 31, 2026
84b8671
ui: process group metrics polishing, group completion bugfix
frdel Jan 31, 2026
1e1d22d
Merge branch 'pr/974' into development
frdel Jan 31, 2026
020822a
ui: message queue polishing, scrollbars unified
frdel Jan 31, 2026
7cd17b6
ui: Scroll stabilization
frdel Jan 31, 2026
40c7c22
ui: autoscroll polish, image preview sizes reduces
frdel Jan 31, 2026
ac80f57
Restore FUNDING.yml to agent0ai
TerminallyLazy Jan 31, 2026
6af4899
clean error msgs in file browser
3clyp50 Jan 31, 2026
a01d3c7
file browser polishing
3clyp50 Jan 31, 2026
8ed4563
collapsible msgs fix
3clyp50 Jan 31, 2026
1c83af8
welcome screen polishing.
frdel Jan 31, 2026
c2ca0de
Merge branch 'pr/977' into development
frdel Jan 31, 2026
4aaf7af
ui: welcome screen, queue input, interverntions
frdel Jan 31, 2026
5feb92d
Merge branch 'pr/902' into development
frdel Jan 31, 2026
a129a57
fix: Skip empty AI messages in output_langchain to prevent API rejection
Feb 1, 2026
6ca8402
Merge pull request #980 from hurtdidit/fix/skip-empty-ai-messages
frdel Feb 1, 2026
4932e12
WebSocket merge
frdel Feb 1, 2026
720ff4a
offload memory to deferred tasks
frdel Feb 1, 2026
817c580
no-scrollbar utility class
3clyp50 Feb 1, 2026
8f0bae7
reset isSaving before closing file edit modal
3clyp50 Feb 1, 2026
a14e73b
fix autoscroll for chat switching
frdel Feb 1, 2026
abb48a3
restore scrollbar for step-detail-scroll
3clyp50 Feb 1, 2026
e732150
Merge branch 'pr/959' into development
frdel Feb 1, 2026
a03f7b9
Merge PR 861 skills
3clyp50 Feb 2, 2026
e9d2401
fix: move default files; harden framework api/prompt
3clyp50 Feb 2, 2026
55ab547
harden frontmatter verification
3clyp50 Feb 2, 2026
fee4a3c
replace underscores with dashes for skills
3clyp50 Feb 2, 2026
eae4a09
cleanup
3clyp50 Feb 2, 2026
2baac23
rename skills dirs for consistency
3clyp50 Feb 2, 2026
ec3bb61
upgrade preps
frdel Feb 2, 2026
f9545bf
remove frameworks
3clyp50 Feb 2, 2026
724e06a
skills cleanup, minor fixes
frdel Feb 2, 2026
5bb4136
skills + ui fixes
frdel Feb 2, 2026
53c7e9c
Merge branch 'pr/983' into development
frdel Feb 2, 2026
3adec91
image response prompt, image view scroll
frdel Feb 2, 2026
6ca97b7
fix skills import path and gitignores
frdel Feb 2, 2026
1b49467
skills polishing and fixing
frdel Feb 2, 2026
360379f
git projects - basic implementation
keyboardstaff Feb 3, 2026
e2824cd
Git Clone Authentication for Private Repositories
keyboardstaff Feb 3, 2026
c4fafe9
Preserve Custom Content and Override Name/Color When Cloning Projects…
keyboardstaff Feb 3, 2026
d05224b
new A0 llm endpoint, switch utility calls to non-stream
frdel Feb 3, 2026
f402773
Merge branch 'pr/985' into development
frdel Feb 3, 2026
fe46f04
message rendering polishing
frdel Feb 4, 2026
f1fc79c
remove dummy output message
frdel Feb 4, 2026
6bc329e
minor fix - memory are enum serialization
frdel Feb 4, 2026
19da93f
banners refresh and undismiss
frdel Feb 4, 2026
9ee98c4
ui: scroll/collapse fixes
frdel Feb 4, 2026
717f69f
feat: skills list UI and APIs
3clyp50 Feb 4, 2026
804125a
remove skills activation state
3clyp50 Feb 4, 2026
1880eb0
file browser dropdown fix
3clyp50 Feb 5, 2026
1bd4610
cleanup imports
3clyp50 Feb 5, 2026
670120f
better session running messages
frdel Feb 5, 2026
6585d89
skill loading in extras
3clyp50 Feb 5, 2026
c460348
skills cleanup
frdel Feb 5, 2026
ee6707d
store skill path, simplify metadata logic
3clyp50 Feb 5, 2026
153f0a5
code exec reset polish, history and scroller fix
frdel Feb 5, 2026
1765552
Merge branch 'skillslist' of https://github.com/3clyp50/agent-zero in…
frdel Feb 5, 2026
6fafba6
skills extras preparation
frdel Feb 5, 2026
5a074f1
Update skills_tool.py
frdel Feb 5, 2026
51a11e8
Merge branch 'development' into skillslist
3clyp50 Feb 5, 2026
7c949f5
skills extras cleanup
3clyp50 Feb 5, 2026
84c0659
fixing skill roots
frdel Feb 5, 2026
0160fd0
less debug prints in state monitor
frdel Feb 5, 2026
9b378a6
skills extras polishing, less printing
frdel Feb 5, 2026
181135f
Settings polishing, logout button
frdel Feb 5, 2026
fd06f51
polish skills import, bugfixes
frdel Feb 6, 2026
65607a3
fix backup and file limit
frdel Feb 6, 2026
96039a0
fix compatibility warning
frdel Feb 6, 2026
e7a9308
Update Dockerfile
frdel Feb 6, 2026
f634618
ui: response rendering IDs fix
frdel Feb 7, 2026
52e1cce
fix subordinate grouping, layout alignments
frdel Feb 8, 2026
c9c9828
fix path links in step content
frdel Feb 8, 2026
c223b46
workdir outside project, gitkeeps
frdel Feb 8, 2026
0f970c7
Update _75_include_workdir_extras.py
frdel Feb 8, 2026
d3608d1
autoscroll on next process group improvement
frdel Feb 8, 2026
6dcbb8c
add moonshot.ai provider support
3clyp50 Feb 9, 2026
3943042
fix scrollbar in step detail
frdel Feb 9, 2026
d8ad556
cleanup builtin skills
frdel Feb 9, 2026
5a54184
Merge pull request #1008 from 3clyp50/moonshot
frdel Feb 9, 2026
34dc301
Merge branch 'development' into testing
frdel Feb 9, 2026
f8048c5
default models, skills cleanup
frdel Feb 9, 2026
b91e1b9
default browser model
frdel Feb 9, 2026
c78ca8b
faster default memory settings
frdel Feb 10, 2026
85d8c48
better logging in websockets
frdel Feb 10, 2026
ac0041d
searxng settings
frdel Feb 10, 2026
357d038
whisper update
frdel Feb 10, 2026
1f7e3b5
searxng settings fix
frdel Feb 10, 2026
cc3f02e
supress warnings, test connectivity on start
frdel Feb 10, 2026
69cb4f1
auto refresh welcome screen on settings change
frdel Feb 10, 2026
4847063
fix welcome screen refresh
frdel Feb 10, 2026
419f6dd
default models
frdel Feb 10, 2026
4fa70fc
copy file fallback on errors
frdel Feb 10, 2026
343b141
bugfix: settings delta clearing auth
frdel Feb 10, 2026
6734b9d
parallel mcp initialization
frdel Feb 10, 2026
55bf0e4
update docs for v0.9.8
3clyp50 Dec 29, 2025
8adf165
docs stack update part i
3clyp50 Feb 10, 2026
4839ec3
update installation guide and quickstart
3clyp50 Feb 10, 2026
12e6ef4
update /tmp refs to /usr
3clyp50 Feb 10, 2026
a76cd52
optimize media; README.md; change structure
3clyp50 Feb 10, 2026
5727f1a
update agent knowledge
3clyp50 Feb 10, 2026
644fd54
rm Instruments refs
3clyp50 Feb 10, 2026
fb2565a
Merge branch 'pr/1014' into testing
frdel Feb 10, 2026
80d1293
remove instruments from memory areas
frdel Feb 10, 2026
4d9091f
rm Instruments refs
3clyp50 Feb 10, 2026
77ee200
fix broken links
3clyp50 Feb 10, 2026
0e8b11f
rm Instruments refs
3clyp50 Feb 10, 2026
0f1aca5
rm Instruments refs
3clyp50 Feb 10, 2026
2f799b8
Merge branch 'freshdocs' of https://github.com/3clyp50/agent-zero int…
frdel Feb 10, 2026
69ec98c
fix deepwiki mcp example
3clyp50 Feb 10, 2026
cb36293
Merge branch 'pr/1014' into testing
frdel Feb 10, 2026
99e562f
Merge pull request #1015 from 3clyp50/mcpexample
frdel Feb 10, 2026
8331a12
ui:fix browser step code
frdel Feb 10, 2026
3dceaca
caching and ctx window optimizations
frdel Feb 11, 2026
1db8e3f
fix deadlock in ctx compression
frdel Feb 12, 2026
0582c51
tty queue loop mismatch fix
frdel Feb 12, 2026
95c22c2
allow 5 loaded skills (temp solution)
frdel Feb 13, 2026
1945555
reset error retry counter
frdel Feb 13, 2026
fbfe8c2
remove default temperatures
frdel Feb 13, 2026
54fb474
initial plugins effort; memory system PoC
3clyp50 Feb 6, 2026
a3c0682
update docs and add agents capability
3clyp50 Feb 8, 2026
c2f579d
files_path_get fix
3clyp50 Feb 9, 2026
e548bf2
recall memory update from development
3clyp50 Feb 14, 2026
e18efbb
simplification and further memory decoupling
3clyp50 Feb 15, 2026
0c581eb
plugins tools fix
3clyp50 Feb 15, 2026
29bc7d3
components.js restore
3clyp50 Feb 15, 2026
383d54d
restore agent.py
3clyp50 Feb 15, 2026
d69e30a
simplification and further memory decoupling
3clyp50 Feb 15, 2026
eb3cb38
Merge branch 'pluginsystem' of https://github.com/3clyp50/agent-zero …
3clyp50 Feb 15, 2026
e6d716d
project-chat inheritance toggle
3clyp50 Feb 16, 2026
3918133
plugins - frontend PoC
frdel Feb 16, 2026
3bfdf91
Support webui JS/HTML extensions and plugin paths
frdel Feb 17, 2026
39a81d0
Refactor memory imports; add Alpine move directives
frdel Feb 17, 2026
618179f
update docs
3clyp50 Feb 17, 2026
addd0ab
quick-actions css fix; tooltips in plugins
3clyp50 Feb 17, 2026
57b1833
dropdown memory entry
3clyp50 Feb 17, 2026
d65fada
add extension points for chat, sidebar, and modal shell
3clyp50 Feb 17, 2026
bd6a80c
fix UI regressions
3clyp50 Feb 18, 2026
b43cde0
add extension points coverage; add JS hooks
3clyp50 Feb 18, 2026
7ab2760
Switch default models to claude-sonnet-4.6
frdel Feb 18, 2026
01cdb7b
Reset error_retries on successful loop iteration
frdel Feb 18, 2026
07c1281
Refactor plugin discovery and asset serving
frdel Feb 18, 2026
38dadcd
Merge branch 'pr/998' into development
frdel Feb 19, 2026
a7df75a
fix: skip empty content in _convert_messages to prevent errors
3clyp50 Feb 19, 2026
bd3ebd5
Merge pull request #1078 from 3clyp50/fix/visiontool
frdel Feb 19, 2026
5acb733
Refactor plugin/project helpers; add plugin UI
frdel Feb 19, 2026
a13b81a
update docs, AGENTS.md and skill
3clyp50 Feb 20, 2026
6040783
align plugin schema, config API actions, and plugin list UI
3clyp50 Feb 20, 2026
8032481
refactor memory to standalone config and unify plugin UI
3clyp50 Feb 20, 2026
4e243a9
Refactor API routing, add cache and security
frdel Feb 20, 2026
a9e20dd
Merge branch 'pr/1085' into development
frdel Feb 20, 2026
75bd441
plugins ui polish
3clyp50 Feb 20, 2026
715ba55
Merge branch 'pr/1085' into development
frdel Feb 20, 2026
da20abc
Add scoped plugin config discovery and UI
frdel Feb 20, 2026
a1589c2
Add plugin config listing/deletion + UI improvements
frdel Feb 20, 2026
505128c
Detach memory and update config
3clyp50 Feb 21, 2026
e13ed04
Handle forks in update-check version payload
frdel Feb 21, 2026
668e1b0
Merge pull request #1096 from agent0ai/codex/update-version-check-for…
frdel Feb 21, 2026
ba1c0d1
Support multiple allowed repos in git helper
frdel Feb 21, 2026
7b21031
Merge branch 'pr/959' into development
frdel Feb 21, 2026
5e4e753
Make get_plugin_config defaults robust
frdel Feb 21, 2026
a63b844
Use agent-specific memory plugin config
frdel Feb 21, 2026
65b7ed9
update fields; cleanup config files
3clyp50 Feb 21, 2026
6f63488
update agents, human docs, plugin skill
3clyp50 Feb 22, 2026
c41dfba
WIP: Add plugin toggle UI and helper stubs
frdel Feb 23, 2026
420f70d
Add delete_file and plugin toggle handling
frdel Feb 23, 2026
7bd3ab6
Guard delete_file with exists check
frdel Feb 23, 2026
6e2a442
Convert agent and plugin metadata/configs to YAML
frdel Feb 23, 2026
f788490
Plugin UX Consolidation (pre-upstream-merge snapshot)
3clyp50 Feb 24, 2026
c1437b2
Save plugin config as JSON & add header slot
frdel Feb 24, 2026
82aef08
Convert agent and plugin metadata/configs to YAML
frdel Feb 23, 2026
8639069
update docs, skill and enhance activation model
3clyp50 Feb 24, 2026
59ed70d
generic markdown modal and plugins wiring
3clyp50 Feb 24, 2026
b39dada
Merge upstream/development: save_plugin_config JSON fix + plugins-lis…
3clyp50 Feb 24, 2026
bb89a34
align plugin manifests and docs to use title
3clyp50 Feb 24, 2026
fcdb628
Support glob patterns in cache.clear
frdel Feb 25, 2026
4633ebd
feat: Add chat branching plugin
keyboardstaff Feb 25, 2026
8e75290
fix: plugin prompts search path resolution
keyboardstaff Feb 25, 2026
ba07c7a
Merge pull request #1128 from keyboardstaff/bugfix
frdel Feb 25, 2026
8446023
Use enabled plugin paths for subagent paths
frdel Feb 25, 2026
e428f5b
fix: Branch button missing on new messages in live chat
keyboardstaff Feb 25, 2026
d358ded
typed messages.js, unified returns from message handlers
frdel Feb 25, 2026
2301671
Merge remote-tracking branch 'origin/development' into chat-branching…
keyboardstaff Feb 25, 2026
6d4fd69
Add KVP helper and plugin file flags
frdel Feb 25, 2026
ffe65af
Merge branch 'pr/1126' into development
frdel Feb 25, 2026
8b62f71
Make API handler caching optional; plugin fixes
frdel Feb 25, 2026
dfc76a2
fix plugin toggle signature and sync UI via modal events
3clyp50 Feb 25, 2026
55bb5fb
toggle css polish
3clyp50 Feb 25, 2026
7779017
update docs for index repo
3clyp50 Feb 25, 2026
d2ca38e
Merge remote-tracking branch 'origin/development' into chat-branching…
keyboardstaff Feb 25, 2026
f3c517e
Refactored to use the unified handler output format from setMessages():
keyboardstaff Feb 25, 2026
d82b121
Add extensible decorator and cache controls
frdel Feb 25, 2026
1779277
Import chats store via ES module instead
keyboardstaff Feb 25, 2026
f7b7683
Add extensible hooks and improve agent detection
frdel Feb 25, 2026
1d837cc
Fix branch button only appearing on the first code block/table within…
keyboardstaff Feb 26, 2026
1a2ffdc
Merge pull request #1127 from keyboardstaff/chat-branching-plugin
frdel Feb 26, 2026
cf8e665
fix: image attachment 404 on message display
keyboardstaff Feb 26, 2026
09caf3e
Merge pull request #1140 from keyboardstaff/bugfix
frdel Feb 26, 2026
1e4f170
plugins: UI polish, intentional scope rules
3clyp50 Feb 25, 2026
92168a1
css polish and modal close fix
3clyp50 Feb 25, 2026
601a527
toggling inheritance (match configs)
3clyp50 Feb 26, 2026
ec5842a
cleanup, simpler toggling logic
3clyp50 Feb 26, 2026
4b3666a
ui: enhance chat input vertical expansion and auto-resize
3clyp50 Feb 26, 2026
cce1acb
fix full-screen-input bg contrast
3clyp50 Feb 26, 2026
3b4f4ce
polish full-screen-input toolbar css
3clyp50 Feb 26, 2026
585b70d
Merge pull request #1141 from 3clyp50/ui-vars
frdel Feb 26, 2026
5950320
Merge pull request #1134 from 3clyp50/plugin4
frdel Feb 26, 2026
1d2425c
feat: add text editor plugin with file read, write, and patch capabil…
linuztx Feb 27, 2026
d455525
fix: update file operations for inclusive line range handling
linuztx Feb 27, 2026
9419c0b
fix: make text_editor line numbering 1-based to match grep/sed/editors
linuztx Feb 27, 2026
2827b57
refactor: move get_config from file_ops.py to text_editor.py to keep …
linuztx Feb 27, 2026
a811364
fix: right-justify line numbers in text_editor:read for consistent al…
linuztx Feb 27, 2026
8fd278c
improve: text_editor tool system prompt instructions
linuztx Feb 27, 2026
1f1aa12
improve: text_editor include patched region in response
linuztx Feb 27, 2026
8d855c9
Merge pull request #1057 from 3clyp50/feat/proj-inherit
frdel Feb 27, 2026
fdfbd6a
improve: text_editor include written content in response
linuztx Feb 27, 2026
bfe5ed1
fix: text_editor add trailing newline to patch content to avoid line …
linuztx Feb 27, 2026
a5a1e02
improve: text_editor add mtime checks and prompts for patch read vali…
linuztx Feb 27, 2026
9f6a44a
fix: text_editor clear mtime after patch so next patch requires re-read
linuztx Feb 28, 2026
d67b0f5
improve: text_editor allow patch-after-patch only for in-place edits …
linuztx Feb 28, 2026
4b12eb0
Update plugin.yaml
linuztx Feb 28, 2026
2457bf2
Update default_config.yaml
linuztx Feb 28, 2026
87f8b02
chore: drop newline note from text_editor write prompt
linuztx Feb 28, 2026
080c169
Merge pull request #1155 from linuztx/text-editor-tool-plugin
frdel Feb 28, 2026
023cbff
feat: add Context Engine plugin for hybrid code search and RAG
TerminallyLazy Feb 28, 2026
fcf7e7d
merge
TerminallyLazy Feb 28, 2026
aec051c
docs: add design doc for Docker services UI in context-engine plugin
TerminallyLazy Feb 28, 2026
b66cf2c
docs: update design doc with full implementation plan
TerminallyLazy Feb 28, 2026
b896148
feat(context-engine): add Docker compose API handler
TerminallyLazy Feb 28, 2026
4e170be
fix(context-engine): add exception handler and subprocess cleanup to …
TerminallyLazy Feb 28, 2026
a02e141
feat(context-engine): add Docker deploy toggle and test connection to…
TerminallyLazy Feb 28, 2026
d4e9a9e
fix(context-engine): bootstrap CSRF token before Docker API calls
TerminallyLazy Feb 28, 2026
6fab720
fix(context-engine): handle docker compose JSON format variants and r…
TerminallyLazy Feb 28, 2026
ceb1639
docs: add design doc for Context Engine auto-clone and build
TerminallyLazy Feb 28, 2026
5e76a58
feat(context-engine): auto-clone Context Engine repo and build from s…
TerminallyLazy Feb 28, 2026
db19dbb
fix(context-engine): harden Docker handler with path validation, env …
TerminallyLazy Feb 28, 2026
91a79a7
fix(context-engine): resolve qdrant version mismatch, 404 endpoints, …
TerminallyLazy Feb 28, 2026
392cea1
fix(context-engine): resolve Docker network conflict and suppress env…
TerminallyLazy Feb 28, 2026
8e1ffdf
fix(context-engine): add required Accept header for MCP streamable-http
TerminallyLazy Feb 28, 2026
075b6a2
fix(context-engine): handle SSE response format from MCP streamable-http
TerminallyLazy Feb 28, 2026
44e45c4
fix(context-engine): use correct MCP tool names for indexing
TerminallyLazy Feb 28, 2026
a9a23f9
fix: recognize upstream .env as safe-to-overwrite for HOST_INDEX_PATH
TerminallyLazy Feb 28, 2026
67eb449
fix: use quantized embedding model and set host_index_path to project…
TerminallyLazy Feb 28, 2026
fb0ff2f
fix: handle asyncio.TimeoutError and extend indexing timeout to 5 min
TerminallyLazy Feb 28, 2026
9ae2dca
chore: update .gitignore to exclude pycache files in usr plugins
TerminallyLazy Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 3 additions & 10 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,16 @@
# Project‑specific exclusions / re‑includes
###############################################################################

# Large / generated data
# Obsolete
memory/**
instruments/**
knowledge/custom/**

# Logs, tmp, usr
logs/*
tmp/*
usr/*

# Knowledge directory – keep only default/
knowledge/**
!knowledge/default/
!knowledge/default/**

# Instruments directory – keep only default/
instruments/**
!instruments/default/
!instruments/default/**

# Keep .gitkeep markers anywhere
!**/.gitkeep
Expand Down
37 changes: 19 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,35 @@
# Ignore all contents of the virtual environment directory
.venv/

# Handle memory directory
memory/**
!memory/**/
# obsolete folders
/memory/
/knowledge/custom/
/instruments/

# Handle logs directory
logs/*
logs/**
!logs/**/

# Handle tmp and usr directory
tmp/*
usr/*
tmp/**
!tmp/**/
usr/**
!usr/**/

# Context Engine plugin (tracked)
!usr/plugins/context-engine/**

# Handle knowledge directory
knowledge/**
!knowledge/**/
# Explicitly allow the default folder in knowledge
!knowledge/default/
!knowledge/default/**

# Handle instruments directory
instruments/**
!instruments/**/
# Explicitly allow the default folder in instruments
!instruments/default/
!instruments/default/**

# Global rule to include .gitkeep files anywhere
!**/.gitkeep

# for browser-use
agent_history.gif

.agent/**
.claude/**

# ignore pycache files from usr plugins
usr/plugins/**/__pycache__/

217 changes: 217 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# Agent Zero - AGENTS.md

[Generated using reconnaissance on 2026-02-22]

## Quick Reference
Tech Stack: Python 3.12+ | Flask | Alpine.js | LiteLLM | WebSocket (Socket.io)
Dev Server: python run_ui.py (runs on http://localhost:50001 by default)
Run Tests: pytest (standard) or pytest tests/test_name.py (file-scoped)
Documentation: README.md | docs/
Frontend Deep Dives: [Component System](docs/agents/AGENTS.components.md) | [Modal System](docs/agents/AGENTS.modals.md) | [Plugin Architecture](AGENTS.plugins.md)

---

## Table of Contents
1. [Project Overview](#project-overview)
2. [Core Commands](#core-commands)
3. [Docker Environment](#docker-environment)
4. [Project Structure](#project-structure)
5. [Development Patterns & Conventions](#development-patterns--conventions)
6. [Safety and Permissions](#safety-and-permissions)
7. [Code Examples](#code-examples)
8. [Git Workflow](#git-workflow)
9. [API Documentation](#api-documentation)
10. [Troubleshooting](#troubleshooting)

---

## Project Overview

Agent Zero is a dynamic, organic agentic framework designed to grow and learn. It uses the operating system as a tool, featuring a multi-agent cooperation model where every agent can create subordinates to break down tasks.

Type: Full-Stack Agentic Framework (Python Backend + Alpine.js Frontend)
Status: Active Development
Primary Language(s): Python, JavaScript (ES Modules)

---

## Core Commands

### Setup
Do not combine these commands; run them individually:
```bash
pip install -r requirements.txt
pip install -r requirements2.txt
```
- Start WebUI: python run_ui.py

---

## Docker Environment

When running in Docker, Agent Zero uses two distinct Python runtimes to isolate the framework from the code being executed:

### 1. Framework Runtime (/opt/venv-a0)
- Version: Python 3.12.4
- Purpose: Runs the Agent Zero backend, API, and core logic.
- Packages: Contains all dependencies from requirements.txt.

### 2. Execution Runtime (/opt/venv)
- Version: Python 3.13
- Purpose: Default environment for the interactive terminal and the agent's code execution tool.
- Behavior: This is the environment active when you docker exec into the container. Packages installed by the agent via pip install during a task are stored here.

---

## Project Structure

```
/
├── agent.py # Core Agent and AgentContext definitions
├── initialize.py # Framework initialization logic
├── models.py # LLM provider configurations
├── run_ui.py # WebUI server entry point
├── python/
│ ├── api/ # API Handlers (ApiHandler subclasses)
│ ├── extensions/ # Backend lifecycle extensions
│ ├── helpers/ # Shared Python utilities (plugins, files, etc.)
│ ├── tools/ # Agent tools (Tool subclasses)
│ └── websocket_handlers/# WebSocket event handlers
├── webui/
│ ├── components/ # Alpine.js components
│ ├── js/ # Core frontend logic (modals, stores, etc.)
│ └── index.html # Main UI shell
├── usr/ # User data directory (isolated from core)
│ ├── plugins/ # Custom user plugins
│ ├── settings.json # User-specific configuration
│ └── workdir/ # Default agent workspace
├── plugins/ # Core system plugins
├── agents/ # Agent profiles (prompts and config)
├── prompts/ # System and message prompt templates
└── tests/ # Pytest suite
```

Key Files:
- agent.py: Defines AgentContext and the main Agent class.
- python/helpers/plugins.py: Plugin discovery and configuration logic.
- webui/js/AlpineStore.js: Store factory for reactive frontend state.
- python/helpers/api.py: Base class for all API endpoints.
- docs/agents/AGENTS.components.md: Deep dive into the frontend component architecture.
- docs/agents/AGENTS.modals.md: Guide to the stacked modal system.
- AGENTS.plugins.md: Comprehensive guide to the full-stack plugin system.

---

## Development Patterns & Conventions

### Backend (Python)
- Context Access: Use from agent import AgentContext, AgentContextType (not python.helpers.context).
- Communication: Use mq from python.helpers.messages to log proactive UI messages:
mq.log_user_message(context.id, "Message", source="Plugin")
- API Handlers: Derive from ApiHandler in python/helpers/api.py.
- Extensions: Use the extension framework in python/helpers/extension.py for lifecycle hooks.
- Error Handling: Use RepairableException for errors the LLM might be able to fix.

### Frontend (Alpine.js)
- Store Gating: Always wrap store-dependent content in a template:
```html
<div x-data>
<template x-if="$store.myStore">
<div x-init="$store.myStore.onOpen()">...</div>
</template>
</div>
```
- Store Registration: Use createStore from /js/AlpineStore.js.
- Modals: Use openModal(path) and closeModal() from /js/modals.js.

### Plugin Architecture
- Location: Always develop new plugins in usr/plugins/.
- Manifest: Every plugin requires a plugin.yaml with name, description, version, and optionally settings_sections, per_project_config, per_agent_config, and always_enabled.
- Discovery: Conventions based on folder names (api/, tools/, webui/, extensions/).
- Settings: Use get_plugin_config(plugin_name, agent=agent) to retrieve settings. Plugins can expose a UI for settings via webui/config.html. For plugins wrapping core settings, set $store.pluginSettings.saveMode = 'core' in x-init.
- Activation: Global and scoped activation rules are stored as .toggle-1 (ON) and .toggle-0 (OFF). Scoped rules are handled via the plugin "Switch" modal.

### Lifecycle Synchronization
| Action | Backend Extension | Frontend Lifecycle |
|---|---|---|
| Initialization | agent_init | init() in Store |
| Mounting | N/A | x-create directive |
| Processing | monologue_start/end | UI loading state |
| Cleanup | context_deleted | x-destroy directive |

---

## Safety and Permissions

### Allowed Without Asking
- Read any file in the repository.
- Update code files in usr/.

### Ask Before Executing
- pip install (new dependencies).
- Deleting core files outside of usr/ or tmp/.
- Modifying agent.py or initialize.py.
- Making git commits or pushes.

### Never Do
- Commit, hardcode or leak secrets or .env files.
- Bypass CSRF or authentication checks.
- Hardcode API keys.

---

## Code Examples

### API Handler (Good)
```python
from python.helpers.api import ApiHandler, Request, Response

class MyHandler(ApiHandler):
async def process(self, input: dict, request: Request) -> dict | Response:
# Business logic here
return {"ok": True, "data": "result"}
```

### Alpine Store (Good)
```javascript
import { createStore } from "/js/AlpineStore.js";

export const store = createStore("myStore", {
items: [],
init() { /* global setup */ },
onOpen() { /* mount setup */ },
cleanup() { /* unmount cleanup */ }
});
```

### Tool Definition (Good)
```python
from python.helpers.tool import Tool, ToolResult

class MyTool(Tool):
async def execute(self, arg1: str):
# Tool logic
return ToolResult("Success")
```

---

## Troubleshooting

### Dependency Conflicts
If pip install fails, try running in a clean virtual environment:
```bash
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements2.txt
```

### WebSocket Connection Failures
- Check if X-CSRF-Token is being sent.
- Ensure the runtime ID in the session matches the current server instance.

---

*Last updated: 2026-02-22*
*Maintained by: Agent Zero Core Team*
Loading