Skip to content

hibbault/aide

Repository files navigation

AIDE — Autonomous Self-Improving AI Agent

AIDE is an experimental AI agent that lives inside its own source code and continuously improves itself. It operates autonomously — no human intervention required.

AIDE agent working autonomously

What It Does

  • Self-modifying agent: AIDE reads, writes, edits, and deletes files in its own codebase (TypeScript backend + React frontend) to fix bugs, add features, and improve its own reasoning.
  • Autonomous loop: The agent analyzes the code, plans changes, implements them, verifies compilation, and commits to Git — all on its own.
  • Auto-verification: After every file edit or write, the agent runs npx tsc --noEmit to catch TypeScript errors immediately, preventing broken code from being committed.
  • Persistent memory: A 3-tier context budget system keeps track of long-term, short-term, and working memory, with JSONL logs for conversation history and an AGENT.md file for quick session recovery.
  • Live UI: A React frontend connects via WebSocket to watch the agent think, act, and update files in real time, with a tabbed HUD showing both chat messages and live thought streams.
  • Toolset: The agent has access to file I/O, directory listing, regex search, command execution, and Git operations.

Architecture

backend/
  src/
    agent/Reflekt.ts   — Agentic loop (the brain)
    agent/LLM.ts       — LLM provider (DeepSeek API)
    agent/Budget.ts    — Memory management (3-tier context budget)
    agent/Tools.ts     — File I/O, git, search, and command execution
  server.ts            — WebSocket + Express server

frontend/
  src/                 — React/Vite/Tailwind UI
    App.tsx            — Chat interface + code preview
    ...

Quick Start

# Clone the repository
git clone https://github.com/hibbault/aide.git
cd aide

# Install dependencies
npm install
cd backend && npm install && cd ..
cd frontend && npm install && cd ..

# Set up your API key
cp backend/.env.example backend/.env
# Edit backend/.env and add your DeepSeek API key

# Start everything (backend + watchdog + hot-reload)
npm start

# In another terminal, start the frontend
npm run dev:frontend

# Or start both in one command
npm run dev

How It Works

  1. The agent receives a task or sits idle.
  2. It reads relevant files, plans changes, and outputs a <TOOL_CALL> JSON block with the tool to invoke (e.g., edit_file, run_command).
  3. The tool executes, and the result is fed back into the agent's context.
  4. After each edit, TypeScript compilation is verified automatically (npx tsc --noEmit).
  5. On success, changes are committed to Git with descriptive messages.
  6. The agent then identifies the next most impactful improvement and loops.

Safety

  • The agent never commits .env files, API keys, or secrets.
  • It never modifies .gitignore to track sensitive files.
  • All changes are versioned in Git, so mistakes can be reverted.

Status

Experimental — use at your own risk. The agent can and will modify its own source code, potentially introducing regressions. Always review commits.

License

PolyForm Noncommercial — free for personal, educational, and non-commercial use. For commercial licensing, contact ibrahimyilmazgs@gmail.com.

Releases

No releases published

Packages

 
 
 

Contributors