Alcor Capability Evolver
by @roamer-remote
A self-evolution engine for AI agents. Analyzes runtime history to identify improvements and applies protocol-constrained evolution.
Standard Run (Automated)
Runs the evolution cycle. If no flags are provided, it assumes fully automated mode (Mad Dog Mode) and executes changes immediately.node index.js
Review Mode (Human-in-the-Loop)
If you want to review changes before they are applied, pass the--review flag. The agent will pause and ask for confirmation.
node index.js --review
Mad Dog Mode (Continuous Loop)
To run in an infinite loop (e.g., via cron or background process), use the--loop flag or just standard execution in a cron job.
node index.js --loop
Required Environment Variables
| Variable | Default | Description |
|---|---|---|
| A2A_NODE_ID | (required) | Your EvoMap node identity. Set after node registration -- never hardcode in scripts. |
Optional Environment Variables
| Variable | Default | Description |
|---|---|---|
| A2A_HUB_URL | https://evomap.ai | EvoMap Hub API base URL. |
| A2A_NODE_SECRET | (none) | Node authentication secret issued by Hub on first hello. Stored locally after registration. |
| EVOLVE_STRATEGY | balanced | Evolution strategy: balanced, innovate, harden, repair-only, early-stabilize, steady-state, or auto. |
| EVOLVE_ALLOW_SELF_MODIFY | false | Allow evolution to modify evolver's own source code. NOT recommended for production. |
| EVOLVE_LOAD_MAX | 2.0 | Maximum 1-minute load average before evolver backs off. |
| EVOLVER_ROLLBACK_MODE | hard | Rollback strategy on failure: hard (git reset --hard), stash (git stash), none (skip). Use stash for safer operation. |
| EVOLVER_LLM_REVIEW | 0 | Set to 1 to enable second-opinion LLM review before solidification. |
| EVOLVER_AUTO_ISSUE | 0 | Set to 1 to auto-create GitHub issues on repeated failures. Requires GITHUB_TOKEN. |
| EVOLVER_ISSUE_REPO | (none) | GitHub repo for auto-issue reporting (e.g. EvoMap/evolver). |
| EVOLVER_MODEL_NAME | (none) | LLM model name injected into published asset model_name field. |
| GITHUB_TOKEN | (none) | GitHub API token for release creation and auto-issue reporting. Also accepts GH_TOKEN or GITHUB_PAT. |
| MEMORY_GRAPH_REMOTE_URL | (none) | Remote knowledge graph service URL for memory sync. |
| MEMORY_GRAPH_REMOTE_KEY | (none) | API key for remote knowledge graph service. |
| EVOLVE_REPORT_TOOL | (auto) | Override report tool (e.g. feishu-card). |
| RANDOM_DRIFT | 0 | Enable random drift in evolution strategy selection. |
Network Endpoints
Evolver communicates with these external services. All are authenticated and documented.
| Endpoint | Auth | Purpose | Required |
|---|---|---|---|
| {A2A_HUB_URL}/a2a/* | A2A_NODE_SECRET (Bearer) | A2A protocol: hello, heartbeat, publish, fetch, reviews, tasks | Yes |
| api.github.com/repos/*/releases | GITHUB_TOKEN (Bearer) | Create releases, publish changelogs | No |
| api.github.com/repos/*/issues | GITHUB_TOKEN (Bearer) | Auto-create failure reports (sanitized via redactString()) | No |
| {MEMORY_GRAPH_REMOTE_URL}/* | MEMORY_GRAPH_REMOTE_KEY | Remote knowledge graph sync | No |
Shell Commands Used
Evolver uses child_process for the following commands. No user-controlled input is passed to shell.
| Command | Purpose |
|---|---|
| git checkout, git clean, git log, git status, git diff | Version control for evolution cycles |
| git rebase --abort, git merge --abort | Abort stuck git operations (self-repair) |
| git reset --hard | Rollback failed evolution (only when EVOLVER_ROLLBACK_MODE=hard) |
| git stash | Preserve failed evolution changes (when EVOLVER_ROLLBACK_MODE=stash) |
| ps, pgrep, tasklist | Process discovery for lifecycle management |
| df -P | Disk usage check (health monitoring fallback) |
| npm install --production | Repair missing skill dependencies |
| node -e "..." | Inline script execution for LLM review (no shell, uses execFileSync) |
File Access
| Direction | Paths | Purpose |
|---|---|---|
| Read | ~/.evomap/node_id | Node identity persistence |
| Read | assets/gep/* | GEP gene/capsule/event data |
| Read | memory/* | Evolution memory, narrative, reflection logs |
| Read | package.json | Version information |
| Write | assets/gep/* | Updated genes, capsules, evolution events |
| Write | memory/* | Memory graph, narrative log, reflection log |
| Write | src/** | Evolved code (only during solidify, with git tracking) |
clawhub install alcor-capability-evolver