Skip to content

NvlFR/self-evolving-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEED v2.0 — Self-Evolving Experiment in Autonomous Design

A recursive self-improvement system that architecturally understands, audits, and evolves its own existence.


🚀 Overview

SEED v2.0 is an advanced autonomous agentic architecture focused on Recursive Self-Improvement. Unlike static agents, SEED is designed as a "Self-Constructing System" that can:

  1. Analyze its own codebase and infrastructure.
  2. Architect structural changes (new modules, folders, dependencies).
  3. Implement and Self-Heal its own source code via a verification pipeline.
  4. Monitor its own resource efficiency and quality standards.

🏗️ v2.0 Advanced Architecture

The system has evolved from simple line-editing to full-scale architectural awareness.

1. The Expert Toolbelt (New in v2.0)

Tool Component Purpose
Architectural Mapper brain/project_mapper.py Generates a project-wide dependency and import map.
Code Auditor brain/code_auditor.py Real-time QC using ruff to ensure industry-standard code quality.
Autonomous Tester brain/test_generator.py Automatically generates pytest units for every new feature built.
Resource Monitor brain/monitor.py Tracks token consumption and latency for self-optimization.

2. Self-Healing Pipeline

The ProjectManager now features a closed-loop verification cycle:

  • Code Generation: The agent writes a new module or fix.
  • Verification: The system executes the code in a sandbox.
  • Self-Healing: If errors occur, the agent receives the traceback and automatically attempts to fix the code (up to 2 retries) before committing.

3. Deep Architectural Reflection

The Reflection Engine has been upgraded to a "Senior System Architect" persona. It no longer just looks at bugs; it evaluates:

  • Modularity: Is the system getting too bloated?
  • Bootstrapping: Are the new tools actually making the agent smarter?
  • Bottlenecks: Where is the structural friction in the evolution loop?

🛠️ Local LLM Setup (Priority)

SEED v2.0 is optimized for speed using local hardware via Tailscale/Localhost.

Start Qwen 2.5 Server

./build/bin/llama-server \
-m ~/models/Qwen2.5-3B-Instruct-Q4_K_M.gguf \
-t 8 \
--host 0.0.0.0 \
--port 8080

Note: The system prioritizes local execution (timeout set to 2 hours for complex construction) and only falls back to Olagon if the local server is unreachable.


🖥️ Command Center Dashboard

SEED now features a modern, real-time web dashboard for 24/7 monitoring.

  • Access: http://localhost:8100 (or your Tailscale IP)
  • Features:
    • Animated project progress bars.
    • Live "Thinking" terminal logs.
    • Genetic mutation history with benchmark scores.
    • Resource efficiency analytics.

🏠 Home Server Deployment (24/7 Ops)

SEED is designed to run as a background service on a home server.

1. Initialize Services

python3 setup_server.py

This script generates seed-agent.service and seed-dashboard.service.

2. Activate with Systemd

sudo cp *.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable seed-agent seed-dashboard
sudo systemctl start seed-agent seed-dashboard

3. Monitor

# Check Agent Logs
tail -f logs/seed-agent.log

# Check Dashboard Status
sudo systemctl status seed-dashboard

📂 Project Structure

self-evolving-agent/
│
├── dashboard/                 # Web Monitoring Interface
│   ├── server.py              # FastAPI Backend (Port 8100)
│   └── index.html             # React Single-File Frontend
│
├── brain/                     # The Cognitive Engine
│   ├── project_mapper.py      # [NEW] Architectural Mapping
│   ├── code_auditor.py        # [NEW] Static Analysis (Ruff)
│   ├── test_generator.py      # [NEW] Auto-Unit Testing
│   ├── monitor.py             # [NEW] Token/Efficiency Tracking
│   ├── llm_client.py          # Dual-Mode Client (Local Priority)
│   └── mutation_engine.py     # Recursive Self-Improvement Focus
│
├── runtime/                   # The Execution Layer
│   ├── executor.py            # High-Timeout Sandbox Execution
│   ├── safety_guard.py        # Bootstrapping-Friendly Policy
│   └── autonomous_loop.py     # Evolution Orchestrator
│
├── memory/                    # Persistent Self-Model
│   ├── episodes.json          # Evolutionary history
│   └── active_project.json    # Construction state
│
└── projects/                  # Autonomous Workspaces
    └── seed-v2-upgrade/       # The "Self-Construction" project

Created by SEED System — The system that builds itself.

About

Recursive self-improving AI agent experiment focused on self-reflection, self-modification, and autonomous evolution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages